Loading...
Loading...
Access Google's developer documentation programmatically using the Developer Knowledge REST API. Use when you need to search, retrieve, or reference official Google documentation (Firebase, Android, Cloud, Gemini, etc.) via direct HTTP calls instead of MCP.
npx skill4agent add jarmen423/skills google-developer-knowledge-apiIMPORTANT: Despite official documentation suggesting API keys work, the API actually requires OAuth2 authentication (access tokens or ADC).
gcloud auth application-default loginexport GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"gcloud auth application-default print-access-tokenhttps://developerknowledge.googleapis.com/v1alphaAuthorization: Bearer <token>GET /documents:searchDocumentChunks?query={query}querypageSizepageTokendocumentChunks[]parentcontenturiGET /{document_name}document_nameparentdocuments/developers.google.com/...POST /documents:batchGet{
"names": [
"documents/developers.google.com/path/to/doc1",
"documents/developers.google.com/path/to/doc2"
]
}scripts/developer_knowledge_client.pypip install google-auth google-auth-httplib2from developer_knowledge_client import DeveloperKnowledgeClient
# Uses Application Default Credentials automatically
client = DeveloperKnowledgeClient()
# Search for documentation
results = client.search("Cloud Storage buckets")
for chunk in results.get("documentChunks", []):
print(f"URL: {chunk.get('uri')}")
print(f"Content: {chunk.get('content')[:200]}...")
# Get full document
doc = client.get_document(chunk["parent"])
print(doc.get("content"))# Using service account
client = DeveloperKnowledgeClient(service_account_file="/path/to/sa.json")
# Using explicit access token
client = DeveloperKnowledgeClient(access_token="ya29.xxxx")# Search and fetch full documents in one call
docs = client.search_and_get("Firebase authentication", max_results=3)
for doc in docs:
print(doc["content"])export TOKEN=$(gcloud auth application-default print-access-token)curl -H "Authorization: Bearer $TOKEN" \
"https://developerknowledge.googleapis.com/v1alpha/documents:searchDocumentChunks?query=BigQuery"curl -H "Authorization: Bearer $TOKEN" \
"https://developerknowledge.googleapis.com/v1alpha/documents/developers.google.com/path/to/doc"