synthetic-search
Web search using the Synthetic Search API.
Prerequisites
SYNTHETIC_API_KEYenvironment variable with a valid Synthetic API key
Check before use:
[ -z "$SYNTHETIC_API_KEY" ] && echo "Error: SYNTHETIC_API_KEY not set" || echo "OK: SYNTHETIC_API_KEY is set"
Note: Never hardcode SYNTHETIC_API_KEY. Always use the environment variable.
API Endpoint
POST https://api.synthetic.new/v2/search
Search
Perform a web search query.
Request:
curl -s https://api.synthetic.new/v2/search \
-H "Authorization: Bearer $SYNTHETIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "your search query"}'
Response:
{
"results": [
{
"url": "https://example.com/page",
"title": "Page Title",
"text": "Snippet or summary of the page content...",
"published": "2025-11-05T00:00:00.000Z"
}
]
}
Example Usage
# Search for Python requests documentation
curl -s https://api.synthetic.new/v2/search \
-H "Authorization: Bearer $SYNTHETIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "python requests library documentation"}' | jq .
# Search with jq to extract just URLs
curl -s https://api.synthetic.new/v2/search \
-H "Authorization: Bearer $SYNTHETIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "nix flake tutorial"}' | jq -r '.results[].url'
# Search and get titles with URLs
curl -s https://api.synthetic.new/v2/search \
-H "Authorization: Bearer $SYNTHETIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "rust async await"}' | jq -r '.results[] | "\(.title): \(.url)"'
Response Fields
| Field | Type | Description |
|---|---|---|
results |
array | List of search results |
results[].url |
string | URL of the result |
results[].title |
string | Title of the page |
results[].text |
string | Snippet/summary of the content |
results[].published |
string | ISO 8601 publication date |
Error Handling
The API will return appropriate HTTP status codes:
200- Success401- Invalid or missing API key429- Rate limit exceeded500- Server error
More from sirn/dotfiles
code-explain
Explain code, triage changes, or map project structure. Use when user asks to explain, understand, triage, or explore project structure.
19code-plan
Generate comprehensive implementation plan based on analysis. Use when user asks to plan this, create a plan, how should I implement, or wants implementation guidance.
19code-commit
Commit current changes using jj. Analyzes changes, suggests commit messages following repository conventions, proposes splits if needed, and creates commits. Use ONLY when user explicitly asks to commit changes or create commits.
18gemini-reference
Reference for calling the Gemini CLI agent from other agents. ALWAYS read BEFORE invoking Gemini to ensure correct JSON protocol, session management, and subtask delegation patterns.
18code-quality
Run comprehensive quality checks by orchestrating review, verification, testing, and linting. Use when user asks to check code quality, run full checks, or verify code health.
18context7
Retrieve up-to-date documentation context for libraries using the Context7 API. Use when needing current library documentation (React, Python stdlib, Rust, etc.) BEFORE implementing or writing code.
17