For Agents
Search and retrieve U.S. federal government open source repository metadata, agencies, languages, and publishing status from Code.gov.
Get started with Code.gov API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"search U.S. federal open source repositories"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Code.gov API API.
Search the federal open source repository corpus by keyword, agency, or language
Retrieve a single repository record with license, contact, and labor hours
List federal agencies that publish a code.json under the Federal Source Code Policy
Read agency-level publishing status, fetch issues, and last fetched timestamp
GET STARTED
Use for: I want to find federal repositories that mention a specific topic, Search for federal projects published by NASA or another named agency, Get a single repository by its Code.gov repo ID, List every federal agency tracked by Code.gov
Not supported: Does not host repository contents, modify federal code records, or expose non-public agency data — use for discovery and metadata over the public federal open source inventory only.
The Code.gov API is the public interface to the U.S. Federal Government's open source software inventory, created under the Federal Source Code Policy. It exposes endpoints to search and retrieve repository metadata, list publishing agencies, surface programming languages used across federal code, and check the publishing status of each agency's code.json. Civic developers, researchers, and federal contractors use it to find reusable code, evaluate compliance with the policy, and study how federal teams build software.
List programming languages with the count of federal repositories using each
Pull popular terms used across federal repository metadata
Check the deployed Code.gov API version, git commit, and source repository
Patterns agents use Code.gov API API for, with concrete tasks.
★ Reuse-First Federal Procurement
Federal contractors and procurement officers use Code.gov to satisfy the reuse-first requirement of the Federal Source Code Policy before commissioning new work. The /repos endpoint accepts keyword search and /repos/{repoId} returns the metadata, license, and contact for evaluating whether existing code can be adapted to the new requirement.
Search /repos for the keyword 'document classification' and return the top 10 candidates with license and contact information.
Federal Open Source Compliance Tracking
Civic technologists and oversight researchers track which federal agencies are publishing under the Federal Source Code Policy and which are failing using the agency and status endpoints. /agencies, /status/{agencyName}/issues, and /status/{agencyName}/fetched expose the data needed to publish compliance scorecards and historical trends.
List all agencies, then for each call /status/{agencyName}/fetched and report any whose last fetch is older than 30 days.
Federal Software Research Datasets
Academic and policy researchers studying how federal software is built use the corpus-level Code.gov endpoints. /languages returns repository counts per language and /terms returns popular tags, which together support quantitative research into language adoption, license preferences, and topical concentration of federally-funded code.
Pull /languages and /terms and produce a CSV summarising repositories by language and the top 50 terms by count.
AI Agent Federal Repository Search
AI agents helping public sector teams find existing federal code use the Code.gov API through Jentic. The agent searches Jentic for 'search Code.gov repositories', loads the operation, and runs queries against /repos. Because the API is unauthenticated, Jentic forwards requests directly while still giving the agent schema-driven discovery and consistent execution semantics.
Search Jentic for 'search Code.gov repos', load the operation, and search for repositories tagged 'cybersecurity'.
12 endpoints — the code.
METHOD
PATH
DESCRIPTION
/repos
Search federal open source repositories
/repos/{repoId}
Retrieve a single repository by ID
/agencies
List federal agencies
/agencies/{agency_acronym}
Retrieve metadata for a single agency
/languages
List languages with repository counts
/terms
List popular terms across the corpus
/status/{agencyName}/issues
Get publishing issues for an agency
/version
Get the deployed API version
/repos
Search federal open source repositories
/repos/{repoId}
Retrieve a single repository by ID
/agencies
List federal agencies
/agencies/{agency_acronym}
Retrieve metadata for a single agency
/languages
List languages with repository counts
Three things that make agents converge on Jentic-routed access.
Credential isolation
The Code.gov API is unauthenticated in the spec, so no credentials need to be vaulted. If the consumer attaches an api.data.gov key for higher rate limits, Jentic stores it in the vault and injects it at execution time so it does not enter the agent context.
Intent-based discovery
Agents search Jentic by intent (e.g. 'search federal open source code') and Jentic returns the matching Code.gov operation with its input schema, so the agent does not need to read the spec.
Time to first call
Direct Code.gov integration: a few hours to wire HTTP calls and pagination. Through Jentic: under 30 minutes — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
GitHub REST API
Hosts many federal repositories indexed by Code.gov
Use GitHub when the agent needs to read repository contents or pull requests; use Code.gov for federally-scoped discovery.
Code.gov API (code-gov)
Same Code.gov API exposed under the 'code-gov' slug
Either entry resolves to the same upstream Code.gov service; the choice is a routing convenience for the agent runtime.
Data.gov API
Federal open data catalogue covering datasets beyond source code
Use Data.gov when the agent needs federal datasets; use Code.gov when the agent needs federal source code.
Specific to using Code.gov API API through Jentic.
What authentication does the Code.gov API use?
The OpenAPI spec declares no security schemes — the Code.gov API is publicly accessible without an authenticated bearer or API key. In practice api.data.gov fronts the service and applies a default rate-limit tier; through Jentic the request is forwarded with no credentials attached unless the consumer chooses to register an api.data.gov key.
Can I retrieve a specific repository by ID with the Code.gov API?
Yes. Use GET /repos/{repoId} where repoId is the unique identifier returned in the /repos search response. The response includes name, description, repository URL, contact, agency, license permissions, and labor hours for the repository.
What are the rate limits for the Code.gov API?
The OpenAPI spec does not declare a rate limit. The Code.gov service is fronted by api.data.gov which applies the default unauthenticated tier. For higher throughput register an api.data.gov key and pass it via the api_key query parameter or X-Api-Key header as documented by api.data.gov.
How do I search federal repositories through Jentic?
Search Jentic for 'search Code.gov repositories', load the GET /repos operation, and execute it with your keyword. Install with pip install jentic and use the standard async search, load, and execute flow.
Can I see which agencies are failing to publish code.json?
Yes. GET /status/{agencyName}/issues returns the issues encountered while fetching that agency's code.json file, and GET /status/{agencyName}/fetched returns the last successful fetch time. Pair the two to identify agencies that are consistently failing or stale.
How does Code.gov decide which repositories to include?
Code.gov ingests each federal agency's code.json file as required by the Federal Source Code Policy and indexes the listed repositories. The /agencies endpoint shows which agencies are tracked and the /status endpoints expose how recent and complete each ingestion is.
/terms
List popular terms across the corpus
/status/{agencyName}/issues
Get publishing issues for an agency
/version
Get the deployed API version