Overview
Code.gov is the U.S. Federal Government's platform for discovering and sharing open-source software built by federal agencies. Using an API key, you can search across hundreds of government repositories to find reusable code projects. It is useful for developers researching government tech initiatives or looking for publicly available federal code.
Beginner Tip
Request a free API key from code.gov and include it in the Authorization header as a Bearer token to authenticate your requests.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from Code.gov",
"description": "The primary platform for Open Source and code sharing for the U.S. Federal Government",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
total Total number of repositories matching the search criteria. repos List of repository objects returned for the current query. name Name of the open-source repository. agency Federal agency that owns or published the repository. repositoryURL URL to the public source code repository (e.g., GitHub). Implementation Example
const url = "https://code.gov/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →City, Nantes Open Data
City, Nantes Open Data gives developers access to datasets published by Nantes Métropole in France, covering transport, environment, and urban planning.
Data.gov
⭐ Beginner's PickData.gov is the central repository for open data published by U.S.
Deutscher Bundestag DIP
Deutscher Bundestag DIP (Dokumentations- und Informationssystem) provides read access to official German Bundestag data including parliamentary activities, printed materials, persons, and procedures.
FEC
⭐ Beginner's PickThe FEC (Federal Election Commission) API lets you explore campaign finance data from US federal elections, including donations, candidate financials, and committee information.
Gun Policy
Gun Policy provides programmatic access to international firearm injury prevention and policy via REST API.