# USAspending Award ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/usaspending/award` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 1 credit per call | | **Documentation** | https://www.piloterr.com/library/usaspending-award | ## Description Fetch one US federal award by its generated id or by a usaspending.gov award URL. Amounts are a number plus a display string. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/usaspending/award' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### NASA contract ```json { "url": "https://www.usaspending.gov/award/CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-/", "city": "BALTIMORE", "state": "MD", "country": "UNITED STATES", "award_id": "GSFC0198106DNAS526555", "category": "contract", "end_date": "2026-10-31", "psc_code": "AR21", "type_code": "D", "award_type": "DEFINITIVE CONTRACT", "naics_code": "333314", "start_date": "1987-09-15", "date_signed": "1987-09-15", "description": "THE PRIMARY ACTIVITIES COVERED BY THIS EFFORT INCLUDE THE FINAL SERVICING MISSION AND SUBSEQUENT OPERATIONS THROUGH END-OF-MISSION. THESE ACTIVITIES INCLUDE: A. SCIENCE PROGRAM IMPLEMENTATION INCLUDING: MISSION PLANNING SUPPORT, SCIENCE PROGRAM DEFINITION SUPPORT, MANAGEMENT OF THE PROPOSAL SELECTION, TIME ALLOCATION, AND GRANT AWARD COMMITTEE PROCESSES, AND SCIENCE COMMUNITY OUTREACH. B. ROUTINE SCIENCE OPERATIONS INCLUDING: PROPOSAL GENERATION AND RECEIPT, OBSERVATION PLANNING AND SCHEDULING, UPDATING INSTRUMENT HANDBOOKS, OBSERVING AND USER SUPPORT, DATA PROCESSING AND PRODUCT GENERATION, ARCHIVAL AND DATA DISTRIBUTION SERVICES, CALIBRATION ASSISTANCE AND DATA ANALYSIS, ANOMALY INVESTIGATION SUPPORT, USER GRANT ADMINISTRATION, OBSERVER ASSISTANCE AND ENGINEERING OPERATIONS SUPPORT. C.", "award_amount": 2533788480, "recipient_uei": "W1NBN156CYF9", "amount_display": "$2,533,788,480.00", "funding_agency": "National Aeronautics and Space Administration", "recipient_name": "ASSOCIATION OF UNIVERSITIES FOR RESEARCH IN ASTRONOMY, INC.", "subaward_count": 9, "awarding_agency": "National Aeronautics and Space Administration", "psc_description": "R&D- SPACE: SCIENCE/APPLICATIONS (BASIC RESEARCH)", "naics_description": "Optical Instrument and Lens Manufacturing", "awarding_sub_agency": "National Aeronautics and Space Administration", "generated_internal_id": "CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-" } ``` ## Documentation ## Overview Fetch one US federal award. `query` is `generated_internal_id` from search, for example `CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-`, or a `https://www.usaspending.gov/award/...` URL. The response is a flat object. `award_amount` and `amount_display` describe the same obligation. ## Quickstart ``` curl -sS -H "x-api-key: YOUR_API_KEY" "https://api.piloterr.com/v2/usaspending/award?query=CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-" ``` ## Parameters | Name | Detail | |---|---| | query | Required string. Generated award id or a usaspending.gov/award URL. Example: `CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-`. | ## Response fields | Name | Detail | |---|---| | award_id | String or null. PIID. | | generated_internal_id | String. Same id you requested. | | category | String or null. For example `contract`. | | award_type | String or null. Type description, for example `DEFINITIVE CONTRACT`. | | type_code | String or null. | | description | String or null. | | award_amount | Number or null. | | amount_display | String or null. Dollar text for `award_amount`. | | recipient_name | String or null. | | recipient_uei | String or null. | | awarding_agency | String or null. | | awarding_sub_agency | String or null. | | funding_agency | String or null. | | start_date | String or null. | | end_date | String or null. | | date_signed | String or null. | | city | String or null. | | state | String or null. State code on this endpoint. | | country | String or null. | | naics_code | String or null. | | naics_description | String or null. | | psc_code | String or null. | | psc_description | String or null. | | subaward_count | Integer or null. | | url | String. Award page. | ## Pagination One award. No `pagination` object. ## Use cases - An analyst opens `generated_internal_id` from search and reads NAICS plus the place of performance. - A watchdog compares `recipient_uei` on a specific award URL. - A contract database stores `award_amount` and `amount_display` for one PIID. ## Error codes | Name | Detail | |---|---| | 400 | Missing `query`, a non-usaspending host, or a URL that is not an award path. | | 404 | Unknown award id. | | 401 | Missing API key. | | 500 | The USAspending request failed. | ## Related endpoints - [USAspending Search](https://www.piloterr.com/library/usaspending-search)