Vai al contenuto
GET /v1/search

Search the registry

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/packagist-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

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

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "page": 1,
        "count": 20,
        "limit": 20,
        "query": "http",
        "total": 11311,
        "results": [
            {
                "url": "https://packagist.org/packages/guzzlehttp/guzzle",
                "name": "guzzlehttp/guzzle",
                "favers": 24297,
                "downloads": 1026009839,
                "repository": "https://github.com/guzzle/guzzle",
                "description": "Guzzle is a PHP HTTP client library"
            },
            {
                "url": "https://packagist.org/packages/psr/http-message",
                "name": "psr/http-message",
                "favers": 7131,
                "downloads": 1063161505,
                "repository": "https://github.com/php-fig/http-message",
                "description": "Common interface for HTTP messages"
            },
            {
                "url": "https://packagist.org/packages/symfony/http-kernel",
                "name": "symfony/http-kernel",
                "favers": 8141,
                "downloads": 852919438,
                "repository": "https://github.com/symfony/http-kernel",
                "description": "Provides a structured process for converting a Request into a Response"
            },
            {
                "url": "https://packagist.org/packages/symfony/http-foundation",
                "name": "symfony/http-foundation",
                "favers": 8709,
                "downloads": 909811841,
                "repository": "https://github.com/symfony/http-foundation",
                "description": "Defines an object-oriented layer for the HTTP specification"
            },
            {
                "url": "https://packagist.org/packages/guzzlehttp/psr7",
                "name": "guzzlehttp/psr7",
                "favers": 8007,
                "downloads": 1051975599,
                "repository": "https://github.com/guzzle/psr7",
                "description": "PSR-7 message implementation that also provides common utility methods"
            },
            {
                "url": "https://packagist.org/packages/symfony/routing",
                "name": "symfony/routing",
                "favers": 7694,
                "downloads": 819274081,
                "repository": "https://github.com/symfony/routing",
                "description": "Maps an HTTP request to a set of configuration variables"
            },
            {
                "url": "https://packagist.org/packages/mobiledetect/mobiledetectlib",
                "name": "mobiledetect/mobiledetectlib",
                "favers": 10780,
                "downloads": 166883076,
                "repository": "https://github.com/serbanghita/Mobile-Detect",
                "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment."
            },
            {
                "url": "https:
…