{"openapi":"3.1.0","info":{"title":"ScrapeMole Pkgs: npm and PyPI package metadata for AI agents","version":"1.0.0","description":"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.\n\nPayments: 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","contact":{"email":"edgaras@mail.grokbot.com","url":"https://scrapemole.pages.dev"},"x-guidance":"Call any /v1 endpoint without payment to receive a 402 with the exact price, then retry with an x402 client (e.g. @x402/fetch). 4xx/5xx responses are never charged."},"servers":[{"url":"https://pkgs.scrapemole.workers.dev"}],"components":{"securitySchemes":{"x402":{"type":"http","scheme":"x402","description":"HTTP 402 payment with USDC via the x402 protocol."}}},"paths":{"/v1/npm/package":{"get":{"operationId":"npmPackage","summary":"Latest metadata for an npm package: description, homepage, repository, license, keywords, maintainers (names only), version count, latest version, publish times, and last-week downloads.","description":"Use when you need the public npm registry card for a package (scoped or unscoped): returns description, homepage, bugs URL, repository, license, keywords, maintainers as names only (emails stripped), number of versions, latest dist-tag version, created/modified times, and last-week download count from the official downloads API. Private packages are not supported.","tags":["npm","packages","javascript","nodejs","registry","metadata","downloads"],"parameters":[{"name":"name","in":"query","required":true,"description":"npm package name, optionally scoped (@scope/name).","schema":{"type":"string","examples":["lodash"]}}],"security":[{"x402":[]}],"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.002","currency":"USD","network":"eip155:8453","networks":["eip155:8453"],"asset":"USDC"},"responses":{"200":{"description":"Result (the payment settles only for this status).","content":{"application/json":{"example":{"name":"lodash","description":"Lodash modular utilities.","latest":"4.18.1","versionCount":117,"license":"MIT","homepage":"https://lodash.com/","repository":{"type":"git","url":"git+https://github.com/lodash/lodash.git"},"keywords":["modules","stdlib","util"],"maintainers":["jdalton"],"downloadsLastWeek":163000000,"times":{"created":"2012-04-23T…","modified":"2026-…","latest":"2026-…"},"source":"https://registry.npmjs.org/lodash"}}}},"400":{"description":"Invalid input. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"402":{"description":"Payment required (x402). The PAYMENT-REQUIRED header (mirrored in the body) carries price, network and payTo."},"404":{"description":"Not found / no data. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"502":{"description":"Upstream error. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"504":{"description":"Upstream timeout. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}}}}},"/v1/npm/version":{"get":{"operationId":"npmVersion","summary":"One published npm version: dependencies, peerDependencies, engines, dist tarball URL and integrity, and published time.","description":"Use when you need the exact published artifact for an npm version: dependencies, optionalDependencies, peerDependencies, bundledDependencies, engines, os/cpu, dist (tarball URL, integrity, shasum, unpacked size), and the version publish time. Give \"latest\" as version to resolve the current dist-tag.","tags":["npm","packages","javascript","dependencies","versions"],"parameters":[{"name":"name","in":"query","required":true,"description":"npm package name.","schema":{"type":"string","examples":["lodash"]}},{"name":"version","in":"query","required":true,"description":"Exact version or \"latest\".","schema":{"type":"string","examples":["4.17.21"]}}],"security":[{"x402":[]}],"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.002","currency":"USD","network":"eip155:8453","networks":["eip155:8453"],"asset":"USDC"},"responses":{"200":{"description":"Result (the payment settles only for this status).","content":{"application/json":{"example":{"name":"lodash","version":"4.17.21","description":"Lodash modular utilities.","license":"MIT","dependencies":{},"dist":{"tarball":"https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz","integrity":"sha512-…","shasum":"…"},"published":"2021-02-20T…","source":"https://registry.npmjs.org/lodash"}}}},"400":{"description":"Invalid input. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"402":{"description":"Payment required (x402). The PAYMENT-REQUIRED header (mirrored in the body) carries price, network and payTo."},"404":{"description":"Not found / no data. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"502":{"description":"Upstream error. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"504":{"description":"Upstream timeout. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}}}}},"/v1/npm/search":{"get":{"operationId":"npmSearch","summary":"Full-text search of the npm registry: matching package name, version, description, keywords and relevance score (publisher emails omitted).","description":"Use to discover npm packages by keyword or name: returns up to 20 hits with name, version, description, keywords, date, and the registry search score. Publisher and maintainer emails are never returned (names/usernames only when present).","tags":["npm","packages","search","javascript","registry"],"parameters":[{"name":"q","in":"query","required":true,"description":"Search text.","schema":{"type":"string","examples":["markdown parser"]}},{"name":"limit","in":"query","required":false,"description":"Max results (1-20).","schema":{"type":"string","default":"10"}}],"security":[{"x402":[]}],"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.003","currency":"USD","network":"eip155:8453","networks":["eip155:8453"],"asset":"USDC"},"responses":{"200":{"description":"Result (the payment settles only for this status).","content":{"application/json":{"example":{"query":"markdown parser","count":2,"results":[{"name":"marked","version":"15.0.0","description":"A markdown parser…","keywords":["markdown"],"score":0.91}],"source":"https://registry.npmjs.org/-/v1/search"}}}},"400":{"description":"Invalid input. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"402":{"description":"Payment required (x402). The PAYMENT-REQUIRED header (mirrored in the body) carries price, network and payTo."},"404":{"description":"Not found / no data. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"502":{"description":"Upstream error. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"504":{"description":"Upstream timeout. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}}}}},"/v1/pypi/project":{"get":{"operationId":"pypiProject","summary":"PyPI project info: summary, home page, project URLs, license, requires_python, classifiers subset, current version and yank status (author emails redacted).","description":"Use when you need the public PyPI project card: summary, home_page, project_urls, license, requires_python, a subset of classifiers, requires_dist (capped), current version, and yank status. Author/maintainer emails are omitted or redacted; only display names remain when present.","tags":["pypi","python","packages","registry","metadata"],"parameters":[{"name":"name","in":"query","required":true,"description":"PyPI project name.","schema":{"type":"string","examples":["requests"]}}],"security":[{"x402":[]}],"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.002","currency":"USD","network":"eip155:8453","networks":["eip155:8453"],"asset":"USDC"},"responses":{"200":{"description":"Result (the payment settles only for this status).","content":{"application/json":{"example":{"name":"requests","version":"2.34.2","summary":"Python HTTP for Humans.","license":"Apache-2.0","requiresPython":">=3.10","projectUrls":{"Documentation":"https://…","Source":"https://…"},"yanked":false,"source":"https://pypi.org/pypi/requests/json"}}}},"400":{"description":"Invalid input. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"402":{"description":"Payment required (x402). The PAYMENT-REQUIRED header (mirrored in the body) carries price, network and payTo."},"404":{"description":"Not found / no data. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"502":{"description":"Upstream error. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"504":{"description":"Upstream timeout. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}}}}},"/v1/pypi/release":{"get":{"operationId":"pypiRelease","summary":"Files for one PyPI release: filename, packagetype, size, upload time, yank status and digests.","description":"Use when you need the published artifacts for a specific PyPI version: each file with filename, packagetype (sdist/bdist_wheel…), size, upload time, yank flags, digests (sha256/blake2b/md5) and download URL. Give \"latest\" as version to use the project's current version.","tags":["pypi","python","packages","releases","wheels"],"parameters":[{"name":"name","in":"query","required":true,"description":"PyPI project name.","schema":{"type":"string","examples":["requests"]}},{"name":"version","in":"query","required":true,"description":"Exact version or \"latest\".","schema":{"type":"string","examples":["2.32.3"]}}],"security":[{"x402":[]}],"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.002","currency":"USD","network":"eip155:8453","networks":["eip155:8453"],"asset":"USDC"},"responses":{"200":{"description":"Result (the payment settles only for this status).","content":{"application/json":{"example":{"name":"requests","version":"2.32.3","fileCount":2,"files":[{"filename":"requests-2.32.3-py3-none-any.whl","packagetype":"bdist_wheel","size":64558,"uploadTime":"2024-…","digests":{"sha256":"…"}}],"source":"https://pypi.org/pypi/requests/json"}}}},"400":{"description":"Invalid input. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"402":{"description":"Payment required (x402). The PAYMENT-REQUIRED header (mirrored in the body) carries price, network and payTo."},"404":{"description":"Not found / no data. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"502":{"description":"Upstream error. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"504":{"description":"Upstream timeout. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}}}}},"/v1/pypi/search":{"get":{"operationId":"pypiSearch","summary":"Resolve PyPI project names: exact and PEP 503–normalized variants (hyphen/underscore/dot), returning matching project summaries. Full-text web search is not used (PyPI XML-RPC search is retired; the HTML search page is challenge-gated).","description":"Use when you have a likely PyPI project name (or a few tokens) and need to resolve it to live projects: tries the query as-is, PEP 503 normalization (lowercase, [-_.] → -), and hyphen/underscore/dot variants, then returns up to \"limit\" matching projects with summary, version, requires_python and license. This is name resolution, not full-text discovery — prefer exact package names when known. Author emails are redacted.","tags":["pypi","python","packages","search","registry"],"parameters":[{"name":"q","in":"query","required":true,"description":"Project name or name-like query.","schema":{"type":"string","examples":["httpx"]}},{"name":"limit","in":"query","required":false,"description":"Max results (1-20).","schema":{"type":"string","default":"10"}}],"security":[{"x402":[]}],"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.003","currency":"USD","network":"eip155:8453","networks":["eip155:8453"],"asset":"USDC"},"responses":{"200":{"description":"Result (the payment settles only for this status).","content":{"application/json":{"example":{"query":"httpx","count":1,"note":"Name lookup via PyPI JSON API (XML-RPC search retired).","results":[{"name":"httpx","version":"0.28.1","summary":"The next generation HTTP client.","requiresPython":">=3.8"}],"source":"https://pypi.org/pypi"}}}},"400":{"description":"Invalid input. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"402":{"description":"Payment required (x402). The PAYMENT-REQUIRED header (mirrored in the body) carries price, network and payTo."},"404":{"description":"Not found / no data. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"502":{"description":"Upstream error. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"504":{"description":"Upstream timeout. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}}}}}}}