Aller au contenu
GET /v1/image

One file by name

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/commons-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

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

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "file": {
            "date": "2026-05-28",
            "mime": "image/jpeg",
            "title": "Example.jpg",
            "width": 172,
            "author": "",
            "credit": "Own work",
            "height": 178,
            "license": "Public domain",
            "page_url": "https://commons.wikimedia.org/wiki/File:Example.jpg",
            "image_url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg",
            "categories": "PD ineligible|PD text|Protected files|Vector version available|Example images|Commons prohibited file names|English-language image placeholders|PD-text missing SDC copyright status",
            "size_bytes": 9022,
            "license_url": null,
            "thumbnail_url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg"
        }
    },
    "meta": {
        "timestamp": "2026-05-31T11:06:35.152Z",
        "request_id": "23c0a66f-a2d3-468e-85c2-d81522a2bddf"
    },
    "status": "ok",
    "message": "File retrieved",
    "success": true
}