Packagist PHP Package Scraper avatar

Packagist PHP Package Scraper

Pricing

$1.00 / 1,000 item scrapeds

Go to Apify Store
Packagist PHP Package Scraper

Packagist PHP Package Scraper

Get Composer/PHP package metadata from Packagist: downloads, stars, latest version, license, dependencies.

Pricing

$1.00 / 1,000 item scrapeds

Rating

0.0

(0)

Developer

Gio

Gio

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Share

Looks up Composer packages on Packagist.org and returns their public metadata: description, repository, GitHub stars, forks and open issues, download counts (total, monthly, daily), favers, latest stable version, PHP requirement, license, version count and abandoned flag. Useful for dependency audits, library comparisons and tracking package popularity.

Features

  • Accepts a single package or a packages list (duplicates removed, case insensitive)
  • Reads the public Packagist JSON endpoint, no browser and no proxy needed
  • Picks the latest version whose name does not contain dev, falling back to the first listed version
  • Returns the PHP requirement and license of that version
  • maxItems caps how many packages are processed (1 to 100)
  • Retries failed requests up to 4 times with increasing delay

Input

FieldTypeRequired / defaultDescription
packagestringoptional (prefill monolog/monolog)Composer package name in vendor/name form
packagesarray of stringsoptionalMultiple package names
maxItemsintegerdefault 20, min 1, max 100Maximum number of packages to process

At least one package must be provided, otherwise the run pushes a warning item and exits.

Example input:

{
"package": "monolog/monolog",
"maxItems": 20
}

Output

One dataset item per package:

  • name - package name
  • description - package description, or null
  • type - Composer package type (for example library), or null
  • repository - source repository URL, or null
  • githubStars - GitHub stars, or null
  • githubWatchers - GitHub watchers, or null
  • githubForks - GitHub forks, or null
  • githubOpenIssues - open GitHub issues, or null
  • downloadsTotal - total downloads, or null
  • downloadsMonthly - downloads in the last month, or null
  • downloadsDaily - downloads in the last day, or null
  • favers - number of Packagist favers, or null
  • latestVersion - latest non-dev version name, or null
  • latestVersionRequirePhp - PHP constraint of that version, or null
  • license - license list of that version, or the package license, or null
  • versionsCount - number of versions listed on Packagist
  • abandoned - false, true, or the name of the replacement package
  • scrapedAt - ISO timestamp of the extraction

Packages that cannot be fetched produce an item with package and error.

{
"name": "monolog/monolog",
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"type": "library",
"repository": "https://github.com/Seldaek/monolog",
"githubStars": 21000,
"githubWatchers": 21000,
"githubForks": 1900,
"githubOpenIssues": 40,
"downloadsTotal": 900000000,
"downloadsMonthly": 25000000,
"downloadsDaily": 900000,
"favers": 6000,
"latestVersion": "3.7.0",
"latestVersionRequirePhp": ">=8.1",
"license": ["MIT"],
"versionsCount": 120,
"abandoned": false,
"scrapedAt": "2026-09-10T12:00:00.000Z"
}

Pricing

Pay per event. The Actor charges the item-scraped event ("Item scraped") at $0.001 per package item successfully returned. Error and warning items are not charged. There is no separate Actor start fee.

Free plan

The Actor checks whether the run belongs to a paying Apify account. On the free plan maxItems is capped at 10 per run, so free users receive up to 10 real items to inspect the output format. Larger runs require a paid Apify plan.

Usage

From the Apify console, type a package name into package (or several into packages) and click Start.

Via API:

curl -X POST "https://api.apify.com/v2/acts/gio21~packagist-php-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"package": "monolog/monolog", "maxItems": 20}'

Limitations

  • Exact package names only, there is no keyword search
  • The dependency list (require) is not returned, only the PHP version constraint
  • Version ordering follows the order in the Packagist response, so latestVersion is the first non-dev entry, not a semver comparison
  • GitHub statistics are only present when Packagist has them for the package
  • Packages are processed one at a time, subject to Packagist rate limits

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Packagist or any of its subsidiaries. All trademarks mentioned are the property of their respective owners.