Government and law

USAspending API

by api.usaspending.gov

Government and law Added on November 7th, 2026 Checked and working on November 7th, 2026
Visit api.usaspending.gov →

What it does

The USAspending API gives the spending data of the US federal government: budgets per agency, contracts, grants and loans with their recipients and locations, for example to see which companies in a state receive federal contracts. Most searches are POST requests with a JSON filter; answers are JSON. Free, no key needed.
  • API
  • HTTP-GET
  • JSON
  • REST

At a glance

API key
Not needed · More APIs with no key
Pricing
Free, no key needed.
From the browser
Yes (CORS)
Formats
JSON
Interface
REST, HTTP-GET
Provider
api.usaspending.gov
Last checked
Working on November 7th, 2026

More information: https://api.usaspending.gov/

Is this your service? Show that it is listed

Put this badge on your website or in your README; it links to this page. About the badge

Listed on Free Web Services

api.usaspending.gov
USAspending API

Example request

curl

curl 'https://api.usaspending.gov/api/v2/references/toptier_agencies/'

JavaScript

const response = await fetch("https://api.usaspending.gov/api/v2/references/toptier_agencies/");
const data = await response.json();
console.log(data);

Python

import requests

response = requests.get(
    "https://api.usaspending.gov/api/v2/references/toptier_agencies/",
    timeout=30,
)
print(response.json())

The JavaScript works in a web page as well as in Node.js 18 or newer.

Did it work for you?

Tell us what you found when you tried USAspending API.