API · Economy
GET /economy/government-spend
US federal spending by state, county or country, from USAspending.
| Request | GET /v1/economy/government-spend |
| Operation id | economy.government_spend.get |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
US federal spending by state, county or country, from USAspending.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
naics | string | no | NAICS codes (2, 4 or 6 digits), comma-separated, up to 20. |
psc | string | no | Product or service codes (1 to 4 characters), comma-separated, up to 20. |
keyword | string | no | Free text matched against award descriptions (3 to 120 characters). |
from_date | string | no | YYYY-MM-DD, from 2007-10-01. Defaults to the last complete federal fiscal year. |
to_date | string | no | YYYY-MM-DD. |
geo | "state" | "county" | "country" | no | One of state, county, country. |
scope | "place_of_performance" | "recipient_location" | no | One of place_of_performance, recipient_location. |
award_type | "contracts" | "grants" | "all" | no | One of contracts, grants, all. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Amounts by place, largest first. | EconomyGovernmentSpend |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | No data matches. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | Economy is temporarily unavailable. Retryable; nothing was charged. | Error |
EconomyGovernmentSpend fields
| Field | Type | Description |
|---|---|---|
scope | string | |
geo_layer | string | |
from_date | string | |
to_date | string | |
results | object[] |
Errors use one shape everywhere; see Errors for every code and what to do.