Quickstart
1. Get a key and credits
Section titled “1. Get a key and credits”Sign in to the console, create an API key, and top up your credits. New accounts start at 0 credits and must add funds before submitting queries. Save your key immediately; it is shown only once.
2. Verify the key
Section titled “2. Verify the key”export GEOEVAL_API_KEY="geo_live_..."curl https://geo-api.geoeval.com/v1/me -H "Authorization: Bearer $GEOEVAL_API_KEY"3. Submit a query
Section titled “3. Submit a query”# uuidgen prints a new UUID. Send the same value when you retry a submission, so it is charged onceIDEMPOTENCY_KEY=$(uuidgen)
curl -X POST https://geo-api.geoeval.com/v1/queries \-H "Authorization: Bearer $GEOEVAL_API_KEY" \-H "Content-Type: application/json" \-H "Idempotency-Key: $IDEMPOTENCY_KEY" \-d '{"query":"Which robot vacuum is the best choice?","apps":["doubao"]}'The API responds with 202 and a query_id, then processes the query asynchronously.
4. Read the result
Section titled “4. Read the result”curl https://geo-api.geoeval.com/v1/queries/$QUERY_ID -H "Authorization: Bearer $GEOEVAL_API_KEY"Poll while status is pending. Most tasks finish in roughly a minute, though the first request after an idle period may take a few minutes. When a task reaches done, read its answer from tasks[].result.answer_markdown.
Complete example
Section titled “Complete example”// Node 24+ runs this file as it is. Submits a query, waits until it is final and prints the answers.export {};
const API = "https://geo-api.geoeval.com";const headers = { Authorization: `Bearer ${process.env.GEOEVAL_API_KEY}` };
interface Task { app: string; status: "queued" | "running" | "uploaded" | "parsing" | "done" | "failed" | "unavailable"; error: string | null; result: { answer_markdown: string } | null;}
interface Query { query_id: string; status: "pending" | "completed" | "timeout" | "failed"; tasks: Task[];}
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
async function call(path: string, init: { method?: string; headers?: Record<string, string>; body?: string } = {}): Promise<Query> { for (;;) { const response = await fetch(API + path, { ...init, headers: { ...headers, ...init.headers } }); const data = (await response.json().catch(() => ({}))) as { code?: string; message?: string }; // 429 rate_limited and 503 are temporary: wait and repeat the same request if (response.status === 503 || (response.status === 429 && data.code === "rate_limited")) { await sleep(Number(response.headers.get("Retry-After") ?? 5) * 1000); continue; } if (!response.ok) throw new Error(`${response.status} ${data.code}: ${data.message}`); return data as Query; }}
let query = await call("/v1/queries", { method: "POST", // The same Idempotency-Key on a retry returns the same query instead of creating a second one headers: { "Content-Type": "application/json", "Idempotency-Key": crypto.randomUUID() }, body: JSON.stringify({ query: "Which robot vacuum is the best choice?", apps: ["doubao", "kimi"] }),});
// Poll until the query is finalwhile (query.status === "pending") { await sleep(10_000); query = await call(`/v1/queries/${query.query_id}`);}
console.log("query", query.status);for (const task of query.tasks) { if (task.status === "done") console.log(task.app, task.result?.answer_markdown); else console.log(task.app, task.status, task.error);}# pip install requests. Submits a query, waits until it is final and prints the answers.import osimport timeimport uuid
import requests
API = "https://geo-api.geoeval.com"session = requests.Session()session.headers["Authorization"] = f"Bearer {os.environ['GEOEVAL_API_KEY']}"
def call(method, path, **kwargs): while True: response = session.request(method, API + path, timeout=30, **kwargs) # 429 rate_limited and 503 are temporary: wait and repeat the same request if response.status_code == 503 or ( response.status_code == 429 and response.json().get("code") == "rate_limited" ): time.sleep(int(response.headers.get("Retry-After", 5))) continue if not response.ok: raise RuntimeError(response.text) return response.json()
query = call( "POST", "/v1/queries", # The same Idempotency-Key on a retry returns the same query instead of creating a second one headers={"Idempotency-Key": str(uuid.uuid4())}, json={"query": "Which robot vacuum is the best choice?", "apps": ["doubao", "kimi"]},)
while query["status"] == "pending": time.sleep(10) query = call("GET", f"/v1/queries/{query['query_id']}")
print("query", query["status"])for task in query["tasks"]: if task["status"] == "done": print(task["app"], task["result"]["answer_markdown"]) else: print(task["app"], task["status"], task["error"])You can also test endpoints directly in your browser using the interactive playground on any reference page, such as Submit a query.