# npm Package (`npm.package`)

Latest version of an npm package: description, licence, repository, dependencies, size, TypeScript types and weekly downloads.

- **Route:** `POST /v1/run/npm.package`
- **Price:** $0.0008 per request ($0.80 per 1,000) · `cost_usd` on every response
- **Source:** npm registry (`npm`) · failover: no
- **Measured latency:** p50 221 ms · p95 221 ms · p99 221 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `name` | string | yes |  | Package name, scoped names allowed |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `version` | Latest version. |
| `license` | Licence. |
| `dependencies` | Runtime dependencies. |
| `weekly_downloads` | Downloads in the last 7 days. |
| `unpacked_size_bytes` | Installed size. |
| `has_types` | True when it ships TypeScript types. |
| `repository` | Source repository. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/npm.package \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"zod"}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('npm.package', {'name': 'zod'})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run npm.package '{"name":"zod"}'
```

Quote first (free, validates input): `POST /v1/quote/npm.package` with the same body.
