{
    "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 or browse ranked lists of movies, TV shows, games and books.",
            "instructions_url": "https://c7dev.com/api_instructions?api=media_api",
            "request": {
                "parameter_location": "query",
                "parameters": {
                    "type": {
                        "type": "string",
                        "required": true,
                        "description": "Media category.",
                        "enum": [
                            "game",
                            "movie",
                            "tv",
                            "book",
                            "music",
                            "software"
                        ]
                    },
                    "action": {
                        "type": "string",
                        "required": false,
                        "description": "Requested operation.",
                        "default": "search",
                        "enum": [
                            "search",
                            "list"
                        ]
                    },
                    "query": {
                        "type": "string",
                        "required": false,
                        "description": "Required for search. Include a title and any artist, author, developer, publisher or release-year terms."
                    },
                    "list_type": {
                        "type": "string",
                        "required": false,
                        "description": "Required for list. Supported values depend on the media category.",
                        "enum": [
                            "popular",
                            "top_rated",
                            "trending",
                            "recent",
                            "upcoming",
                            "releases",
                            "works"
                        ]
                    },
                    "provider": {
                        "type": "string",
                        "required": false,
                        "description": "Pin the request to a source that supports the requested media category and operation."
                    },
                    "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 for search.",
                        "pattern": "^[1-9][0-9]{3}$"
                    },
                    "country": {
                        "type": "string",
                        "required": false,
                        "description": "Required for music charts. Two-letter country code.",
                        "pattern": "^[A-Za-z]{2}$"
                    },
                    "kind": {
                        "type": "string",
                        "required": false,
                        "description": "Set for an artist or author name search.",
                        "enum": [
                            "artist",
                            "author"
                        ]
                    },
                    "parent_id": {
                        "type": "string",
                        "required": false,
                        "description": "The item ID from an artist or author search. Use it to list releases or works."
                    },
                    "debug": {
                        "type": "string",
                        "required": false,
                        "description": "Set to 1 for request diagnostics; omit for ordinary requests.",
                        "enum": [
                            "0",
                            "1"
                        ]
                    }
                },
                "required_by_action": {
                    "search": [
                        "query"
                    ],
                    "list": [
                        "list_type"
                    ]
                }
            },
            "response": {
                "format": "application/json",
                "response_fields": [
                    "items",
                    "type",
                    "action",
                    "provider",
                    "query",
                    "list_type",
                    "language",
                    "page",
                    "total_pages",
                    "total_results",
                    "warnings",
                    "kind",
                    "parent_id",
                    "parent",
                    "exact_id",
                    "cached",
                    "request_time"
                ],
                "item_fields": {
                    "identity": [
                        "id",
                        "provider",
                        "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",
                        "track_artist"
                    ],
                    "book": [
                        "isbns",
                        "page_count",
                        "edition_count"
                    ]
                },
                "headers": {
                    "X-API-Version": "media_api_v24"
                }
            },
            "details": {
                "Media types": "game, movie, tv, book, music, software",
                "Search": "Use query to search titles and related terms such as authors or artists",
                "Lists": "Use action=list and list_type to browse popular, top rated, trending or upcoming media, or recent TV premieres",
                "Optional parameters": "language (default en-US), page, year (search only), debug=1",
                "Returns": "items array with consistent fields, pagination and cache status"
            },
            "notes": [
                "Use query for searches in every category. The id parameter is rejected.",
                "For artist and author searches, use kind=artist with type=music or kind=author with type=book. An exact unambiguous match has exact_id. Use that item ID as parent_id with list_type=releases or list_type=works.",
                "Music popular returns the most-played songs for the requested country. It has one page and preserves the chart order.",
                "Plain queries are cleaned before parsing: release filenames, scene groups, codecs, quality tags and episode labels are removed while title text and release years are kept. The response query contains the cleaned search text.",
                "Results on each page prefer exact and closest title matches, including original and alternative titles. Years in parentheses or brackets help rank title matches; use the year parameter for a strict release-year filter.",
                "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.",
                "Movies and games support popular, top_rated, trending and upcoming. TV also supports recent. Books support popular, top_rated and trending.",
                "Use list_type with action=list. Lists preserve the source ranking and return summary metadata. The query and year parameters are reserved for searches.",
                "TV recent ranks series premieres from the past 90 calendar days, including today, by popularity. Upcoming orders releases or TV premieres from the next 90 calendar days by date. Dates are UTC.",
                "Movie and TV trending uses the weekly chart. Game popularity uses the number of library adds, and game top_rated uses the critic score in metacritic. Book popularity uses want-to-read counts, book top_rated requires at least 25 ratings, and book trending uses recent growth in reader activity.",
                "Game trending uses the Steam weekly chart ranked by peak concurrent players. Game IDs on this chart are Steam app IDs, and rating is the percentage of positive Steam reviews expressed on the 10-point scale.",
                "Searches normally cache for seven days. Lists and TV searches cache for up to 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?action=list&type=music&list_type=popular&country=lt"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?action=search&type=music&kind=artist&query=Nirvana"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?action=search&type=book&kind=author&query=Ursula%20K.%20Le%20Guin"
                },
                {
                    "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"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?action=list&type=movie&list_type=trending"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?action=list&type=game&list_type=trending"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?action=list&type=game&list_type=top_rated&page=2"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/media_api?action=list&type=book&list_type=trending"
                }
            ]
        }
    ],
    "result": true,
    "error": false,
    "error_message": "",
    "server_time": 1796435391
}