# CodePulse API – Packagist Registry Lookup

> CodePulse API – Packagist Registry Lookup is a paid API for AI agents from codepulse-api.hahavoid0.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Looks up a PHP Composer package on Packagist and returns download statistics and registry metadata

## Facts

- Endpoint: POST https://codepulse-api.hahavoid0.workers.dev/registry/packagist
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/codepulse-api-packagist-registry-lookup-0b28e3e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_m7qDaOAJhX-KKKk62NLwS

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 codepulse-api-packagist-registry-lookup-0b28e3e1 -d '<json body>'
```

Example prompt: How many total downloads does monolog/monolog have on Packagist? I want to know how popular it is and whether it's well-supported.

## When to prefer this

Use this endpoint when you need quick, pay-per-call Packagist download statistics or registry existence checks for PHP/Composer packages without setting up an API key. Prefer it over direct Packagist API calls when operating in an x402 micropayment context or when you need a normalized, agent-friendly JSON response with confidence scoring.

## Known failure modes

- Package not found on Packagist — result may be empty or supported:false
- Invalid vendor/package format causes lookup failure
- Packagist API unavailable upstream — timeout or error response
- Payment failure via x402/USDC prevents call from completing
- Stale data_as_of date if registry cache is not current

## How this service works

Resolves PHP library requirements and tags from Packagist.org.

## Output

Returns a JSON object with the package name, total download count, a confidence level (e.g. 'high'), a data freshness date, and a supported flag indicating whether the package is registered on Packagist, plus any warnings or disclaimers.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "package"
     ],
     "properties": {
      "package": {
       "type": "string",
       "description": "Composer package slug (vendor/name, e.g. monolog/monolog)"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "package": "monolog/monolog",
   "downloads": 50000000
  },
  "warnings": [],
  "supported": true,
  "confidence": "high",
  "data_as_of": "2026-06",
  "disclaimer": "Informational support only. Not legal, tax, medical, veterinary, or financial advice. Verify with the cited official source or a qualified professional before acting."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/codepulse-api-packagist-registry-lookup-0b28e3e1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from codepulse-api.hahavoid0.workers.dev](https://www.zero.xyz/host/codepulse-api.hahavoid0.workers.dev/llms.txt)
