About this API
Packagist is the main public registry for PHP Composer packages. This API runs its package search and returns a record for each result: the package name, its description and the link to its page.
Send the text to search for in q. Follow the package link for versions, requirements and download counts.
Typical uses
- Find PHP packages for a task by keyword.
- Collect package links for the libraries a project depends on.
- Track which packages a search returns over time.
What you get
| Field | Type | Sample value |
|---|---|---|
name |
string | symfony/console |
description |
string | Eases the creation of beautiful and testable command line interfaces |
url |
string | packagist.org/packages/symfony/console |
All 6 fields
Key fields
namedescriptionurl
Technical fields
downloadsfaversrepository
Every field with its type, and the schemas, are in contract.json.
Sample records
2 saved records. This is a saved sample, not a live run.
name |
description |
url |
|---|---|---|
| symfony/console | Eases the creation of beautiful and testable command line interfaces | packagist.org/packages/symfony/console |
| symfony/polyfill-php80 | Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions | packagist.org/packages/symfony/polyfill-p… |
Scroll sideways to see more columns.
Inputs
-
qstring · requiredOptional. Free text for the page's own "q" box, sent as its query key exactly as typed. Omit it for the page's own records. Default: symfony.
Request
POST https://api.cleanedweb.com/v1/catalog/public/apis/generated_f85e54f9e882678465d75f31/endpoints/generated_f85e54f9e882678465d75f31_search/run
curl -X POST https://api.cleanedweb.com/v1/catalog/public/apis/generated_f85e54f9e882678465d75f31/endpoints/generated_f85e54f9e882678465d75f31_search/run \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: UNIQUE_REQUEST_ID" \
-H "Content-Type: application/json" \
-d '{
"input": {
"q": "symfony"
},
"version": 1,
"max_items": 25
}'
Save the Idempotency-Key before you send, and reuse it only to retry the same request. The key needs the run scope. See Run a catalog API.
version pins major v1, whose newest minor (1.2) answers. Leave it out and the call runs on the latest major.
Changelog
-
v1.2 ·
-
v1.1 ·
-
v1.0 (major) ·
Use it from an AI agent
Open in your coding agent
Add CleanedWeb to your agent as an MCP server, such as a custom connector in Claude or ChatGPT, then sign in with your CleanedWeb account. The agent can then find this API, run it and read the records. An API key with the read and run scopes works too.
https://api.cleanedweb.com/mcp?profile=catalog
Then ask, for example: Use CleanedWeb to get 25 records from the Packagist PHP Package Search API.
The agent calls get_api with generated_f85e54f9e882678465d75f31, then run_api. Runs are charged like any other run. See Connect an MCP client.
Coverage
- Category
- Public data
- Languages
- English
Reach. A run reads until the source ends or your max_items, timeout_seconds or budget stops it.
CleanedWeb is not affiliated with Packagist.