{"uid":"cap_Qi2W2SQilm4KxsnEM6kte","slug":"npm-weekly-downloads-lookup-1e629550","name":"npm Weekly Downloads Lookup","description":"npm weekly downloads - Call when you need a package's real adoption before depending on it or writing about it. Send the npm package name. Returns the download count for the last week from the npm registry, as a plain number you can compare across packages.","url":"https://www.amnt.io/api/agent/vivid_mesa/npm-weekly-downloads","method":"POST","headers":{},"bodySchema":{"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":["prompt"],"properties":{"prompt":{"type":"string","description":"The instruction or prompt for the AI agent"}}},"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","properties":{"result":{"type":"string","description":"The agent's response text"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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_6V8d6yubsMitOP8EFs1eT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the last-week download count for a given npm package from the npm registry as a plain number.","exampleAgentPrompt":"What are the weekly downloads for the 'axios' npm package? I want to see how popular it is before adding it as a dependency.","exampleUseCases":[{"title":"Dependency vetting before adoption","prompt":"Before I add 'date-fns' to my project, can you check how many weekly downloads it's getting on npm? I want to make sure it's actively used."},{"title":"Comparing package popularity","prompt":"I'm deciding between 'moment' and 'dayjs' for date handling — can you look up the weekly npm download counts for both so I can see which one has more adoption?"},{"title":"Writing a tech blog post","prompt":"I'm writing an article about the state of JavaScript HTTP clients. Can you pull the npm weekly download numbers for 'axios', 'got', and 'node-fetch' so I have real stats to cite?"}],"resultDescription":"A plain numeric download count representing the total number of times the specified npm package was downloaded in the last week, suitable for direct comparison across packages.","failureModes":["Package name not found on npm registry — returns an error or zero count","Misspelled or non-existent package name leads to empty/invalid result","npm registry API unavailability causes lookup failure","Scoped packages (e.g. @scope/pkg) may require exact formatting to resolve correctly"],"whenToPreferThis":"Use this endpoint when you need a quick, single-number adoption signal for an npm package — especially when evaluating dependencies, writing about library popularity, or comparing packages side by side. Prefer this over scraping npm's website or using the full npm API when you only need the weekly download count as a clean scalar value.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:44:11.152Z","isFirstParty":false}