# Packagist PHP Package Metadata Lookup (x402)

> Packagist PHP Package Metadata Lookup (x402) is a paid API for AI agents from x402-v2-mint-packagist-package.vercel.app, paid per call via x402, $0.020162/call, status unknown (last checked 2026-12-03).

Fetches Composer/Packagist metadata for a PHP package by vendor and package name, returning a summary via x402 micropayment-gated API.

## Facts

- Endpoint: POST https://x402-v2-mint-packagist-package.vercel.app/v1/packagist-package?utm_source=zero.xyz
- Price: $0.020162/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/packagist-php-package-metadata-lookup-x402-5a52d729
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Gs0-ERwXAOGw-BXSAnYAH

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability packagist-php-package-metadata-lookup-x402-5a52d729 -d '<json body>'
```

Example prompt: Can you look up the Packagist metadata for the PHP package vendor 'guzzlehttp' and package 'guzzle'?

## When to prefer this

Use this endpoint when you need to programmatically retrieve PHP Composer/Packagist package metadata and are operating in an x402 micropayment-enabled environment. Prefer this over npm, PyPI, or crates.io lookup endpoints specifically when the target package is a PHP/Composer package. It is distinct from npm (JavaScript), PyPI (Python), and crates.io (Rust) registry lookups.

## Known failure modes

- Unpaid request returns HTTP 402 with empty body (payment required via x402 protocol)
- After settlement, invalid or unknown vendor/package returns HTTP 400 with charged:false
- Malformed vendor or package name exceeding 128 characters may be rejected
- Network or upstream Packagist API unavailability may cause failures

## How this service works

Composer/Packagist package metadata p2 (keyless). POST {vendor}/{package}. Unpaid empty → 402; after settle empty/invalid → 400 charged:false. PHP package registry lane (≠ npm/pypi/crates).

## Output

A JSON response indicating whether the lookup succeeded (ok: true/false), whether the micropayment was charged (charged: true/false), the skill name ('packagist-package'), and a summary string ('ok' on success). On payment failure or invalid input, returns 400 with charged: false.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "vendor": {
   "type": "string",
   "maxLength": 128
  },
  "package": {
   "type": "string",
   "maxLength": 128
  },
  "request_id": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "skill": "packagist-package",
  "charged": true,
  "summary": "ok"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/packagist-php-package-metadata-lookup-x402-5a52d729/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-v2-mint-packagist-package.vercel.app](https://www.zero.xyz/host/x402-v2-mint-packagist-package.vercel.app/llms.txt)
