Packagist Metadata API

Composer v2 static metadata and change tracking.

Operations 3

GET /p2/{vendor}/{package}.json Get Package Metadata (Composer v2) #
GET /p2/{vendor}/{package}~dev.json Get Package Dev Metadata (Composer v2) #
GET /metadata/changes.json Get Metadata Changes #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/packagist-metadata-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

packagist-metadata-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Packagist Metadata API
  description: 'The Packagist API exposes the PHP Composer package registry. Use it to list, search,

    and inspect packages; retrieve Composer v2 metadata for resolvers; track changes;

    fetch download statistics; query the security advisory database; and create or

    update package entries (authenticated).

    '
  version: '1.0'
  contact:
    name: Packagist
    url: https://packagist.org
  license:
    name: MIT
    url: https://github.com/composer/packagist/blob/main/LICENSE
servers:
- url: https://packagist.org
  description: Packagist Application API
- url: https://repo.packagist.org
  description: Composer v2 Static Metadata Mirror
tags:
- name: Metadata
  description: Composer v2 static metadata and change tracking.
paths:
  /p2/{vendor}/{package}.json:
    get:
      operationId: getPackageMetadataV2
      summary: Get Package Metadata (Composer v2)
      description: 'Static Composer v2 metadata. Preferred endpoint for dependency resolvers — served

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

        '
      tags:
      - Metadata
      parameters:
      - name: vendor
        in: path
        required: true
        schema:
          type: string
      - name: package
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Composer v2 package metadata.
  /p2/{vendor}/{package}~dev.json:
    get:
      operationId: getPackageMetadataV2Dev
      summary: Get Package Dev Metadata (Composer v2)
      description: Composer v2 metadata for dev branches (development releases).
      tags:
      - Metadata
      parameters:
      - name: vendor
        in: path
        required: true
        schema:
          type: string
      - name: package
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Composer v2 dev metadata.
  /metadata/changes.json:
    get:
      operationId: getMetadataChanges
      summary: Get Metadata Changes
      description: Stream package metadata changes since a given timestamp. Retained for 24 hours only.
      tags:
      - Metadata
      parameters:
      - name: since
        in: query
        description: Unix timestamp (milliseconds) to fetch changes since.
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: List of metadata changes.
          content:
            application/json:
              schema:
                type: object
                properties:
                  actions:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                          - update
                          - delete
                        package:
                          type: string
                        time:
                          type: integer
                          format: int64
                  timestamp:
                    type: integer
                    format: int64
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: username:apiToken