{
    "documentation_version": 1,
    "base_url": "https://c7dev.com",
    "instructions_url": "https://c7dev.com/api_instructions",
    "selection": {
        "method": "GET",
        "parameter": "api",
        "required": false,
        "description": "Omit api for the full suite, or use an endpoint name for its instructions only.",
        "example_url": "https://c7dev.com/api_instructions?api=media_api"
    },
    "instructions": [
        "Choose an endpoint by its description, then use its documented HTTP method and parameter location.",
        "URL-encode GET query values. Preserve identifiers such as VAT numbers and registration codes as strings.",
        "For JSON APIs, require HTTP success and result=true before using returned data. Read error_message on failure.",
        "Do not fabricate missing data or treat null as zero or false. Warnings may indicate incomplete or older data.",
        "Do not blindly retry invalid input or access errors. Temporary service failures may be retried with bounded backoff.",
        "Responses prohibit browser caching. Inspect cached, timestamps and X-API-Version when those fields are available."
    ],
    "authentication": {
        "documentation": "Public; no token is required to read these instructions.",
        "restricted_endpoints": "Supply credentials provided by the API operator when access control requires them.",
        "token_locations": [
            "Authorization: Bearer YOUR_ACCESS_TOKEN",
            "X-Access-Token: YOUR_ACCESS_TOKEN",
            "access_token query or form parameter"
        ],
        "domain": "Send domain as a query or form parameter when the client token is restricted to registered domains. Access may also be restricted by IP.",
        "ai_generate": "Requires both access_token and domain in the form body."
    },
    "json_response_envelope": {
        "result": "boolean; request succeeded",
        "error": "boolean; request failed",
        "error_message": "string; empty on success",
        "server_time": "integer; Unix timestamp in seconds"
    },
    "errors": {
        "400": "Missing or invalid input.",
        "403": "Access denied; check token, registered domain and IP permissions.",
        "404": "Unknown API selected for instructions.",
        "405": "Unsupported method for the instructions endpoint.",
        "500": "Processing failed.",
        "503": "Service temporarily unavailable."
    },
    "apis": [
        {
            "name": "media_api",
            "method": "GET",
            "path": "/media_api",
            "description": "Search media and software for descriptions, images, release dates, ratings, credits, authors, platforms and versions.",
            "instructions_url": "https://c7dev.com/api_instructions?api=media_api",
            "request": {
                "parameter_location": "query",
                "parameters": {
                    "type": {
                        "type": "string",
                        "required": true,
                        "description": "Category to search.",
                        "enum": [
                            "game",
                            "movie",
                            "tv",
                            "book",
                            "music",
                            "software"
                        ]
                    },
                    "query": {
                        "type": "string",
                        "required": true,
                        "description": "One search string containing the title and any artist, author, developer, publisher or release-year terms."
                    },
                    "language": {
                        "type": "string",
                        "required": false,
                        "description": "Language code.",
                        "default": "en-US"
                    },
                    "page": {
                        "type": "integer",
                        "required": false,
                        "description": "Result page.",
                        "default": 1,
                        "minimum": 1,
                        "maximum": 500
                    },
                    "year": {
                        "type": "string",
                        "required": false,
                        "description": "Four-digit release year.",
                        "pattern": "^[1-9][0-9]{3}$"
                    },
                    "debug": {
                        "type": "string",
                        "required": false,
                        "description": "Set to 1 for request diagnostics; omit for ordinary requests.",
                        "enum": [
                            "0",
                            "1"
                        ]
                    }
                }
            },
            "response": {
                "format": "application/json",
                "response_fields": [
                    "items",
                    "type",
                    "action",
                    "query",
                    "language",
                    "page",
                    "total_pages",
                    "total_results",
                    "warnings",
                    "cached",
                    "request_time"
                ],
                "item_fields": {
                    "identity": [
                        "id",
                        "type",
                        "title",
                        "original_title",
                        "alternative_titles",
                        "slug"
                    ],
                    "description": [
                        "description",
                        "tagline",
                        "genres",
                        "tags",
                        "status"
                    ],
                    "dates": [
                        "release_date",
                        "year",
                        "language",
                        "updated_at"
                    ],
                    "images_and_links": [
                        "poster_url",
                        "backdrop_url",
                        "screenshots",
                        "url",
                        "homepage",
                        "imdb_id",
                        "imdb_url"
                    ],
                    "ratings": [
                        "rating",
                        "rating_scale",
                        "rating_count",
                        "metacritic",
                        "metacritic_url",
                        "age_rating"
                    ],
                    "credits": [
                        "actors",
                        "crew",
                        "directors",
                        "writers",
                        "creators",
                        "artists",
                        "developers",
                        "publishers",
                        "labels",
                        "production_companies"
                    ],
                    "movie_and_tv": [
                        "runtime_minutes",
                        "budget",
                        "revenue",
                        "production_countries",
                        "spoken_languages",
                        "last_air_date",
                        "number_of_seasons",
                        "number_of_episodes",
                        "in_production",
                        "episode_runtime_minutes",
                        "seasons",
                        "networks"
                    ],
                    "game_and_software": [
                        "platforms",
                        "stores",
                        "playtime_hours",
                        "version",
                        "licenses",
                        "source_code_url",
                        "download_url"
                    ],
                    "music": [
                        "tracks",
                        "formats",
                        "catalog_numbers",
                        "barcode",
                        "music_type",
                        "track_count",
                        "number_of_discs",
                        "release_country"
                    ],
                    "book": [
                        "isbns",
                        "page_count",
                        "edition_count"
                    ]
                },
                "headers": {
                    "X-API-Version": "media_api_v20"
                }
            },
            "details": {
                "Media types": "game, movie, tv, book, music, software",
                "Lookup": "query searches titles, books with authors, or combined music terms",
                "Optional parameters": "language (default en-US), page and year (search only), debug=1",
                "Returns": "items array with consistent fields, pagination and cache status"
            },
            "notes": [
                "Use query for every category. The id parameter is rejected, including when supplied with query.",
                "For combined searches, every meaningful term must match available title or related metadata; articles such as a, an and the are ignored.",
                "Prefer plain search text. Quote phrases when useful. Do not assume every category supports the same advanced search syntax.",
                "All categories use the same item fields. Unknown scalar values are null and collections are arrays, including when empty.",
                "Ratings use rating_scale; runtime_minutes and playtime_hours use different units.",
                "Use total_results and total_pages to paginate; an empty page is not a failed request.",
                "Results normally cache for seven days; TV caches for one hour. Empty results and incomplete details refresh sooner."
            ],
            "examples": [
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?type=movie&query=Inception&year=2010"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?type=tv&query=Breaking%20Bad"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?type=game&query=The%20Witcher%203"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?type=music&query=Nirvana%20Come%20As%20You%20Are"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?type=book&query=The%20Hobbit%20Tolkien%201937"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?type=software&query=VLC%20VideoLAN"
                }
            ]
        }
    ],
    "result": true,
    "error": false,
    "error_message": "",
    "server_time": 1791673070
}