Resources for Developers
APIs
The following APIs are available for use on official government websites only. You must be a Search.gov customer with an active user account to use them.
- Search Results API — This API exposes all relevant results “modules” in a single JSON call, including: web results, best bets, health topics, job openings, recent news, recent videos, Federal Register documents, and related searches. Use it to pull search results from our service to display on your agency’s website or mobile applications.
- Clicks API - Use this API with the Search Results API to send click data into the system for analysis.
Check out this feature comparison for more information on the differences between using our APIs and the hosted search results page.
Source code
The following source code is open and available in public GitHub repositories for use by everyone.
- search-gov — The source code that runs our core component app, including indexing processes, search request handling, our hosted results page, and Admin Center.
- i14y — The source code that runs our search engine for agencies’ published content. i14y indexes agencies’ published content, for search through our regular search channels.
- Punchcard — The repository of synonyms, protected words, stop words, and other vocabularies that we use to improve the precision, recall, and usability of search results.
- search-gov-website — Pages and layout for our website, https://search.gov.
- Unique Child Attribute — activerecord-validate_unique_child_attribute is an ActiveRecord extension to enforce uniqueness validations when accepting nested attributes.
- Robots Tag Parser — A gem that parses X-Robots-Tag HTTP headers to aid in our indexing.