Zum Inhalt springen
GET /v1/fruit

A single fruit by name

Live testen

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

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

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

API-Key holen

Code-Snippets

curl "https://api.oanor.com/fruit-api/v1/fruit" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/fruit-api/v1/fruit", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/fruit-api/v1/fruit");
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/fruit-api/v1/fruit",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

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

{
    "data": {
        "fruit": {
            "id": 1,
            "name": "Banana",
            "genus": "Musa",
            "order": "Zingiberales",
            "family": "Musaceae",
            "nutritions": {
                "fat": 0.2,
                "sugar": 17.2,
                "protein": 1,
                "calories": 96,
                "carbohydrates": 22
            }
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:19:02.035Z",
        "request_id": "72477617-7fa9-4c5a-8123-d5a43c18c99d"
    },
    "status": "ok",
    "message": "Fruit retrieved successfully",
    "success": true
}