Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIUSAspending

    usaspending.award

    One US federal award from USAspending.gov in full: amounts, dates, agencies, recipient and parent, place of performance, NAICS and PSC codes, competition, set-aside and subawards.

    Id
    usaspending.award
    Version
    1
    Billed per
    request — 1 unit for a charged run
    Runs
    within one request

    Start it with POST /v1/scrapers/usaspending.award/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.

    Inputs

    The fields of input. A field that is not listed here is refused.

    Inputs of usaspending.award
    FieldTypeDescription
    awardrequiredstringUSAspending's id of the award, as usaspending.awards gives it in internal_id, or its address on usaspending.gov.Limit: at least 8 characters, at most 260 characters.

    Record fields

    Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.

    Record fields of usaspending.award
    FieldTypeNotes
    internal_idstringUSAspending's id of the award.
    award_idstring or nullThe award's number (PIID or FAIN).
    urlstringThe award's page on usaspending.gov.
    categorystring or nullcontract, idv, grant, loans, direct payment or other.
    type_descriptionstring or nullThe type of award, e.g. DELIVERY ORDER.
    descriptionstring or nullThe award's description.
    amountnumber or nullThe total obligated, in US dollars.
    base_and_all_optionsnumber or nullThe ceiling with every option exercised, in US dollars.
    date_signedstring or nullThe day it was signed, YYYY-MM-DD.
    start_datestring or nullThe start of the period of performance, YYYY-MM-DD.
    end_datestring or nullIts current end, YYYY-MM-DD.
    potential_end_datestring or nullIts end with every option, YYYY-MM-DD.
    last_modified_datestring or nullThe day the award last changed, YYYY-MM-DD.
    awarding_agencystring or nullThe department that made the award.
    awarding_sub_agencystring or nullThe agency within it.
    awarding_officestring or nullThe contracting office.
    funding_agencystring or nullThe department that pays for it.
    recipient_namestring or nullWho received the award.
    recipient_idstring or nullUSAspending's id of the recipient.
    recipient_ueistring or nullThe recipient's Unique Entity ID.
    parent_namestring or nullThe recipient's parent company.
    recipient_citystring or nullThe recipient's city.
    recipient_statestring or nullThe recipient's state, as two letters.
    recipient_countrystring or nullThe recipient's country.
    business_categoriesarray of stringThe recipient's business categories, as USAspending lists them.
    performance_citystring or nullWhere the work is done: the city.
    performance_statestring or nullWhere the work is done: the state, as two letters.
    performance_countrystring or nullWhere the work is done: the country.
    naics_codestring or nullThe NAICS industry code.
    naics_descriptionstring or nullWhat that code means.
    psc_codestring or nullThe product or service code.
    psc_descriptionstring or nullWhat that code means.
    competitionstring or nullHow it was competed, e.g. FULL AND OPEN COMPETITION.
    offers_receivedinteger or nullHow many offers were received.
    set_asidestring or nullThe small-business set-aside, if any.
    solicitation_idstring or nullThe solicitation's number.
    parent_award_idstring or nullThe number of the vehicle this order is placed under.
    subaward_countinteger or nullHow many subawards are reported.
    subaward_amountnumber or nullTheir total, in US dollars.
    fetched_atstring (date-time)When USAspending was asked, in UTC.

    Example request

    # Start a run and wait up to 60 seconds for it to finish
    curl -X POST "https://api.enrichednow.com/v1/scrapers/usaspending.award/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"award":"CONT_AWD_FA862118F6251_9700_FA862115D6276_9700"}}'
    
    # Read its records, with the id the first call answered
    curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
    from enrichednow import EnrichedNow
    
    client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY
    
    # Start a run, wait for it to end, and get its records
    result = client.scrape("usaspending.award", {
        "award": "CONT_AWD_FA862118F6251_9700_FA862115D6276_9700",
    })
    print(result.run.id, result.run.status, result.run.record_count)
    
    # Read its records: pages are fetched as you go
    for record in result.records:
        print(record)

    Install it with pip install enrichednow, then save as run.py and run python3 run.py

    import EnrichedNow from "enrichednow";
    
    const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
    
    // Start a run, wait for it to end, and get its records
    const { run, records } = await client.scrape("usaspending.award", {
      award: "CONT_AWD_FA862118F6251_9700_FA862115D6276_9700",
    });
    console.log(run.id, run.status, run.record_count);
    
    // Read its records: pages are fetched as you go
    for await (const record of records) console.log(record);

    Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

    package main
    
    import (
    	"context"
    	"fmt"
    	"log"
    	"time"
    
    	enrichednow "github.com/enrichednow/enrichednow-go"
    )
    
    func main() {
    	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
    	if err != nil {
    		log.Fatal(err)
    	}
    	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
    	defer cancel()
    
    	// Start a run, wait for it to end, and get its records
    	run, records, err := client.Scrape(ctx, "usaspending.award", map[string]any{"award": "CONT_AWD_FA862118F6251_9700_FA862115D6276_9700"})
    	if err != nil {
    		log.Fatal(err)
    	}
    	fmt.Println(run.ID, run.Status, run.RecordCount)
    
    	// Read its records: pages are fetched as you go
    	for records.Next() {
    		fmt.Println(string(records.Current()))
    	}
    	if err := records.Err(); err != nil {
    		log.Fatal(err)
    	}
    }

    Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

    import com.enrichednow.EnrichedNowClient;
    import com.enrichednow.ScrapeResult;
    import java.util.Map;
    
    public class Run {
        public static void main(String[] args) {
            EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
    
            // Start a run, wait for it to end, and get its records
            ScrapeResult result = client.scrape("usaspending.award", Map.of("award", "CONT_AWD_FA862118F6251_9700_FA862115D6276_9700"));
            System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
    
            // Read its records: pages are fetched as you go
            for (Map<String, Object> record : result.records()) {
                System.out.println(record);
            }
        }
    }

    Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

    enrichednow run usaspending.award --input award=CONT_AWD_FA862118F6251_9700_FA862115D6276_9700

    Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

    It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.

    The body on its own:

    JSON
    {
      "input": {
        "award": "CONT_AWD_FA862118F6251_9700_FA862115D6276_9700"
      }
    }

    Example response

    The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.

    JSON
    {
      "id": "run_841742f37553189ff9c27ba1",
      "scraper_id": "usaspending.award",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "award": "CONT_AWD_FA862118F6251_9700_FA862115D6276_9700"
      },
      "record_count": 1,
      "units": 1,
      "units_per_request": 1,
      "units_per_record": null,
      "units_per_page": null,
      "diagnostics": {
        "requests": 1,
        "bytes": 259214,
        "wall_ms": 885,
        "facts": {}
      },
      "created_at": "2026-11-16T22:37:50.170950Z",
      "started_at": "2026-11-16T22:37:50.178331Z",
      "finished_at": "2026-11-16T22:37:51.066313Z"
    }

    Its records, from GET /v1/runs/{id}/records. The record is a real one: this scraper's own parser read it from a page recorded from the site.

    JSON
    {
      "records": [
        {
          "internal_id": "CONT_AWD_FA862118F6251_9700_FA862115D6276_9700",
          "award_id": "FA862118F6251",
          "url": "https://www.usaspending.gov/award/CONT_AWD_FA862118F6251_9700_FA862115D6276_9700",
          "category": "contract",
          "type_description": "DELIVERY ORDER",
          "description": "IGF::OT::IGF AFSOC ACTS AWARD OF CONTRACT FOR CLS, ENGINEERING, INSTRUCTION, CYBERSECURITY, DMO",
          "amount": 666315748.84,
          "base_and_all_options": 731294259.09,
          "date_signed": "2018-02-08",
          "start_date": "2018-02-08",
          "end_date": "2027-01-31",
          "potential_end_date": "2027-01-31",
          "last_modified_date": "2026-06-15",
          "awarding_agency": "Department of Defense",
          "awarding_sub_agency": "Department of the Air Force",
          "awarding_office": "FA8621 AFLCMC WNSK SIMS",
          "funding_agency": "Department of Defense",
          "recipient_name": "LOCKHEED MARTIN CORPORATION",
          "recipient_id": "ea75ddee-2d00-ac7f-5e72-6f42d7c88c8c-C",
          "recipient_uei": "KDT2YLB34NT6",
          "parent_name": "LOCKHEED MARTIN CORP",
          "recipient_city": "ORLANDO",
          "recipient_state": "FL",
          "recipient_country": "UNITED STATES",
          "business_categories": [
            "Category Business",
            "Corporate Entity Not Tax Exempt",
            "Manufacturer of Goods"
          ],
          "performance_city": "ORLANDO",
          "performance_state": "FL",
          "performance_country": "UNITED STATES",
          "naics_code": "336413",
          "naics_description": "Other Aircraft Parts and Auxiliary Equipment Manufacturing",
          "psc_code": "J069",
          "psc_description": "MAINT/REPAIR/REBUILD OF EQUIPMENT- TRAINING AIDS AND DEVICES",
          "competition": "FULL AND OPEN COMPETITION",
          "offers_received": 4,
          "set_aside": null,
          "solicitation_id": null,
          "parent_award_id": "FA862115D6276",
          "subaward_count": 509,
          "subaward_amount": 533126904.2,
          "fetched_at": "2026-11-23T23:15:36.512516Z"
        }
      ],
      "next_cursor": null
    }

    What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with … [truncated].

    • Shortened: business_categories: 6 items, the first 3 shown.

    A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the USAspending scrapers are in their own section there.