
Google Developer Knowledge
- 61 installs
- 124 repo stars
- Updated February 6, 2026
- cnemri/google-genai-skills
Searches and retrieves Google's developer documentation (ai.google.dev, Android, Chrome, Firebase, Cloud, web.dev) via the Developer Knowledge API with curl scripts.
About
Queries Google's developer documentation corpus through the Developer Knowledge API, returning chunks or full documents. A developer uses it to search or pull Google/Android/Firebase/Cloud docs from the terminal.
- Search, get-document, and batch-get up to 20 docs
- Curl-only scripts; needs DEVELOPERKNOWLEDGE_API_KEY
Google Developer Knowledge by the numbers
- 61 all-time installs (skills.sh)
- Ranked #743 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cnemri/google-genai-skills --skill google-developer-knowledgeAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 61 |
|---|---|
| repo stars | ★ 124 |
| Last updated | February 6, 2026 |
| Repository | cnemri/google-genai-skills ↗ |
What it does
Searches and retrieves Google's developer documentation (ai.google.dev, Android, Chrome, Firebase, Cloud, web.dev) via the Developer Knowledge API with curl scripts.
Files
Google Developer Knowledge
Use this skill to search and retrieve content from Google's public developer documentation corpus using the Developer Knowledge API.
This skill uses simple bash scripts with curl (no dependencies required).
Prerequisites
1. Enable the API: Enable the Developer Knowledge API in your Google Cloud project.
2. Create an API Key:
- Go to the Credentials page
- Click Create credentials → API key
- Restrict the key to Developer Knowledge API only
3. Set Environment Variable:
-
DEVELOPERKNOWLEDGE_API_KEY: Your Developer Knowledge API key
Searchable Corpus
The API searches these domains:
-
ai.google.dev -
developer.android.com -
developer.chrome.com -
developers.google.com -
docs.cloud.google.com -
firebase.google.com -
web.dev -
www.tensorflow.org
Usage
1. Search for Documents
Search for document chunks matching a query. Returns snippets and parent document references.
./skills/google-developer-knowledge/scripts/search_docs.sh "How to use Gemini API in Python"With pagination:
./skills/google-developer-knowledge/scripts/search_docs.sh "BigQuery" --page-size 102. Get a Single Document
Retrieve the full content of a document using its name from search results.
./skills/google-developer-knowledge/scripts/get_document.sh "documents/ai.google.dev/gemini-api/docs/get-started/python"Save to file:
./skills/google-developer-knowledge/scripts/get_document.sh "documents/ai.google.dev/..." --output doc.json3. Batch Get Documents
Retrieve up to 20 documents in a single API call.
./skills/google-developer-knowledge/scripts/batch_get_documents.sh \
"documents/ai.google.dev/gemini-api/docs/get-started/python" \
"documents/ai.google.dev/gemini-api/docs/models"Options
search_docs.sh
-
query: The search query (required) -
--page-size: Number of results (1-20, default 5) -
--page-token: Token for next page of results -
--output: Save results to JSON file
get_document.sh
-
name: Document name from search results (required) -
--output: Save content to file
batch_get_documents.sh
-
names: Space-separated document names (up to 20) -
--output: Save all documents to directory
#!/usr/bin/env bash
# Batch get documents from Google Developer Documentation using the Developer Knowledge API
set -e
# Check for API key
if [ -z "$DEVELOPERKNOWLEDGE_API_KEY" ]; then
echo "============================================================"
echo "AGENT ERROR: Missing Developer Knowledge API key!"
echo "============================================================"
echo ""
echo "To use the Developer Knowledge API, the user must:"
echo ""
echo "1. Enable the Developer Knowledge API in Google Cloud:"
echo " https://console.cloud.google.com/apis/library/developerknowledge.googleapis.com"
echo ""
echo "2. Create an API key restricted to Developer Knowledge API:"
echo " https://console.cloud.google.com/apis/credentials"
echo ""
echo "3. Add to .env file:"
echo " DEVELOPERKNOWLEDGE_API_KEY=<your-api-key>"
echo ""
echo "Please ask the user to configure their API key before retrying."
echo "============================================================"
exit 1
fi
OUTPUT=""
NAMES=()
# Parse arguments
while [[ $# -gt 0 ]]; do
case $1 in
--output)
OUTPUT="$2"
shift 2
;;
-h|--help)
echo "Usage: batch_get_documents.sh <name1> [name2] ... [--output DIR]"
echo ""
echo "Batch get documents from Google Developer Documentation."
echo ""
echo "Arguments:"
echo " names Document names (up to 20)"
echo " --output Save documents to directory"
exit 0
;;
*)
NAMES+=("$1")
shift
;;
esac
done
if [ ${#NAMES[@]} -eq 0 ]; then
echo "Error: At least one document name is required"
echo "Usage: batch_get_documents.sh <name1> [name2] ... [--output DIR]"
exit 1
fi
if [ ${#NAMES[@]} -gt 20 ]; then
echo "Error: Maximum 20 documents can be retrieved in a batch"
exit 1
fi
# Build URL with names parameters
URL="https://developerknowledge.googleapis.com/v1alpha/documents:batchGet?key=$DEVELOPERKNOWLEDGE_API_KEY"
for name in "${NAMES[@]}"; do
# Ensure name starts with documents/
if [[ ! "$name" == documents/* ]]; then
name="documents/$name"
fi
URL="${URL}&names=$name"
done
# Make request
RESPONSE=$(curl -s "$URL")
if [ -n "$OUTPUT" ]; then
mkdir -p "$OUTPUT"
echo "$RESPONSE" > "$OUTPUT/batch_result.json"
echo "Results saved to $OUTPUT/batch_result.json"
else
echo "$RESPONSE"
fi
#!/usr/bin/env bash
# Get a document from Google Developer Documentation using the Developer Knowledge API
set -e
# Check for API key
if [ -z "$DEVELOPERKNOWLEDGE_API_KEY" ]; then
echo "============================================================"
echo "AGENT ERROR: Missing Developer Knowledge API key!"
echo "============================================================"
echo ""
echo "To use the Developer Knowledge API, the user must:"
echo ""
echo "1. Enable the Developer Knowledge API in Google Cloud:"
echo " https://console.cloud.google.com/apis/library/developerknowledge.googleapis.com"
echo ""
echo "2. Create an API key restricted to Developer Knowledge API:"
echo " https://console.cloud.google.com/apis/credentials"
echo ""
echo "3. Add to .env file:"
echo " DEVELOPERKNOWLEDGE_API_KEY=<your-api-key>"
echo ""
echo "Please ask the user to configure their API key before retrying."
echo "============================================================"
exit 1
fi
OUTPUT=""
# Parse arguments
while [[ $# -gt 0 ]]; do
case $1 in
--output)
OUTPUT="$2"
shift 2
;;
-h|--help)
echo "Usage: get_document.sh <document-name> [--output FILE]"
echo ""
echo "Get a document from Google Developer Documentation."
echo ""
echo "Arguments:"
echo " document-name Document name (e.g., documents/ai.google.dev/gemini-api/docs/get-started/python)"
echo " --output Save content to file"
exit 0
;;
*)
DOC_NAME="$1"
shift
;;
esac
done
if [ -z "$DOC_NAME" ]; then
echo "Error: Document name is required"
echo "Usage: get_document.sh <document-name> [--output FILE]"
exit 1
fi
# Ensure name starts with documents/
if [[ ! "$DOC_NAME" == documents/* ]]; then
DOC_NAME="documents/$DOC_NAME"
fi
# Make request
URL="https://developerknowledge.googleapis.com/v1alpha/$DOC_NAME?key=$DEVELOPERKNOWLEDGE_API_KEY"
RESPONSE=$(curl -s "$URL")
if [ -n "$OUTPUT" ]; then
echo "$RESPONSE" > "$OUTPUT"
echo "Document saved to $OUTPUT"
else
echo "$RESPONSE"
fi
#!/usr/bin/env bash
# Search Google Developer Documentation using the Developer Knowledge API
set -e
# Check for API key
if [ -z "$DEVELOPERKNOWLEDGE_API_KEY" ]; then
echo "============================================================"
echo "AGENT ERROR: Missing Developer Knowledge API key!"
echo "============================================================"
echo ""
echo "To use the Developer Knowledge API, the user must:"
echo ""
echo "1. Enable the Developer Knowledge API in Google Cloud:"
echo " https://console.cloud.google.com/apis/library/developerknowledge.googleapis.com"
echo ""
echo "2. Create an API key restricted to Developer Knowledge API:"
echo " https://console.cloud.google.com/apis/credentials"
echo ""
echo "3. Add to .env file:"
echo " DEVELOPERKNOWLEDGE_API_KEY=<your-api-key>"
echo ""
echo "Please ask the user to configure their API key before retrying."
echo "============================================================"
exit 1
fi
# Defaults
PAGE_SIZE=5
PAGE_TOKEN=""
OUTPUT=""
# Parse arguments
while [[ $# -gt 0 ]]; do
case $1 in
--page-size)
PAGE_SIZE="$2"
shift 2
;;
--page-token)
PAGE_TOKEN="$2"
shift 2
;;
--output)
OUTPUT="$2"
shift 2
;;
-h|--help)
echo "Usage: search_docs.sh <query> [--page-size N] [--page-token TOKEN] [--output FILE]"
echo ""
echo "Search Google Developer Documentation."
echo ""
echo "Arguments:"
echo " query The search query"
echo " --page-size Number of results (1-20, default: 5)"
echo " --page-token Token for next page of results"
echo " --output Save results to JSON file"
exit 0
;;
*)
QUERY="$1"
shift
;;
esac
done
if [ -z "$QUERY" ]; then
echo "Error: Query is required"
echo "Usage: search_docs.sh <query> [--page-size N] [--page-token TOKEN] [--output FILE]"
exit 1
fi
# Build URL
URL="https://developerknowledge.googleapis.com/v1alpha/documents:searchDocumentChunks?query=$(echo "$QUERY" | sed 's/ /%20/g')&pageSize=$PAGE_SIZE&key=$DEVELOPERKNOWLEDGE_API_KEY"
if [ -n "$PAGE_TOKEN" ]; then
URL="${URL}&pageToken=$PAGE_TOKEN"
fi
# Make request
RESPONSE=$(curl -s "$URL")
if [ -n "$OUTPUT" ]; then
echo "$RESPONSE" > "$OUTPUT"
echo "Results saved to $OUTPUT"
else
echo "$RESPONSE"
fi