{"uid":"cap_tkRAxsIiotj1WRGrz9Ybe","slug":"jsdelivr-cdn-stats-for-npm-packages-0c5ca584","name":"jsDelivr CDN Stats for npm Packages","description":"jsDelivr CDN usage for an npm package over 30 days - total and daily hits, peak day, rank among all packages and npm, bandwidth and daily series","url":"https://saylorinnovations.com/api/dev/cdn-stats?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["package"],"properties":{"package":{"type":"string","description":"npm package name such as react or @scope/name"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["package","hits_total","daily"],"properties":{"note":{"type":"string","description":"Caveat or context for reading the result"},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Date (YYYY-MM-DD)"},"hits":{"type":["number","null"],"description":"Requests on that day"}},"additionalProperties":true},"description":"Daily values"},"period":{"type":"string","description":"Period the figures cover"},"source":{"type":"string","description":"Data source the values come from"},"package":{"type":"string","description":"npm package name the stats are for"},"peak_day":{"type":["object","null"],"properties":{"date":{"type":["string","null"],"description":"Date (YYYY-MM-DD)"},"hits":{"type":["number","null"],"description":"Requests on the busiest day"}},"description":"Day with the highest value","additionalProperties":true},"checked_at":{"type":"string","description":"Time the check was run (UTC)"},"hits_total":{"type":"number","description":"Hits total"},"bandwidth_gb":{"type":"number","description":"Bandwidth gb"},"bandwidth_rank":{"type":"integer","description":"Bandwidth rank"},"rank_among_npm":{"type":["number","null"],"description":"Rank among npm"},"hits_per_day_avg":{"type":["number","null"],"description":"Hits per day avg"},"rank_all_packages":{"type":["number","null"],"description":"Rank all packages"}},"additionalProperties":true},"description":{"type":"string"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0qbBj1FX2waN-5eFWLWds","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns jsDelivr CDN usage statistics for a given npm package over the past 30 days, including total hits, daily breakdown, peak day, bandwidth, and package rank.","exampleAgentPrompt":"Can you pull the jsDelivr CDN stats for the npm package 'lodash' — I want to see total hits, daily breakdown, bandwidth, and how it ranks among all packages over the last 30 days?","exampleUseCases":[{"title":"Open source package popularity check","prompt":"How is my npm package '@myorg/ui-kit' performing on jsDelivr? I want to see the total CDN hits, peak day, and its rank compared to all other packages over the past month."},{"title":"Bandwidth cost estimation for CDN usage","prompt":"Can you look up jsDelivr CDN stats for the 'axios' npm package? I need the total bandwidth in GB and the daily hits series for the last 30 days so I can estimate traffic load."},{"title":"Competitive package benchmarking","prompt":"Pull jsDelivr CDN usage for 'vue' and tell me the total hits, average hits per day, and its rank among npm packages — I want to benchmark it against similar frameworks."}],"resultDescription":"A JSON object containing: the npm package name, total CDN hits over the last 30 days, average daily hits, peak day (date and hits), an array of daily hit counts per date, bandwidth consumed in GB, rank among all jsDelivr packages, rank among npm packages specifically, the period covered, and the data source attribution. Some fields may be null if data is unavailable.","failureModes":["Unknown or misspelled package name returns no data or null fields","Scoped packages (e.g. @scope/name) may fail if not URL-encoded correctly","Very new packages with no CDN traffic may return zeros or nulls across most fields","jsDelivr upstream API downtime may result in stale or missing data","Rate limiting or payment failure returns a 402 or error response"],"whenToPreferThis":"Use this endpoint when you need CDN-specific delivery metrics for an npm package served via jsDelivr, including bandwidth and global rank — distinct from npm download counts. Prefer this over npm registry stats when the question is specifically about CDN performance, peak traffic days, or jsDelivr rank positioning rather than raw install counts.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:49:13.244Z","isFirstParty":false,"canonicalSlug":"jsdelivr-cdn-stats-for-npm-packages-0c5ca584"}