Developer Knowledge API (developerknowledge:v1alpha)

2026-04-15

4 new methods | New API

Additions

    Methods
  • developerknowledge.answerQuery

  • developerknowledge.documents.searchDocumentChunks

      Parameters :

        query

          Location : query

          Description : Required. Provides the raw query string provided by the user, such as "How to create a Cloud Storage bucket?".

          Type : string

        pageSize

          Type : integer

          Description : 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.

          Location : query

          Format : int32

        pageToken

          Type : string

          Location : query

          Description : Optional. Contains a page token, received from a previous `SearchDocumentChunks` call. Provide this to retrieve the subsequent page.

        filter

          Type : string

          Location : query

          Description : 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 DocumentChunks, 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 match** on 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.

      Path : v1alpha/documents:searchDocumentChunks

      HTTP Method : GET

      Flat Path : v1alpha/documents:searchDocumentChunks

      Description : Searches for developer knowledge across Google's developer documentation. Returns DocumentChunks 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.

      Scopes : https://www.googleapis.com/auth/cloud-platform

  • developerknowledge.documents.batchGet

      Parameters :

        names

          Type : string

          Description : 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 `names` in the request. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`

          Location : query

          Repeated : Yes

        view

          Enum Descriptions :

        • The default / unset value. See each API method for its default value if DocumentView is not specified.
        • Includes only the basic metadata fields: - `name` - `uri` - `data_source` - `title` - `description` - `update_time` - `view` This is the default of view for DeveloperKnowledge.SearchDocumentChunks.
        • Includes all Document fields.
        • Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field. This is the default of view for DeveloperKnowledge.GetDocument and DeveloperKnowledge.BatchGetDocuments.
        • Type : string

          Location : query

          Description : Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.BatchGetDocuments defaults to `DOCUMENT_VIEW_CONTENT`.

          Enum :

        • DOCUMENT_VIEW_UNSPECIFIED
        • DOCUMENT_VIEW_BASIC
        • DOCUMENT_VIEW_FULL
        • DOCUMENT_VIEW_CONTENT

      Flat Path : v1alpha/documents:batchGet

      Scopes : https://www.googleapis.com/auth/cloud-platform

      Description : Retrieves multiple documents, each with its full Markdown content.

      Path : v1alpha/documents:batchGet

      HTTP Method : GET

  • developerknowledge.documents.get

      Path : v1alpha/{+name}

      HTTP Method : GET

      Flat Path : v1alpha/documents/{documentsId}

      Description : Retrieves a single document with its full Markdown content.

      Scopes : https://www.googleapis.com/auth/cloud-platform

      Parameter Order : name

      Parameters :

        view

          Type : string

          Description : Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.GetDocument defaults to `DOCUMENT_VIEW_CONTENT`.

          Enum :

        • DOCUMENT_VIEW_UNSPECIFIED
        • DOCUMENT_VIEW_BASIC
        • DOCUMENT_VIEW_FULL
        • DOCUMENT_VIEW_CONTENT
        • Location : query

          Enum Descriptions :

        • The default / unset value. See each API method for its default value if DocumentView is not specified.
        • Includes only the basic metadata fields: - `name` - `uri` - `data_source` - `title` - `description` - `update_time` - `view` This is the default of view for DeveloperKnowledge.SearchDocumentChunks.
        • Includes all Document fields.
        • Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field. This is the default of view for DeveloperKnowledge.GetDocument and DeveloperKnowledge.BatchGetDocuments.

        name

          Description : Required. Specifies the name of the document to retrieve. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`

          Location : path

          Type : string

          Required : Yes

          Pattern : ^documents/.*$