Index
-
DeveloperKnowledge(interface) -
BatchGetDocumentsRequest(message) -
BatchGetDocumentsResponse(message) -
Document(message) -
DocumentChunk(message) -
DocumentView(enum) -
GetDocumentRequest(message) -
SearchDocumentChunksRequest(message) -
SearchDocumentChunksResponse(message)
DeveloperKnowledge
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.
The API is designed to be the canonical source for machine-readable access to Google's developer documentation.
A typical use case is to first use DeveloperKnowledge.SearchDocumentChunks
to find relevant page URIs based on a query, and then use DeveloperKnowledge.GetDocument
or DeveloperKnowledge.BatchGetDocuments
to fetch the full content of the top results.
All document content is provided in Markdown format.
rpc BatchGetDocuments(
BatchGetDocumentsRequest
) returns ( BatchGetDocumentsResponse
)
Retrieves multiple documents, each with its full Markdown content.
- Authorization scopes
-
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/devprofiles.full_control -
https://www.googleapis.com/auth/cloud-platform
For more information, see the OAuth 2.0 Overview .
-
rpc GetDocument(
GetDocumentRequest
) returns ( Document
)
Retrieves a single document with its full Markdown content.
- Authorization scopes
-
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/devprofiles.full_control -
https://www.googleapis.com/auth/cloud-platform
For more information, see the OAuth 2.0 Overview .
-
rpc SearchDocumentChunks(
SearchDocumentChunksRequest
) returns ( SearchDocumentChunksResponse
)
Searches for developer knowledge across Google's developer documentation. Returns DocumentChunk
s based on the user's query. There may be many chunks from the same Document
. To retrieve full documents, use DeveloperKnowledge.GetDocument
or DeveloperKnowledge.BatchGetDocuments
with the DocumentChunk.parent
returned in the SearchDocumentChunksResponse.results
.
- Authorization scopes
-
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/devprofiles.full_control -
https://www.googleapis.com/auth/cloud-platform
For more information, see the OAuth 2.0 Overview .
-
BatchGetDocumentsRequest
Request message for DeveloperKnowledge.BatchGetDocuments
.
| Fields | |
|---|---|
names[]
|
Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the Format: |
view
|
Optional. Specifies the |
BatchGetDocumentsResponse
Response message for DeveloperKnowledge.BatchGetDocuments
.
| Fields | |
|---|---|
documents[]
|
Contains the documents requested. |
Document
A Document represents a piece of content from the Developer Knowledge corpus.
| Fields | |
|---|---|
name
|
Identifier. Contains the resource name of the document. Format: |
uri
|
Output only. Provides the URI of the content, such as |
content
|
Output only. Contains the full content of the document in Markdown format. |
description
|
Output only. Provides a description of the document. |
data_source
|
Output only. Specifies the data source of the document. Example data source: |
title
|
Output only. Provides the title of the document. |
update_time
|
Output only. Represents the timestamp when the content or metadata of the document was last updated. |
view
|
Output only. Specifies the |
DocumentChunk
A DocumentChunk represents a piece of content from a Document
in the DeveloperKnowledge corpus. To fetch the entire document content, pass the parent
to DeveloperKnowledge.GetDocument
or DeveloperKnowledge.BatchGetDocuments
.
| Fields | |
|---|---|
parent
|
Output only. Contains the resource name of the document this chunk is from. Format: |
id
|
Output only. Specifies the ID of this chunk within the document. The chunk ID is unique within a document, but not globally unique across documents. The chunk ID is not stable and may change over time. |
content
|
Output only. Contains the content of the document chunk. |
document
|
Output only. Represents metadata about the |
DocumentView
Specifies which fields of the Document
are included.
| Enums | |
|---|---|
DOCUMENT_VIEW_UNSPECIFIED
|
The default / unset value. See each API method for its default value if DocumentView
is not specified. |
DOCUMENT_VIEW_BASIC
|
Includes only the basic metadata fields: - This is the default of view for |
DOCUMENT_VIEW_FULL
|
Includes all Document
fields. |
DOCUMENT_VIEW_CONTENT
|
Includes the This is the default of view for |
GetDocumentRequest
Request message for DeveloperKnowledge.GetDocument
.
| Fields | |
|---|---|
name
|
Required. Specifies the name of the document to retrieve. Format: |
view
|
Optional. Specifies the |
SearchDocumentChunksRequest
Request message for DeveloperKnowledge.SearchDocumentChunks
.
query
string
Required. Provides the raw query string provided by the user, such as "How to create a Cloud Storage bucket?".
page_size
int32
Optional. Specifies the maximum number of results to return. The service may return fewer than this value.
If unspecified, at most 5 results will be returned.
The maximum value is 20; values above 20 will result in an INVALID_ARGUMENT error.
page_token
string
Optional. Contains a page token, received from a previous SearchDocumentChunks
call. Provide this to retrieve the subsequent page.
filter
string
Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160 .
While SearchDocumentChunks
returns DocumentChunk
s, the filter is applied to DocumentChunk.document
fields.
Supported fields for filtering:
-
data_source(STRING): The source of the document, e.g.docs.cloud.google.com. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus. -
update_time(TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata. -
uri(STRING): The document URI, e.g.https://docs.cloud.google.com/bigquery/docs/tables.
STRING fields support =
(equals) and !=
(not equals) operators for exact matchon the whole string. Partial match, prefix match, and regexp match are not supported.
TIMESTAMP fields support =
, <
, <=
, >
, and >=
operators. Timestamps must be in RFC-3339 format, e.g., "2025-01-01T00:00:00Z"
.
You can combine expressions using AND
, OR
, and NOT
(or -
) logical operators. OR
has higher precedence than AND
. Use parentheses for explicit precedence grouping.
Examples:
-
data_source = "docs.cloud.google.com" OR data_source = "firebase.google.com" -
data_source != "firebase.google.com" -
update_time < "2024-01-01T00:00:00Z" -
update_time >= "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR data_source = "web.dev") -
uri = "https://docs.cloud.google.com/release-notes"
The filter
string must not exceed 500 characters; values longer than 500 characters will result in an INVALID_ARGUMENT
error.
SearchDocumentChunksResponse
Response message for DeveloperKnowledge.SearchDocumentChunks
.
| Fields | |
|---|---|
results[]
|
Contains the search results for the given query. Each |
next_page_token
|
Optional. Provides a token that can be sent as |

