# CodePulse API – Crates.io Registry Lookup

> CodePulse API – Crates.io 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-14).

Looks up a Rust crate on crates.io and returns its latest version, download count, and support status with confidence scoring.

## Facts

- Endpoint: POST https://codepulse-api.hahavoid0.workers.dev/registry/crates
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/codepulse-api-crates-io-registry-lookup-55c6585f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_p8Q--cKs9KmuplpKwoGEA

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-crates-io-registry-lookup-55c6585f -d '<json body>'
```

Example prompt: Can you look up the tokio crate on crates.io and tell me its latest version, total downloads, and whether it's still actively supported?

## When to prefer this

Use this endpoint when an agent needs quick, structured metadata about a specific Rust crate — version, download popularity, and active support status — without scraping crates.io directly. Ideal for dependency audits, chatbot responses about Rust packages, or automated tooling that needs pay-per-call access with no API key setup. Prefer over direct crates.io HTML scraping when you need clean JSON output and confidence scoring.

## Known failure modes

- Crate name not found in registry — returns unsupported or low-confidence result
- Stale data if registry data_as_of date lags behind actual crates.io updates
- Payment failure via x402 if USDC balance on Base is insufficient
- Invalid request body or missing crate field returns an error
- Worker timeout or upstream crates.io unavailability

## How this service works

Looks up Rust crate details, downloads history, and dependencies from Crates.io.

## Output

Returns a JSON object with the crate name, latest version string, total download count, a supported boolean, a confidence level (e.g. 'high'), the data currency date (e.g. '2026-06'), and a standard informational disclaimer. Also includes any warnings array.

## 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": [
      "crate"
     ],
     "properties": {
      "crate": {
       "type": "string",
       "description": "Rust crate name"
      }
     }
    },
    "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": {
   "crate": "tokio",
   "version": "1.35.1",
   "downloads": 10000000
  },
  "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-crates-io-registry-lookup-55c6585f/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)
