USAspending API ReferenceIndependent
Try the API

NAICS Autocomplete

POST/api/v2/autocomplete/naics/

This endpoint is used by the Advanced Search page.

This route sends a request to the backend to retrieve NAICS objects matching the specified search text.

Request

curl -X POST 'https://api.usaspending.gov/api/v2/autocomplete/naics/' \
  -H 'Content-Type: application/json' \
  -d '{
  "search_text": "Defense"
}'

Request body

  • limitnumber

    Number of results to return (min: 1, max: 500)

    Default 10

  • search_textstringRequired

Try it

Runs against the live API. Responses are real data.

POST/api/v2/autocomplete/naics/

Response · 200

  • resultsarray of NAICSMatchRequired3 fields
    • naicsstringRequired
    • naics_descriptionstringRequired
    • year_retirednumberRequiredNullable
Example response
{
  "results": [
    {
      "naics": "",
      "naics_description": "",
      "year_retired": null
    }
  ]
}

Recent changes

Generated from contracts/v2/autocomplete/naics.md in the USAspending API repo.

Loading…