Skip to main content
POST
/
api
/
packagist
/
packages
/
search
/packagist/packages/search
curl --request POST \
  --url https://api.anysite.io/api/packagist/packages/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "query": "<string>",
  "count": 2,
  "timeout": 300,
  "tags": "psr-3",
  "package_type": "library"
}
'
[
  {
    "name": "<string>",
    "@type": "PackagistSearchResult",
    "description": "<string>",
    "repository_url": "<string>",
    "download_count": 0,
    "favorite_count": 0,
    "is_virtual": false,
    "is_abandoned": false,
    "abandoned_replacement": "<string>",
    "web_url": ""
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
query
string
required

Search query for packages

Minimum string length: 1
Examples:

"monolog"

"http client"

count
integer
required

Number of packages to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
tags
string | null

Filter results by a tag/keyword

Example:

"psr-3"

package_type
string | null

Filter results by Composer package type (free-form; any composer.json type is accepted)

Example:

"library"

Response

Successful Response

name
string
required
@type
string
default:PackagistSearchResult
description
string | null
repository_url
string | null
download_count
integer
default:0
favorite_count
integer
default:0
is_virtual
boolean
default:false
is_abandoned
boolean
default:false
abandoned_replacement
string | null
web_url
string
default:""