> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/npm/registry-packages>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/npm/registry-packages.mdx>

---

# npm Package Names API

Walk the registry's package names in key order, from a starting name or a cursor, for discovery and coverage jobs.

`GET /v1/npm/registry/packages?after=express&limit=100` is an inclusive walk: `after` names the first package returned, then rows follow in the registry's key order. It returns `data.packages`, one row of `{ name }` per package. `data.total` is the number of documents in the registry for this page, `data.offset` is where the page starts, and `data.page` carries `hasMore`, `nextCursor`, `page`, `perPage` and `total`.

Because `after` is inclusive, the named package is the first row. `cursor` from `data.page.nextCursor` continues after the last row of the previous page, and cannot be combined with `after`. `limit` is 1 to 1,000 and defaults to 1,000. The order is a key order rather than popularity, so use search when you want ranking and this route when you want to walk names without gaps.

## Request

- **Endpoint:** `GET /v1/npm/registry/packages`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by starting name
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/npm/registry/packages/get)
- **Platform page:** [/platforms/npm](https://www.socialfetch.dev/platforms/npm)

## FAQ

### How does paging work across the whole registry?

Request the first page, then pass data.page.nextCursor as cursor until data.page.hasMore is false. The cursor is the last name of the previous page, so the walk does not repeat rows. A full registry walk is many billed pages.

### Are the names sorted alphabetically?

They follow the registry's key order, which is close to alphabetical but includes scoped names such as @babel/core under the @ key. Do not assume a locale-aware sort; use the returned order and the cursor.

### What is the difference between after and cursor?

after starts at a name you choose, inclusively. cursor resumes after the last row of a previous response. Use after for a deliberate starting point and cursor for normal paging. Sending both is a 400.

### How many names are there?

data.total is the count the registry reports for this page. It is large and changes as packages publish, so treat it as a snapshot rather than a fixed number.

### What does the request cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.
