TL;DR
- Google released the Developer Knowledge API, a programmatic interface to official Google developer documentation indexed frequently and designed for AI agents and developer tools
- The ecosystem includes gcloud CLI commands, an MCP-compatible agent skill, client libraries for C#, Go, Java, Node.js, TypeScript, PHP, Python, and Ruby, and an interactive API Explorer
- The API supports semantic and keyword search, intelligent document chunking, and grounded Q&A to reduce hallucinations from stale LLM training data
- Developer Knowledge integrates across coding assistants including Claude Code, Cursor, GitHub Copilot, and custom frameworks via Model Context Protocol
- API type
- Structured documentation
- Coverage
- Google Cloud, Firebase, Android
- Client libraries
- 7 language ecosystems supported
What is the Developer Knowledge API
Google released the Developer Knowledge API as an official, programmatic source of truth for developer documentation. Rather than relying on brittle web-scraping or outdated LLM training data, the API delivers fresh, Markdown-formatted documentation across Google Cloud, Firebase, Android, and additional Google services. The API is indexed frequently to ensure minimal lag between upstream updates and when documentation becomes available to agents and tools.
Tools and interfaces
The ecosystem encompasses multiple interfaces for different workflows. The gcloud CLI surface integrates documentation search and retrieval directly into command-line environments, pre-installed in Cloud Shell and compatible with standard Google Cloud SDK installations on Linux, macOS, and Windows. Key commands include answer-query for grounded answers, documents search-chunks for snippet retrieval, and documents describe for metadata and full content.
- answer-query retrieves grounded answers in the terminal
- documents search-chunks searches across Google documentation snippets
- documents describe retrieves metadata and content for specific documents
gcloud developer-knowledge answer-query --query="How do I create a BigQuery dataset?"
gcloud developer-knowledge documents search-chunks --query="Firestore transactions"
gcloud developer-knowledge documents describe "documents/docs.cloud.google.com/storage/docs/creating-buckets"Agent skill and programming interfaces
The Developer Knowledge agent skill links AI coding assistants to Google's documentation ecosystem via Model Context Protocol, enabling autonomous tools to access current technical specifications. The skill reduces hallucinations by grounding responses in up-to-date Google documentation rather than relying on training data cutoffs. It uses a multi-step retrieval workflow that inspects code and documentation chunks before fetching complete pages, optimizing token and context usage.
Client libraries provide programmatic access for production systems, CI/CD pipelines, and enterprise knowledge bots. Libraries are available for C#, Go, Java, Node.js and TypeScript, PHP, Python, and Ruby. Each library provides native type definitions, builder patterns, and asynchronous execution tailored to its language. The BatchGetDocuments method enables retrieving up to 20 documents in a single API call, and all libraries support Google Cloud Application Default Credentials and automatic retries.
- Supports standard MCP integration across Google Antigravity, Claude Code, Cursor, GitHub Copilot, and custom frameworks
- Programmatic endpoints: AnswerQuery, SearchDocumentChunks, GetDocument, BatchGetDocuments
from google.cloud import developer_knowledge_v1
def FetchMyProductReleaseNotes(my_product_name: str) -> str:
my_api_client = developer_knowledge_v1.DeveloperKnowledgeClient()
my_search_query = f"{my_product_name} latest release notes"
my_request = developer_knowledge_v1.SearchDocumentChunksRequest(
query=my_search_query,
)
my_response = my_api_client.search_document_chunks(request=my_request)
my_release_notes = [my_chunk.text for my_chunk in my_response.chunks]
return "\n".join(my_release_notes)What developers should do
Developers already using gcloud CLI can start querying official documentation immediately via the gcloud CLI surface. Those integrating with AI coding assistants can enable the agent skill by running npx skills add google/skills --skill retrieving-developer-knowledge, which installs the Developer Knowledge agent skill in their project. The skill works with the MCP server or falls back to the REST API via curl when MCP is not available.
The interactive API Explorer offers a zero-code interface for experimenting with API requests and verifying response structures. It provides access to core endpoints for searching, retrieving, and answering queries against Google documentation.
npx skills add google/skills --skill retrieving-developer-knowledgeSource
Google Developers Bloghttps://developers.googleblog.com/supercharge-your-development-with-the-google-developer-knowledge-api-ecosystem/AI-assisted, verified against the source. This post was drafted with AI from the primary source linked above and checked automatically against it. For anything you depend on, read the original.
- #googlecloud
- #aiagents
- #developertools
- #api
- #documentation



