Read an API contract
An API contract describes an API’s serving URL, operations, inputs, and response fields. Read it through agent-data docs or the API’s catalog entry.
Select an API
Section titled “Select an API”agent-data docs <api-reference>Use the API handle for <api-reference>, such as youtube-com. A listing ID also identifies the catalog entry. A website address or display name does not identify it in this command.
agent-data docs youtube-comCLI 0.13.0 accepts either identifier. Its help names the argument listingId. Complete authentication before the request.
Use Bash or zsh with your API key in AGENT_DATA_API_KEY.
curl --fail-with-body --silent --show-error \ -H "Authorization: Bearer $AGENT_DATA_API_KEY" \ 'https://agent-data.motie.dev/api/v1/marketplace/listings/youtube-com/docs'The handle in the path selects the API. The returned api.base_url supplies its separate address for data requests.
Call the docs tool in a connected MCP client.
{ "listing_id": "youtube-com"}The listing_id field accepts the API handle. Read the contract JSON in the returned text content.
Read the contract
Section titled “Read the contract”This November 17, 2026 excerpt contains one route. It omits other routes, optional cursor details, examples, and schema metadata. Read the current YouTube contract for the complete response.
{ "listing": { "id": "e5182587-a7c9-4668-a8a6-314458afef40", "name": "YouTube Video Search and Metadata API" }, "health": { "status": "live", "last_verified_at": "2026-11-01T12:05:19.648Z" }, "api": { "base_url": "https://api.agent-data.dev/youtube-com", "routes": [ { "method": "GET", "path": "/v1/search-videos", "slug": "search-videos", "parameters": [ { "name": "query", "in": "query", "required": true, "type": "string" } ], "request_body": null } ] }}| Field | Meaning or action |
|---|---|
listing.id | The catalog identifier for the API. |
api.base_url | The branded address for data requests. Append the route’s path, or use its full_url. |
routes[].slug | The route slug names one operation, such as search-videos. |
routes[].method, routes[].path | The HTTP method and path, such as GET /v1/search-videos. |
parameters | The input names, locations, required flags, and types. |
request_body, request_body_contract | The body schema and its availability. |
response_schema | The response fields and types. |
example_cli, example_curl | Example requests. Check required inputs before execution. |
health.last_verified_at | The time of a recorded health check. |
The base URL includes the API handle. Append the route path once: https://api.agent-data.dev/youtube-com plus /v1/search-videos.
An OpenAPI operation ID is separate from the route slug. Use the documented slug for CLI and MCP calls.
For search-videos, query must be a string of at most 200 characters. The API rejects whitespace-only queries. The optional cursor accepts a string of at most 10,000 characters or null.
Use the returned next_cursor unchanged with the same query. next_cursor: null means the source reports no more results. These limits apply to this API, not every catalog entry.
serialization describes how to encode inputs when that field exists. input_contract_issues reports input-contract problems. Use the current contract to construct your request.
A health timestamp records a past check. It does not measure the age of returned data or the success of your request.
CLI options
Section titled “CLI options”| Option | Effect |
|---|---|
--api-key <key> | Override the configured credential. |
--base-url <url> | Select the marketplace service. |
--verbose | Print diagnostics to standard error. See private fields. |
-h, --help | Show command help. |
Use the result
Section titled “Use the result”Call the operation with youtube-com, search-videos, and query="python programming". If contract inspection fails, check authentication and the identifier from your search result.
Use search first if you do not have an API identifier.