Aller au contenu
GET /v1/search

Search the CPAN registry

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/cpan-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/cpan-api/v1/search" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/cpan-api/v1/search", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/cpan-api/v1/search");
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/cpan-api/v1/search",
    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": {
        "count": 20,
        "query": "JSON",
        "results": [
            {
                "name": "JSON",
                "score": 15.940096,
                "author": "ISHIGAKI",
                "version": "4.11",
                "abstract": "JSON (JavaScript Object Notation) encoder/decoder",
                "metacpan_url": "https://metacpan.org/release/JSON"
            },
            {
                "name": "SPVM-JSON",
                "score": 12.457367,
                "author": "KIMOTO",
                "version": "1.003",
                "abstract": "JSON",
                "metacpan_url": "https://metacpan.org/release/SPVM-JSON"
            },
            {
                "name": "JSON-TinyValidatorV4",
                "score": 8.84754,
                "author": "MILA",
                "version": "0.003",
                "abstract": "JSON Validator for v4 JSON Schema",
                "metacpan_url": "https://metacpan.org/release/JSON-TinyValidatorV4"
            },
            {
                "name": "JSON-Create",
                "score": 8.7672205,
                "author": "BKB",
                "version": "0.36",
                "abstract": "Create JSON",
                "metacpan_url": "https://metacpan.org/release/JSON-Create"
            },
            {
                "name": "App-jt",
                "score": 8.7672205,
                "author": "GUGOD",
                "version": "0.43",
                "abstract": "JSON transformer",
                "metacpan_url": "https://metacpan.org/release/App-jt"
            },
            {
                "name": "JSON-Parse",
                "score": 8.7672205,
                "author": "BKB",
                "version": "0.62",
                "abstract": "Parse JSON",
                "metacpan_url": "https://metacpan.org/release/JSON-Parse"
            },
            {
                "name": "App-jl",
                "score": 8.574889,
                "author": "BAYASHI",
                "version": "0.20",
                "abstract": "Show the \"JSON in JSON\" Log Nicely",
                "metacpan_url": "https://metacpan.org/release/App-jl"
            },
            {
                "name": "App-JYJ",
                "score": 8.574889,
                "author": "INGY",
                "version": "0.0.2",
                "abstract": "Convert JSON to YAML to JSON to...",
                "metacpan_url": "https://metacpan.org/release/App-JYJ"
            },
            {
                "name": "Mojo-Response-JSON-Path",
                "score": 8.574889,
                "author": "SCESANO",
                "version": "0.004",
                "abstract": "use JSON::Path for searching JSON responses",
                "metacpan_url": "https://metacpan.org/release/Mojo-Response-JSON-Path"
            },
            {
                "name": "JSON-MaybeXS",
                "score": 8.346705,
                "author": "ETHER",
                "version": "1.004
…