Agencies
GEThttps://api-federal-contracts.dataandapis.com/v1/opportunities/agencies
Agencies é um endpoint da Federal Contracts API. 86.500 oportunidades ativas do SAM.gov e 48.000 adjudicações acima de $1M, pesquisáveis e atualizadas diariamente.
Envie sua chave no header X-Api-Key. Cada chamada custa 1 token; uma chave gratuita inclui 500 tokens por mês.
Requisição
Este endpoint não recebe parâmetros.
Exemplo de requisição
curl
curl "https://api-federal-contracts.dataandapis.com/v1/opportunities/agencies" \
-H "X-Api-Key: YOUR_API_KEY"JavaScript / TypeScript (pacote dataandapis)
// npm install dataandapis
import { DataAndApis } from "dataandapis";
const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY
const data = await client.federalContracts.agencies();Node.js (fetch)
const res = await fetch("https://api-federal-contracts.dataandapis.com/v1/opportunities/agencies", {
headers: { "X-Api-Key": process.env.DATAANDAPIS_KEY },
});
const data = await res.json();Python (pacote dataandapis)
# pip install dataandapis
from dataandapis import DataAndApis
client = DataAndApis() # reads DATAANDAPIS_API_KEY
data = client.federal_contracts.agencies()Python (requests)
import os, requests
r = requests.get(
"https://api-federal-contracts.dataandapis.com/v1/opportunities/agencies",
headers={"X-Api-Key": os.environ["DATAANDAPIS_KEY"]},
)
data = r.json()Guia do pacote npm dataandapis →Guia do pacote Python dataandapis →
Exemplo de resposta
Exemplo de resposta{
"ok": true,
"count": 6,
"agencies": [
{
"agency": "DEPT OF DEFENSE",
"notices": 56589,
"active_notices": 56589
},
{
"agency": "GENERAL SERVICES ADMINISTRATION",
"notices": 8152,
"active_notices": 8152
},
{
"agency": "VETERANS AFFAIRS, DEPARTMENT OF",
"notices": 6976,
"active_notices": 6976
},
{
"agency": "INTERIOR, DEPARTMENT OF THE",
"notices": 2648,
"active_notices": 2648
},
{
"agency": "AGRICULTURE, DEPARTMENT OF",
"notices": 2089,
"active_notices": 2089
…
Ver resposta completa
Exemplo de resposta
{
"ok": true,
"count": 6,
"agencies": [
{
"agency": "DEPT OF DEFENSE",
"notices": 56589,
"active_notices": 56589
},
{
"agency": "GENERAL SERVICES ADMINISTRATION",
"notices": 8152,
"active_notices": 8152
},
{
"agency": "VETERANS AFFAIRS, DEPARTMENT OF",
"notices": 6976,
"active_notices": 6976
},
{
"agency": "INTERIOR, DEPARTMENT OF THE",
"notices": 2648,
"active_notices": 2648
},
{
"agency": "AGRICULTURE, DEPARTMENT OF",
"notices": 2089,
"active_notices": 2089
…{
"ok": true,
"count": 6,
"agencies": [
{
"agency": "DEPT OF DEFENSE",
"notices": 56589,
"active_notices": 56589
},
{
"agency": "GENERAL SERVICES ADMINISTRATION",
"notices": 8152,
"active_notices": 8152
},
{
"agency": "VETERANS AFFAIRS, DEPARTMENT OF",
"notices": 6976,
"active_notices": 6976
},
{
"agency": "INTERIOR, DEPARTMENT OF THE",
"notices": 2648,
"active_notices": 2648
},
{
"agency": "AGRICULTURE, DEPARTMENT OF",
"notices": 2089,
"active_notices": 2089
},
{
"agency": "HOMELAND SECURITY, DEPARTMENT OF",
"notices": 1910,
"active_notices": 1910
}
]
}