Developer Knowledge API

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 two main functions:

  • SearchDocumentChunks to find relevant page URIs and content snippets based on a query.
  • GetDocument or BatchGetDocuments to fetch the full content of the search result(s).

To get started quickly, follow the Quickstart guide.

The corpus of searchable content is listed in Corpus reference.

Note for preview: This preview release 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.

  1. Open the Developer Knowledge API page in the Google APIs library.
  2. Check that you have the correct project selected in which you intend to use the API.
  3. Click Enable. No specific IAM roles are required to enable or use the API.

Authentication

A Developer Knowledge API key is required to use the Developer Knowledge API. To create one:

  1. In the Google Cloud console for the project in which you enabled the API, go to the Credentials page.
  2. Click Create credentials, and then select API key from the menu. The API key created dialog displays the string for your newly created key.
  3. Click Edit API key.
  4. In the Name field, provide a name for the key.
  5. Under API restrictions, select Restrict key.
  6. From the Select APIs list, enable Developer Knowledge API and click OK.
  7. Click Save.

Include this Developer Knowledge API key in your requests. For example, REST calls should include it using the key query parameter. Refer to the Quickstart guide for an example.

Included documentation

Refer to Corpus reference for information about which documents are searched by the API.

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.