Zum Inhalt springen
GET /v1/meta

Spec

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/negotiate-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/negotiate-api/v1/meta" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/negotiate-api/v1/meta", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/negotiate-api/v1/meta");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/negotiate-api/v1/meta",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "name": "Content Negotiation API",
        "notes": "Languages use RFC 4647 prefix matching; media types honour type and subtype wildcards. When nothing is acceptable, best is null. This negotiates HTTP headers — to validate or decompose a single BCP-47 language tag use a BCP-47 API. Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/parse",
                "params": {
                    "header": "an Accept-style header value (required)"
                },
                "returns": "the accepted values ranked by quality"
            },
            {
                "path": "/v1/negotiate",
                "params": {
                    "type": "language (default), mediatype, encoding, charset or generic",
                    "header": "the Accept-style header (required)",
                    "supported": "the values you can serve — list or comma/space separated (required)"
                },
                "returns": "the best match and the full ranked result"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "HTTP content negotiation. The parse endpoint reads an Accept, Accept-Language, Accept-Encoding or Accept-Charset header — with quality (q) values and parameters — into a clean list ranked by preference. The negotiate endpoint takes that header plus the list of values your server can actually serve and returns the single best match (and the full ranked result), using the right rules for each kind: media-type wildcards (text/*, */*), RFC 4647 language-range matching (en matches en-US, and en-US falls back to en), and exact matching with * for encodings and charsets. A q=0 entry correctly rejects a value. Pure local, no key."
    },
    "meta": {
        "timestamp": "2026-06-03T09:25:04.463Z",
        "request_id": "94e5a587-12c3-41bf-b2e2-5c8671f134f5"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}