{"uid":"cap_ziZvg5vz6ni81MRP9qwqB","slug":"npm-package-metadata-weekly-downloads-be2ea8e4","name":"npm Package Metadata + Weekly Downloads","description":"One merged call instead of two: latest-version metadata from the official npm registry plus last-week download count from api.npmjs.org (both live). Query: ?pkg=react (scoped names like @scope/name accepted). Returns version, license, deps_count + dependency names, engines, weekly_downloads. No personal maintainer data. 1h cache.","url":"https://x402-datashop-production.up.railway.app/v1/npm/package","method":"GET","headers":{},"bodySchema":{"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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["pkg"],"properties":{"pkg":{"type":"string","description":"npm package name, e.g. react or @types/node"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_bRcB9SJC7QIWruJkdoUhC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns merged npm package metadata (latest version, license, dependencies, engines) plus last-week download count in a single call","exampleAgentPrompt":"What's the latest version, license, dependencies, and last-week download count for the react npm package?","exampleUseCases":null,"resultDescription":"A JSON object with the package's latest version string, SPDX license identifier, number of direct dependencies (deps_count), list of dependency names, engines field (e.g. required Node version), and weekly_downloads count — all from live npm registry and download API sources with a 1-hour cache.","failureModes":["Package not found on npm registry — returns 404 or error response","Malformed package name — returns validation error","Scoped package name not URL-encoded correctly — may cause lookup failure","Upstream npm registry or download API timeout — may return 503 or stale data","Rate limiting or payment failure — returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need both npm package metadata and download popularity in a single request, avoiding two separate npm API calls. Ideal for dependency auditing, package vetting, or developer tooling that needs version, license, and usage statistics together. Prefer over raw npm registry calls when you want combined data with 1-hour caching and no personal maintainer data exposure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:40:58.424Z","isFirstParty":false}