# Get npm Package API

> Fetch metadata for a public npm package: latest version, recent versions, maintainers, license, repository, keywords.

Category: [Developer Tools APIs](https://upapi.io/apis/developer-tools) · Last updated 2026-06-12

## How to call it

- Endpoint: `POST https://api.upapi.io/npm-package.get`, key in the `X-Api-Key` header, JSON body.
- Cost: 1 weighted unit per call.
- Timeout: 15 seconds.
- Cache: identical requests are served from cache for 300 seconds, unbilled.
- Try it without writing code: https://app.upapi.io/try/npm-package.get

```bash
curl -X POST https://api.upapi.io/npm-package.get \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "name": "@angular/core" }'
```

## Request parameters

- `name` (string, required) — Package name, including @scope/ for scoped packages (e.g. @angular/core)

## Response fields

- `name` (string, required)
- `license` (string, required)
- `homepage` (string, required)
- `keywords` (array, required)
- `createdAt` (string, required)
- `fetchedAt` (string, required)
- `modifiedAt` (string, required)
- `repository` (string, required)
- `description` (string, required)
- `maintainers` (array, required)
- `versionCount` (integer, required)
- `latestVersion` (string, required)
- `latestVersions` (array, required)
- `latestVersions[].version` (string, required)
- `latestVersions[].publishedAt` (string, required)

## Example request and response

The example response is generated from the published output schema: it shows the shape and field names, not values from a recorded call.

```json
{
  "name": "@angular/core"
}
```

```json
{
  "name": "example",
  "license": "example",
  "homepage": "example",
  "keywords": [
    "example"
  ],
  "createdAt": "example",
  "fetchedAt": "example",
  "modifiedAt": "example",
  "repository": "example",
  "description": "example",
  "maintainers": [
    "example"
  ],
  "versionCount": 1,
  "latestVersion": "example",
  "latestVersions": [
    {
      "version": "example",
      "publishedAt": "example"
    }
  ]
}
```

## Frequently asked questions

### How much does the Get npm Package API cost per call?

Each call spends 1 weighted unit of your plan's monthly quota. Full pricing is at https://upapi.io/pricing.

### How do I authenticate to the Get npm Package API?

Send your key in the X-Api-Key header. A free guest key is available without creating an account.

### Are Get npm Package API responses cached?

Yes — identical requests are served from cache for 300 seconds, and a cache hit is not billed.

## More Developer Tools APIs

- [Get PyPI Package](https://upapi.io/apis/developer-tools/pypi-package)
- [Get GitHub Repository](https://upapi.io/apis/developer-tools/github-repo)
- [Get GitHub User](https://upapi.io/apis/developer-tools/github-user)
- [Get GitHub User Commit Emails](https://upapi.io/apis/developer-tools/github-user-emails)
- [List GitHub Issue Comments](https://upapi.io/apis/developer-tools/github-issue-comments)
- [List GitHub Repository Contributors](https://upapi.io/apis/developer-tools/github-repo-contributors)
- [List GitHub Repository Issues](https://upapi.io/apis/developer-tools/github-repo-issues)
- [Post a GitHub Issue Comment](https://upapi.io/apis/developer-tools/github-issue-comment)
