API Reference — Grep AI
DevelopersAPI Reference

API Reference

Two ways in: read the auto-generated OpenAPI spec for every endpoint, or jump into the conceptual guides for auth, idempotency, pagination, webhooks, and errors.

Pick a version

Agent2Agent

Call Grep as a research agent.

A2A clients can discover Grep through an Agent Card, start research tasks over JSON-RPC, stream status, cancel runs, and continue from completed research.

Concepts

Cross-cutting guides covering the parts of the API that are easier to understand by topic than by endpoint.

Five-minute quickstart

Create a job, poll for completion. Both shapes shown side-by-side — see the full quickstart for optional idempotency, webhooks, and error handling.

cURL

curl
curl -X POST "https://api.grep.ai/api/v2/research" \
  -H "Authorization: Bearer $GREP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Due diligence on Stripe Inc",
    "effort": "medium"
  }'

Python

python
import os, httpx

r = httpx.post(
    "https://api.grep.ai/api/v2/research",
    headers={"Authorization": f"Bearer {os.environ['GREP_API_KEY']}"},
    json={"question": "Due diligence on Stripe Inc", "effort": "medium"},
)
print(r.json()["job_id"])
Read the full quickstart