npm Packages Downloads API reference
Your first 10 calls are free, no card needed. Pricing and FAQ
Get a free API keycurl "https://api.insightsocial.app/v1/npm/packages/downloads?names=<names>" \ -H "x-api-key: $INSIGHTSOCIAL_API_KEY"
Get npm downloads for up to 128 package names in one call, one result per requested name.
Beta. The source's own structure under our naming rules (snake_case keys, string ids, ISO times where the source gives a timestamp), not one of the schema-2 entities. Fields may change. See Beta endpoints.
Metered: 20–1600 credits. We reserve the ceiling when the call starts and charge what it actually used when it finishes.
Authorization
apiKey Your key from the dashboard. It starts with isk_.
In: header
Query Parameters
Comma-separated package names, 1 to 128, with at most 20 scoped names because each one is looked up separately.
Window: last-day, last-week, last-month or last-year. Default: last-week unless from/to are given.
Value in
- "last-day"
- "last-week"
- "last-month"
- "last-year"
First day of the range, YYYY-MM-DD. Download data starts on 2015-01-10; a from after today is refused. A range spans up to 18 months; a longer range keeps its newest 18 months and sets clamped.
Last day of the range, YYYY-MM-DD. Must be on or after from; a to before 2015-01-10 is refused. A range spans up to 18 months; a longer range keeps its newest 18 months and sets clamped.
total for one number, daily for one row per day. Default: total.
Value in
- "total"
- "daily"
Set to 1 to get the price of this call without making it: data.dry_run carries credits_min and credits_max. Nothing is charged.
Value in
- "1"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api.insightsocial.app/v1/npm/packages/downloads?names=string"{ "success": true, "platform": "string", "endpoint": "string", "schema_version": "2", "pagination": { "next_cursor": "string", "has_more": true, "page_size": 0, "stopped_at": "since" }, "unavailable": [ "string" ], "credits_used": 0, "credits_remaining": 0, "request_id": "string", "cached": true, "idempotent_replay": true, "charge_reason": "string", "free_call": true, "data": { "property1": null, "property2": null }}