{
    "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": "ipdb_api",
            "method": "GET",
            "path": "/ipdb_api",
            "description": "IP geolocation and network intelligence lookup for country, city and ASN/network information.",
            "instructions_url": "https://c7dev.com/api_instructions?api=ipdb_api",
            "request": {
                "parameter_location": "query",
                "parameters": {
                    "provider": {
                        "type": "string",
                        "required": false,
                        "description": "Database-set identifier returned by the discovery request; required for a lookup or download."
                    },
                    "ip": {
                        "type": "string",
                        "required": false,
                        "description": "IPv4 or IPv6 address for lookup."
                    },
                    "type": {
                        "type": "string",
                        "required": false,
                        "description": "Database file to download.",
                        "enum": [
                            "country",
                            "city",
                            "asn"
                        ]
                    }
                }
            },
            "response": {
                "format": "application/json",
                "headers": {
                    "X-API-Version": "ipdb_api_v1"
                }
            },
            "details": {
                "Lookup parameters": "provider and ip",
                "Database file parameters": "provider and type",
                "Database types": "country, city and asn (availability depends on the selected database set)",
                "Returns": "IP, country/country_name, continent, city, states, ASN, ASN number/domain and network",
                "Discovery": "Call /ipdb_api without parameters to inspect available database sets and their current files."
            },
            "notes": [
                "GET without parameters lists available database sets. Use a returned identifier instead of inventing one.",
                "provider plus ip returns JSON geolocation/network information; provider plus type streams a database file.",
                "With provider only, the response lists that database set's files."
            ],
            "examples": [
                {
                    "method": "GET",
                    "url": "https://c7dev.com/ipdb_api"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/ipdb_api?provider=DATABASE_SET_FROM_DISCOVERY&ip=8.8.8.8"
                }
            ]
        }
    ],
    "result": true,
    "error": false,
    "error_message": "",
    "server_time": 1791673047
}