Packagist website screenshot

Packagist

Packagist is the default package repository for Composer, the PHP dependency manager. It indexes over 454,000 open-source PHP packages — versions, dependencies, maintainers, download statistics, security advisories — and exposes them through a free public HTTP API plus a high-throughput static Composer v2 metadata mirror at repo.packagist.org. Packagist is MIT-licensed open source (composer/packagist on GitHub) and is operated by the Composer team, with funding from Private Packagist (the commercial hosted/self-hosted sibling product at packagist.com) and infrastructure sponsorships from Bunny.net and Aikido. Together with the Composer CLI, the SemVer library, the SPDX licenses helper, and the Satis static repository generator, Packagist anchors PHP's modern software supply chain.

1 APIs 12 Features
ComposerPHPPackage RegistryDependency ManagementOpen SourceDeveloper ToolsSoftware Supply ChainSecurity Advisories

APIs

Packagist API

The Packagist API exposes the public PHP Composer package registry — over 454,000 packages and 5.58 million versions backing more than 181 billion installs since 2012. Read endp...

Collections

Pricing Plans

Packagist Plans Pricing

3 plans

PLANS

Rate Limits

Packagist Rate Limits

0 limits

RATE LIMITS

Features

454,128 packages, 5.58 million versions, 181 billion+ installs since April 2012
Default Composer package repository for the PHP ecosystem
Static Composer v2 metadata mirror at repo.packagist.org with long-lived caching
Bearer token auth with SAFE (read/update) and MAIN (create/edit) token classes
24-hour rolling change feed for mirror operators and dependency scanners
Security advisories API aggregating FriendsOfPHP, GitHub Advisory Database, and PSA sources
Webhook-driven auto-updates from GitHub, Bitbucket, GitLab, and Gitea
Algolia-powered package search across name, tags, and type
Per-package and per-version download statistics
Commercial sibling Private Packagist for private/hosted/self-hosted Composer repositories
MIT-licensed open source codebase (composer/packagist) — operated, not designed for reuse
Funded by Private Packagist subscriptions plus Bunny.net (CDN) and Aikido (security) sponsorships

Semantic Vocabularies

Packagist Context

35 classes · 4 properties

JSON-LD

API Governance Rules

Packagist API Rules

5 rules · 1 errors 3 warnings 1 info

SPECTRAL

JSON Structure

Packagist Package Structure

0 properties

JSON STRUCTURE

Example Payloads

Packagist Search Example

2 fields

EXAMPLE

Resources

🌐
Portal
Portal
🔗
Documentation
Documentation
🔗
Documentation
Documentation
🔗
About
About
🔗
Statistics
Statistics
👥
GitHubOrganization
GitHubOrganization
👥
GitHubRepository
GitHubRepository
👥
GitHubRepository
GitHubRepository
👥
GitHubRepository
GitHubRepository
👥
GitHubRepository
GitHubRepository
👥
GitHubRepository
GitHubRepository
👥
GitHubRepository
GitHubRepository
👥
GitHubRepository
GitHubRepository
👥
GitHubRepository
GitHubRepository
👥
GitHubRepository
GitHubRepository
🔧
Tools
Tools
🔧
Tools
Tools
🔗
Documentation
Documentation
🔗
Documentation
Documentation
🔗
Documentation
Documentation
🔗
Documentation
Documentation
🔑
Authentication
Authentication
📝
Signup
Signup
🔗
Login
Login
🔗
APIKeys
APIKeys
🔗
SecurityAdvisories
SecurityAdvisories
🔗
SecurityAdvisories
SecurityAdvisories
🔗
Mirror
Mirror
🔗
Sandbox
Sandbox
📜
PrivacyPolicy
PrivacyPolicy
📜
TermsOfService
TermsOfService
🔗
License
License
📰
Blog
Blog
🔗
Forums
Forums
🔗
Issues
Issues
🔗
Plans
Plans
🔗
RateLimits
RateLimits

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: Packagist API
  version: '1.0'
items:
- info:
    name: Packages
    type: folder
  items:
  - info:
      name: List Packages
      type: http
    http:
      method: GET
      url: https://packagist.org/packages/list.json
      params:
      - name: vendor
        value: ''
        type: query
        description: Filter by vendor name.
      - name: type
        value: ''
        type: query
        description: Filter by Composer package type (library, project, metapackage, composer-plugin).
      - name: fields[]
        value: ''
        type: query
        description: Extra fields to include for each package.
    docs: List all packages, optionally filtered by vendor or type.
  - info:
      name: Get Popular Packages
      type: http
    http:
      method: GET
      url: https://packagist.org/explore/popular.json
      params:
      - name: per_page
        value: ''
        type: query
      - name: page
        value: ''
        type: query
    docs: Get the most popular packages ranked by recent weekly downloads.
  - info:
      name: Get Package
      type: http
    http:
      method: GET
      url: https://packagist.org/packages/:vendor/:package.json
      params:
      - name: vendor
        value: ''
        type: path
      - name: package
        value: ''
        type: path
    docs: Retrieve full package data including all versions, maintainers, downloads, and dependents. Cached for 12 hours.
  - info:
      name: Create Package
      type: http
    http:
      method: POST
      url: https://packagist.org/api/create-package
      body:
        type: json
        data: '{}'
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Submit a new package by its source repository URL.
  - info:
      name: Edit Package URL
      type: http
    http:
      method: PUT
      url: https://packagist.org/api/packages/:package
      params:
      - name: package
        value: ''
        type: path
        description: Full package name (vendor/package).
      body:
        type: json
        data: '{}'
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Update the source repository URL of an existing package.
  - info:
      name: Update Package Metadata
      type: http
    http:
      method: POST
      url: https://packagist.org/api/update-package
      body:
        type: json
        data: '{}'
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Trigger a re-crawl of a package's repository to refresh its metadata. SAFE token sufficient.
- info:
    name: Search
    type: folder
  items:
  - info:
      name: Search Packages
      type: http
    http:
      method: GET
      url: https://packagist.org/search.json
      params:
      - name: q
        value: ''
        type: query
        description: Free-text search query.
      - name: tags
        value: ''
        type: query
        description: Filter results by tag.
      - name: type
        value: ''
        type: query
        description: Filter results by Composer package type.
      - name: per_page
        value: ''
        type: query
        description: Results per page (default 15, max 100).
      - name: page
        value: ''
        type: query
        description: Page number.
    docs: Search Packagist by name, tag, or type. Results are paginated.
- info:
    name: Metadata
    type: folder
  items:
  - info:
      name: Get Package Metadata (Composer v2)
      type: http
    http:
      method: GET
      url: https://packagist.org/p2/:vendor/:package.json
      params:
      - name: vendor
        value: ''
        type: path
      - name: package
        value: ''
        type: path
    docs: 'Static Composer v2 metadata. Preferred endpoint for dependency resolvers — served

      from repo.packagist.org with long-lived caching.

      '
  - info:
      name: Get Package Dev Metadata (Composer v2)
      type: http
    http:
      method: GET
      url: https://packagist.org/p2/:vendor/:package~dev.json
      params:
      - name: vendor
        value: ''
        type: path
      - name: package
        value: ''
        type: path
    docs: Composer v2 metadata for dev branches (development releases).
  - info:
      name: Get Metadata Changes
      type: http
    http:
      method: GET
      url: https://packagist.org/metadata/changes.json
      params:
      - name: since
        value: ''
        type: query
        description: Unix timestamp (milliseconds) to fetch changes since.
    docs: Stream package metadata changes since a given timestamp. Retained for 24 hours only.
- info:
    name: Statistics
    type: folder
  items:
  - info:
      name: Get Package Download Statistics
      type: http
    http:
      method: GET
      url: https://packagist.org/packages/:vendor/:package/stats.json
      params:
      - name: vendor
        value: ''
        type: path
      - name: package
        value: ''
        type: path
    docs: Get per-version and aggregate download statistics for a package.
  - info:
      name: Get Global Statistics
      type: http
    http:
      method: GET
      url: https://packagist.org/statistics.json
    docs: Aggregate Packagist statistics — total packages, total versions, total installs.
- info:
    name: Security
    type: folder
  items:
  - info:
      name: Get Security Advisories
      type: http
    http:
      method: GET
      url: https://packagist.org/api/security-advisories/
      params:
      - name: packages[]
        value: ''
        type: query
        description: One or more package names to check.
      - name: updatedSince
        value: ''
        type: query
        description: Only return advisories updated since this Unix timestamp.
    docs: Look up security advisories that apply to one or more packages.
bundled: true