# Packagist Scraper — PHP Composer Packages & Downloads (`hipersoft/packagist-scraper`) Actor

Look up exact PHP Composer packages or search Packagist in bulk and get clean structured data: latest version, total/monthly/daily downloads, favers, type, license, authors, requirements, repository and homepage. Built for dependency audits, dev tooling and n8n.

- **URL**: https://apify.com/hipersoft/packagist-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0005 / package scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Packagist Scraper — PHP Composer Package Metadata, Versions, Downloads & Requirements

Look up exact PHP Composer packages by name or search Packagist in bulk and get back clean, structured JSON for every package: latest version, total, monthly and daily download counts, favers, package type, license, authors, requirements, and repository and homepage links. Built for PHP developers, dependency auditors and OSS analysts who need reliable, ready-to-use Composer package data. Export to JSON, CSV or Excel.

### Features

- 🎯 **Exact lookups** — pass precise `vendor/name` packages like `monolog/monolog`, `guzzlehttp/guzzle` or `symfony/console` and get one clean record each.
- 🔎 **Bulk search** — run a free-text query (`http client`, `logging`, `orm`) and collect matching packages up to your limit.
- 📊 **Download metrics** — capture `total`, `monthly` and `daily` downloads plus `favers` for popularity and trend analysis.
- 🧾 **Licenses & requirements** — every record includes `license`, `type` and the latest version's `requires` map for fast auditing.
- 🔗 **Ready-to-use links** — `repository`, `homepage` and the canonical Packagist `url`.
- 🧩 **Integrations** — plug the output straight into n8n, Make, Zapier and more.
- ⚙️ **Reliable by design** — retry-with-backoff and graceful handling of missing packages so runs finish cleanly.

### What you get

Each package becomes one clean JSON record.

```json
{
  "name": "monolog/monolog",
  "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
  "latestVersion": "3.10.0",
  "downloads": { "total": 1051647307, "monthly": 18488587, "daily": 337950 },
  "favers": 22272,
  "repository": "https://github.com/Seldaek/monolog",
  "type": "library",
  "license": ["MIT"],
  "authors": ["Jordi Boggiano"],
  "requires": { "php": ">=8.1", "psr/log": "^2.0 || ^3.0" },
  "homepage": "https://github.com/Seldaek/monolog",
  "url": "https://packagist.org/packages/monolog/monolog",
  "ok": true
}
```

#### Output schema

| Field | Type | Description |
| --- | --- | --- |
| `name` | string | Package name in `vendor/name` form. |
| `description` | string | Package description / summary. |
| `latestVersion` | string | Latest published version. |
| `downloads` | object | Download counts: `total`, `monthly` and `daily`. |
| `favers` | integer | Number of users who favorited the package. |
| `repository` | string (URL) | Source repository URL. |
| `type` | string | Composer package type (e.g. `library`, `symfony-bundle`). |
| `license` | array | SPDX license identifiers. |
| `authors` | array | Package author names. |
| `requires` | object | Requirements of the latest version (package → version constraint). |
| `homepage` | string (URL) | Project homepage. |
| `url` | string (URL) | Canonical Packagist page for the package. |
| `ok` | boolean | `true` for a fetched package; `false` with an `error` for one that could not be found. |

### Input

```json
{
  "packages": ["monolog/monolog", "guzzlehttp/guzzle", "symfony/console"],
  "search": "http client",
  "maxItems": 100
}
```

| Field | Description |
|-------|-------------|
| `packages` | Exact `vendor/name` packages to look up. Always fetched, in addition to any search results. |
| `search` | Free-text query matching package name and description. Matches are collected up to `maxItems`. |
| `maxItems` | Maximum number of packages to collect from the search query (1–5000). |

Provide `packages`, `search`, or both in a single run.

### Use cases

- Audit the licenses and requirements of the packages in your `composer.json` before shipping.
- Track download momentum to compare competing packages in a category.
- Build a catalog of packages for a topic (e.g. HTTP clients) for research or content.
- Enrich an internal dependency dashboard with versions, descriptions and repo links.

### Pricing

Pay-per-event: you're billed a small amount per package scraped — you only pay for what you get. See the **Pricing** tab for current rates.

### FAQ

**How many packages can I scrape per run?**
Add any number of exact `vendor/name` packages in the `packages` field and collect up to `maxItems` (5000) more from a search query — all in one run.

**What's the output format?**
Structured JSON — one record per package with fields such as `latestVersion`, `downloads`, `favers`, `type`, `license`, `authors` and `requires`. Export as JSON, CSV, Excel or via the API.

**What happens to a package name that doesn't exist?**
It's returned as a record with `ok: false` and an `error`, so a typo never breaks the run — every other package is still scraped.

**Can I use this with n8n?**
Yes. Run the actor from the [Apify node for n8n](https://docs.apify.com/platform/integrations/n8n) and map the package records straight into your workflow — enrich a dependency list, trigger alerts on new versions, or sync package data into a database or spreadsheet.

**Can I connect this Actor to other apps?**
The Packagist Scraper works with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations): [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

### Related Actors

Tracking packages across ecosystems? Pair this with our other developer-data scrapers:

- [npm Package Scraper](https://apify.com/hipersoft/npm-scraper) — search and look up npm packages with metadata, dependencies and downloads.
- [PyPI Package Scraper](https://apify.com/hipersoft/pypi-scraper) — metadata, dependencies, licenses and downloads for Python packages.
- [RubyGems Scraper](https://apify.com/hipersoft/rubygems-scraper) — Ruby gems with downloads, versions, licenses and dependencies.
- [crates.io Scraper](https://apify.com/hipersoft/crates-scraper) — Rust crates with downloads, versions, license and repository links.

### Notes

This actor reads only publicly available package data from Packagist. It is an independent tool and is not affiliated with, endorsed by, or sponsored by Packagist, Composer or their maintainers; "Packagist" and "Composer" are trademarks of their respective owners. Original clean-room implementation.

# Actor input Schema

## `packages` (type: `array`):

Look up specific PHP Composer packages by their exact "vendor/name", e.g. "monolog/monolog", "guzzlehttp/guzzle", "symfony/console". Combined with any search results in the same run.

## `search` (type: `string`):

Free-text Packagist search (matches package name and description), e.g. "http client". Matching packages are collected up to Max items.

## `maxItems` (type: `integer`):

Maximum number of packages to collect from the search query. Exact package names above are always fetched in addition to this.

## Actor input object example

```json
{
  "packages": [
    "monolog/monolog",
    "guzzlehttp/guzzle",
    "symfony/console"
  ],
  "search": "http client",
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

The results as dataset items.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "packages": [
        "monolog/monolog",
        "guzzlehttp/guzzle"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/packagist-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "packages": [
        "monolog/monolog",
        "guzzlehttp/guzzle",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/packagist-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "packages": [
    "monolog/monolog",
    "guzzlehttp/guzzle"
  ]
}' |
apify call hipersoft/packagist-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/packagist-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/S8IMM3dGaJg7UeOxg/builds/r0bcqiARYKcFPuzYA/openapi.json
