The Developer Knowledge API provides programmatic access to Google's public developer documentation, enabling you to integrate this knowledge base into your own applications and workflows.
Overview
The Developer Knowledge API is designed to be the canonical source for machine-readable access to Google's developer documentation. It offers functions to search and retrieve documents, and answer queries:
SearchDocumentChunksto find relevant page URIs and content snippets based on a query.GetDocumentorBatchGetDocumentsto fetch the full content of the search result(s).AnswerQueryto generate answers to queries drawn from the documentation corpus.
To get started quickly, follow the Quickstart guide.
The corpus of searchable content is listed in Corpus reference.
The Developer Knowledge API supports searching and retrieving documentation pages as unstructured Markdown content.
Enable the API
To use the Developer Knowledge API, you first need to enable it for your Google Cloud project.
- Open the Developer Knowledge API page in the Google APIs library.
- Check that you have the correct project selected in which you intend to use the API.
- Click Enable. No specific IAM roles are required to enable or use the API.
Authentication
You can authenticate requests to the Developer Knowledge API using one of the following methods:
- API key: authenticate direct REST requests using the
keyquery parameter or theX-Goog-Api-Keyheader. Refer to the REST quickstart for an example. - Application Default Credentials (ADC), OAuth 2.0, or service accounts: authenticate requests when using the official client libraries or production workflows. To learn more about setting up credentials, refer to the Application Default Credentials documentation.
Included documentation
Refer to Corpus reference for information about which documents are searched by the API.
The Developer Knowledge API aims to provide access to the latest Google developer documentation. Our goal is to re-index content within 48 hours of publication so that new or updated documentation is available within 2 business days.Known limitations
- Markdown Quality: The Markdown is generated from the source HTML. There might be some discrepancies or formatting issues.
- Content Scope: Only public pages on the Corpus reference are included. Content from other sources like GitHub, OSS sites, blogs, or YouTube is not included.