# x402helper.xyz Package Documentation Snippet Lookup

> x402helper.xyz Package Documentation Snippet Lookup is a paid API for AI agents from x402helper.xyz, paid per call via x402, $0.009/call, status unknown (last checked 2026-10-31).

Fetches a documentation snippet or README section for a software package from npm, PyPI, crates.io, or GitHub, gated behind an x402 USDC micropayment.

## Facts

- Endpoint: GET https://x402helper.xyz/89e509/docs/snippet?utm_source=zero.xyz
- Price: $0.009/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402helper-xyz-package-documentation-snippet-lookup-fc2a6f0b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kGzE6BE5Fo7wm0tROIFLX

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 x402helper-xyz-package-documentation-snippet-lookup-fc2a6f0b
```

Example prompt: Look up the authentication section of the coinbase/x402 GitHub repo docs for me — fetch the latest version and focus on the 'authentication' topic.

## When to prefer this

Choose this endpoint when an AI agent needs to programmatically retrieve package documentation or README snippets from npm, PyPI, crates.io, or GitHub without scraping, and is operating in an x402-enabled micropayment context. It is especially useful for agents that need to answer developer questions about library usage, API signatures, or specific topics within a package's documentation at low cost per call.

## Known failure modes

- Package not found in the specified ecosystem — returns success: false
- Invalid ecosystem value — returns validation error
- Payment not provided or insufficient — returns HTTP 402 before content is served
- Topic or symbol not found in README — may return empty or partial result
- Version pinned does not exist — returns not found error

## How this service works

X402 micropayments server — AI agents pay USDC for OFAC screening, rates, and billing verification.

## Output

A JSON object with a 'result' field containing the documentation snippet or README section matching the requested package, ecosystem, topic/symbol, and version, along with a 'success' boolean indicating whether the lookup succeeded.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "name",
      "ecosystem"
     ],
     "properties": {
      "name": {
       "type": "string",
       "default": null,
       "description": "Package name; for github pass owner/repo such as coinbase/x402. npm scoped names @scope/name are allowed."
      },
      "topic": {
       "type": "string",
       "default": null,
       "description": "Optional topic or symbol; matched against the README/llms.txt markdown headings, such as authentication or useEffect."
      },
      "symbol": {
       "type": "string",
       "default": null,
       "description": "Optional symbol name to match, an alias for topic."
      },
      "version": {
       "type": "string",
       "default": null,
       "description": "Optional exact version to pin, such as 2.31.0; default is latest."
      },
      "ecosystem": {
       "enum": [
        "npm",
        "pypi",
        "crates",
        "github"
       ],
       "type": "string",
       "default": null,
       "description": "Package ecosystem. Aliases accepted: pip and python map to pypi; cargo and rust map to crates; node maps to npm; gh maps to github."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {},
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402helper-xyz-package-documentation-snippet-lookup-fc2a6f0b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402helper.xyz](https://www.zero.xyz/host/x402helper.xyz/llms.txt)
