{"uid":"cap_eVTrtAcZtQtanYmbZzltb","slug":"npm-cdn-rank-via-jsdelivr-stats-c724a735","name":"npm CDN Rank via jsDelivr Stats","description":"Real browser-side adoption signal from the official jsDelivr Stats API: global CDN hit rank, rank within npm, total hits over the period, previous-period comparison and a derived trend (up/down/flat, lower rank = more popular). Query: ?pkg=react&period=week (period: day, week, month, year). Complements npm download counts; cached 6h.","url":"https://x402-datashop-production.up.railway.app/v1/npm/cdn-rank","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 @angular/core"},"period":{"enum":["day","week","month","year"],"type":"string","default":"week","description":"Stats window"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_RzddkCI_ftsj4cU7I83fh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the global jsDelivr CDN hit rank, npm-scoped rank, total hits, period-over-period comparison, and trend direction for any npm package.","exampleAgentPrompt":"What's the jsDelivr CDN hit rank for react over the past week — is it trending up or down compared to the previous period?","exampleUseCases":[{"title":"Monitor library adoption trends over time","prompt":"Check how lodash is performing on jsDelivr this month compared to last month — are we seeing more or fewer CDN hits?"},{"title":"Compare real-world usage across popular frameworks","prompt":"Show me the jsDelivr CDN hit ranks for Vue, React, and Angular Core this week so I can see which one has the strongest real-world adoption."},{"title":"Track emerging package momentum on CDN","prompt":"Is TypeScript gaining traction on jsDelivr lately, or is its CDN popularity flattening out? Give me the trend over the past month."}],"resultDescription":"Returns the package's global CDN hit rank, its rank among npm packages specifically, total CDN hits for the requested period, total hits for the prior period, and a derived trend label (up, down, or flat). Data is sourced from the official jsDelivr Stats API and cached for 6 hours.","failureModes":["Unknown or misspelled package name returns 404 or empty rank data","Invalid period value returns a 400 validation error","jsDelivr Stats API upstream unavailability causes 502/503","Scoped packages (e.g. @angular/core) must be URL-encoded correctly or the query will fail","Cache staleness: data may be up to 6 hours old, not reflecting very recent traffic spikes"],"whenToPreferThis":"Choose this endpoint when you need browser/CDN-side adoption signals rather than npm install counts — it reflects actual runtime usage from end users loading packages via CDN. Useful when npm download counts are inflated by CI/CD pipelines and you want a cleaner signal of real-world client-side popularity. Also useful for period-over-period trend analysis across day/week/month/year windows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:30:25.736Z","isFirstParty":false}