# ScrapeMole Pkgs – PyPI Package Search

> ScrapeMole Pkgs – PyPI Package Search is a paid API for AI agents from pkgs.scrapemole.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-29).

Search the PyPI package registry by name or keyword and return matching project names, summaries, versions, and Python version requirements.

## Facts

- Endpoint: GET https://pkgs.scrapemole.workers.dev/v1/pypi/search?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/scrapemole-pkgs-pypi-package-search-ab186ab2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SxryN9BTIUkwD9LDH0hFV

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 scrapemole-pkgs-pypi-package-search-ab186ab2
```

Example prompt: Search PyPI for Python packages matching 'httpx' and show me the top 5 results including their latest version and summary.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically search PyPI for Python packages by name or keyword without setting up PyPI API credentials, and wants pay-per-call pricing with no account required. Prefer over direct PyPI XML-RPC (which is retired) or scraping approaches. Best for agent workflows that need package discovery, dependency research, or version checking for Python projects.

## Known failure modes

- Missing required 'q' query parameter returns a 400 error
- No matching packages found returns an empty results array with count 0
- PyPI upstream unavailability may cause 502 or timeout errors
- Payment not received or invalid USDC payment triggers 402 response before work is done
- Limit parameter out of range (>20 or <1) may be clamped or rejected

## How this service works

Pay-per-call package registry lookups: npm package metadata, version details, search, and download counts; PyPI project metadata, releases, and name lookup. Public registry data only (no auth, no private packages, no scraping of user profiles). Emails and tokens are stripped. USDC via x402, no accounts.

Payments: x402 v2, scheme "exact", USDC on Base (eip155:8453). The payment is verified before the work and settled only when the response is 200. Terms: https://pkgs.scrapemole.workers.dev/terms

## Output

Returns a JSON object with the search query, total count, source URL, and an array of matching packages each containing: name, summary, latest version string, and required Python version constraint.

## 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": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "examples": [
        "httpx"
       ],
       "description": "Project name or name-like query."
      },
      "limit": {
       "type": "string",
       "default": "10",
       "description": "Max results (1-20)."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Name lookup via PyPI JSON API (XML-RPC search retired).",
  "count": 1,
  "query": "httpx",
  "source": "https://pypi.org/pypi",
  "results": [
   {
    "name": "httpx",
    "summary": "The next generation HTTP client.",
    "version": "0.28.1",
    "requiresPython": ">=3.8"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scrapemole-pkgs-pypi-package-search-ab186ab2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pkgs.scrapemole.workers.dev](https://www.zero.xyz/host/pkgs.scrapemole.workers.dev/llms.txt)
