# Rust Crate (crates.io) (`crates.package`)

A Rust crate on crates.io: latest version, licence, downloads, repository, keywords and recent versions.

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

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `name` | string | yes |  | Crate name |

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

| Field | Meaning |
|---|---|
| `latest_version` | Latest stable version. |
| `downloads` | All-time downloads. |
| `recent_downloads` | Downloads in the last 90 days. |
| `license` | Licence. |
| `recent_versions` | Last ten versions. |

## Example

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

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

```bash
getallapis run crates.package '{"name":"serde"}'
```

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