Skip to content

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.

Terminal window
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.

Terminal window
agent-data docs youtube-com

CLI 0.13.0 accepts either identifier. Its help names the argument listingId. Complete authentication before the request.

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
}
]
}
}
FieldMeaning or action
listing.idThe catalog identifier for the API.
api.base_urlThe branded address for data requests. Append the route’s path, or use its full_url.
routes[].slugThe route slug names one operation, such as search-videos.
routes[].method, routes[].pathThe HTTP method and path, such as GET /v1/search-videos.
parametersThe input names, locations, required flags, and types.
request_body, request_body_contractThe body schema and its availability.
response_schemaThe response fields and types.
example_cli, example_curlExample requests. Check required inputs before execution.
health.last_verified_atThe 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.

OptionEffect
--api-key <key>Override the configured credential.
--base-url <url>Select the marketplace service.
--verbosePrint diagnostics to standard error. See private fields.
-h, --helpShow command help.

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.