# Packagist versions API

Get Packagist Versions data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as name, output, and retrieve structured data including package name, version or branch label, production requirement map, source repository reference, and source advisory metadata for dependency review, and integration planning.

Documentation: https://openany.si/packagist/packagist-versions-api/d7373597-bc4f-47ca-8ee4-4c2749ce8a9b/
API ID: d7373597-bc4f-47ca-8ee4-4c2749ce8a9b
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/packagist/v1/versions
Page update time: 2026-12-03T02:44:54.458Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:44:52.664Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## Packagist Versions API

name identifies the package. version filters one release, while dev defaults to false for tagged releases; true includes development branches. limit defaults to 50 and allows up to 500. Version metadata retains production and development requirements, source references and available security advisories.

## What You Can Build

- **Dependency review**: Record the requested package identity and selected version before comparing requirements or related package metadata.
- **Integration planning**: Use the returned source metadata to plan a compatibility review; installation, code execution and runtime validation remain separate steps.

## Returned Data

| Field | Meaning |
| --- | --- |
| `name` | Package name |
| `versions[].version` | Version or branch label |
| `versions[].require` | Production requirement map |
| `versions[].source` | Source repository reference |
| `security_advisories` | Source advisory metadata |
| `next_page` | Next versions page |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Packagist versions API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Package as vendor/package (monolog/monolog), a `composer require` command or a packagist.org link."
        },
        "version": {
          "type": "string",
          "description": "Only this version, e.g. 3.12.0."
        },
        "dev": {
          "type": "string",
          "description": "true for development branches (dev-main etc.), false (default) for tagged releases.",
          "enum": [
            "true",
            "false"
          ]
        },
        "page": {
          "type": "integer",
          "description": "Page number (default 1). Pass `next_page` back as `page`; null on the last page."
        },
        "limit": {
          "type": "integer",
          "description": "Versions per page, 1-500 (default 50)."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "Native CSV/NDJSON record selector; it has no effect on this JSON-only product."
        }
      },
      "required": [
        "name"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "dev": {
      "type": "boolean"
    },
    "name": {
      "type": "string"
    },
    "next_page": {
      "type": "integer"
    },
    "page": {
      "type": "integer"
    },
    "security_advisories": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "advisory_id": {
            "type": "string"
          },
          "affected_versions": {
            "type": "string"
          }
        }
      }
    },
    "total": {
      "type": "integer"
    },
    "versions": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "abandoned": {
                "type": "null"
              },
              "authors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "homepage": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "null"
                    }
                  }
                }
              },
              "conflict": {
                "type": "object",
                "properties": {}
              },
              "description": {
                "type": "string"
              },
              "dist": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "shasum": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              "funding": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                }
              },
              "homepage": {
                "type": "string"
              },
              "keywords": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "license": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "provide": {
                "type": "object",
                "properties": {
                  "psr/log-implementation": {
                    "type": "string"
                  }
                }
              },
              "published_at": {
                "type": "string"
              },
              "replace": {
                "type": "object",
                "properties": {}
              },
              "require": {
                "type": "object",
                "properties": {
                  "php": {
                    "type": "string"
                  },
                  "psr/log": {
                    "type": "string"
                  }
                }
              },
              "require_dev": {
                "type": "object",
                "properties": {
                  "aws/aws-sdk-php": {
                    "type": "string"
                  },
                  "doctrine/couchdb": {
                    "type": "string"
                  },
                  "elasticsearch/elasticsearch": {
                    "type": "string"
                  },
                  "ext-json": {
                    "type": "string"
                  },
                  "graylog2/gelf-php": {
                    "type": "string"
                  },
                  "guzzlehttp/guzzle": {
                    "type": "string"
                  },
                  "guzzlehttp/psr7": {
                    "type": "string"
                  },
                  "mongodb/mongodb": {
                    "type": "string"
                  },
                  "php-amqplib/php-amqplib": {
                    "type": "string"
                  },
                  "php-console/php-console": {
                    "type": "string"
                  },
                  "phpstan/phpstan": {
                    "type": "string"
                  },
                  "phpstan/phpstan-deprecation-rules": {
                    "type": "string"
                  },
                  "phpstan/phpstan-strict-rules": {
                    "type": "string"
                  },
                  "phpunit/phpunit": {
                    "type": "string"
                  },
                  "predis/predis": {
                    "type": "string"
                  },
                  "psr/clock": {
                    "type": "string"
                  },
                  "rollbar/rollbar": {
                    "type": "string"
                  },
                  "ruflin/elastica": {
                    "type": "string"
                  },
                  "symfony/mailer": {
                    "type": "string"
                  },
                  "symfony/mime": {
                    "type": "string"
                  }
                }
              },
              "source": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              "suggest": {
                "type": "object",
                "properties": {
                  "aws/aws-sdk-php": {
                    "type": "string"
                  },
                  "doctrine/couchdb": {
                    "type": "string"
                  },
                  "elasticsearch/elasticsearch": {
                    "type": "string"
                  },
                  "ext-amqp": {
                    "type": "string"
                  },
                  "ext-curl": {
                    "type": "string"
                  },
                  "ext-mbstring": {
                    "type": "string"
                  },
                  "ext-mongodb": {
                    "type": "string"
                  },
                  "ext-openssl": {
                    "type": "string"
                  },
                  "ext-sockets": {
                    "type": "string"
                  },
                  "graylog2/gelf-php": {
                    "type": "string"
                  },
                  "mongodb/mongodb": {
                    "type": "string"
                  },
                  "php-amqplib/php-amqplib": {
                    "type": "string"
                  },
                  "psr/clock": {
                    "type": "string"
                  },
                  "rollbar/rollbar": {
                    "type": "string"
                  },
                  "ruflin/elastica": {
                    "type": "string"
                  }
                }
              },
              "support": {
                "type": "object",
                "properties": {
                  "issues": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  }
                }
              },
              "time": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "version_normalized": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/packagist/v1/versions?name=monolog%2Fmonolog&output=json' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "cached": false,
  "count": 50,
  "credits_used": 1,
  "dev": false,
  "name": "monolog/monolog",
  "next_page": 2,
  "page": 1,
  "security_advisories": [
    {
      "advisory_id": "PKSA-dmw8-jd8k-q3c6",
      "affected_versions": ">=1.8.0,<1.12.0"
    }
  ],
  "total": 91,
  "versions": [
    {
      "abandoned": null,
      "authors": [
        {
          "homepage": "https://seld.be",
          "name": "Jordi Boggiano",
          "role": null
        }
      ],
      "conflict": {},
      "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
      "dist": {
        "reference": "d7059e4c691d05ea1222b5124bed0f961be46e15",
        "shasum": "",
        "type": "zip",
        "url": "https://api.github.com/repos/Seldaek/monolog/zipball/d7059e4c691d05ea1222b5124bed0f961be46e15"
      },
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/Seldaek"
        },
        {
          "type": "tidelift",
          "url": "https://tidelift.com/funding/github/packagist/monolog/monolog"
        }
      ],
      "homepage": "https://github.com/Seldaek/monolog",
      "keywords": [
        "log",
        "logging",
        "… 1 more"
      ],
      "license": [
        "MIT"
      ],
      "provide": {
        "psr/log-implementation": "3.0.0"
      },
      "published_at": "2026-09-29T19:21:44+00:00",
      "replace": {},
      "require": {
        "php": ">=8.1",
        "psr/log": "^2.0 || ^3.0"
      },
      "require_dev": {
        "aws/aws-sdk-php": "^3.0",
        "doctrine/couchdb": "~1.0@dev",
        "elasticsearch/elasticsearch": "^7 || ^8",
        "ext-json": "*",
        "graylog2/gelf-php": "^1.4.2 || ^2.0",
        "guzzlehttp/guzzle": "^7.4.5",
        "guzzlehttp/psr7": "^2.2",
        "mongodb/mongodb": "^1.8 || ^2.0",
        "php-amqplib/php-amqplib": "~2.4 || ^3",
        "php-console/php-console": "^3.1.8",
        "phpstan/phpstan": "^2",
        "phpstan/phpstan-deprecation-rules": "^2",
        "phpstan/phpstan-strict-rules": "^2",
        "phpunit/phpunit": "^10.5.17 || ^11.0.7",
        "predis/predis": "^1.1 || ^2",
        "psr/clock": "^1.0",
        "rollbar/rollbar": "^4.0",
        "ruflin/elastica": "^7 || ^8",
        "symfony/mailer": "^5.4 || ^6",
        "symfony/mime": "^5.4 || ^6"
      },
      "source": {
        "reference": "d7059e4c691d05ea1222b5124bed0f961be46e15",
        "type": "git",
        "url": "https://github.com/Seldaek/monolog.git"
      },
      "suggest": {
        "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
        "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
        "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
        "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
        "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHand…",
        "ext-mbstring": "Allow to work properly with unicode symbols",
        "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
        "ext-openssl": "Required to send log messages using SSL",
        "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
        "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
        "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
        "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
        "psr/clock": "Required to pass a clock to the Logger and control the timestamp of log records",
        "rollbar/rollbar": "Allow sending log messages to Rollbar",
        "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
      },
      "support": {
        "issues": "https://github.com/Seldaek/monolog/issues",
        "source": "https://github.com/Seldaek/monolog/tree/3.12.1"
      },
      "time": "2026-09-29T19:21:12+00:00",
      "type": "library",
      "version": "3.12.1",
      "version_normalized": "3.12.1.0"
    },
    {
      "abandoned": null,
      "authors": [
        {
          "homepage": "https://seld.be",
          "name": "Jordi Boggiano",
          "role": null
        }
      ],
      "conflict": {},
      "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
      "dist": {
        "reference": "72c534fc0ab181ef52d92a68382318631e301608",
        "shasum": "",
        "type": "zip",
        "url": "https://api.github.com/repos/Seldaek/monolog/zipball/72c534fc0ab181ef52d92a68382318631e301608"
      },
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/Seldaek"
        },
        {
          "type": "tidelift",
          "url": "https://tidelift.com/funding/github/packagist/monolog/monolog"
        }
      ],
      "homepage": "https://github.com/Seldaek/monolog",
      "keywords": [
        "log",
        "logging",
        "… 1 more"
      ],
      "license": [
        "MIT"
      ],
      "provide": {
        "psr/log-implementation": "3.0.0"
      },
      "published_at": "2026-09-09T08:46:13+00:00",
      "replace": {},
      "require": {
        "php": ">=8.1",
        "psr/log": "^2.0 || ^3.0"
      },
      "require_dev": {
        "aws/aws-sdk-php": "^3.0",
        "doctrine/couchdb": "~1.0@dev",
        "elasticsearch/elasticsearch": "^7 || ^8",
        "ext-json": "*",
        "graylog2/gelf-php": "^1.4.2 || ^2.0",
        "guzzlehttp/guzzle": "^7.4.5",
        "guzzlehttp/psr7": "^2.2",
        "mongodb/mongodb": "^1.8 || ^2.0",
        "php-amqplib/php-amqplib": "~2.4 || ^3",
        "php-console/php-console": "^3.1.8",
        "phpstan/phpstan": "^2",
        "phpstan/phpstan-deprecation-rules": "^2",
        "phpstan/phpstan-strict-rules": "^2",
        "phpunit/phpunit": "^10.5.17 || ^11.0.7",
        "predis/predis": "^1.1 || ^2",
        "psr/clock": "^1.0",
        "rollbar/rollbar": "^4.0",
        "ruflin/elastica": "^7 || ^8",
        "symfony/mailer": "^5.4 || ^6",
        "symfony/mime": "^5.4 || ^6"
      },
      "source": {
        "reference": "72c534fc0ab181ef52d92a68382318631e301608",
        "type": "git",
        "url": "https://github.com/Seldaek/monolog.git"
      },
      "suggest": {
        "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
        "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
        "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
        "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
        "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHand…",
        "ext-mbstring": "Allow to work properly with unicode symbols",
        "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
        "ext-openssl": "Required to send log messages using SSL",
        "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
        "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
        "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
        "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
        "psr/clock": "Required to pass a clock to the Logger and control the timestamp of log records",
        "rollbar/rollbar": "Allow sending log messages to Rollbar",
        "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
      },
      "support": {
        "issues": "https://github.com/Seldaek/monolog/issues",
        "source": "https://github.com/Seldaek/monolog/tree/3.12.0"
      },
      "time": "2026-09-09T08:34:20+00:00",
      "type": "library",
      "version": "3.12.0",
      "version_normalized": "3.12.0.0"
    },
    "… 48 more"
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Are development branches included by default?
No. dev=false is the default; set dev=true for development branches.

### Can I inspect one release?
Set version to the exact version label.

### How do I paginate?
Pass next_page as page; limit defaults to 50 and allows 1–500.

### Does an advisory list constitute a complete security audit?
No. Preserve the source advisory identifiers and affected ranges, and evaluate them with your project’s actual resolved version.

### How do I bypass cached results?
Pass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or set output=json.

## Available implementations
- apish: https://openany.si/packagist/packagist-versions-api/d7373597-bc4f-47ca-8ee4-4c2749ce8a9b/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
