API reference
API reference
The Onym API is a REST API for your AI visibility data. It uses predictable URLs, returns JSON, and uses standard HTTP status codes and Bearer authentication.
Replace
YOUR_API_KEY with a key from Settings → API and MCP. Keys are shown once when you create them.Base URL
https://getonym.com/api/v1Every endpoint returns the same numbers as the dashboard for the same filters, with the sample size and 95% range behind each rate. The API is read-only apart from adding prompts.
Authenticated request
curl https://getonym.com/api/v1/domains \
-H "Authorization: Bearer YOUR_API_KEY"import requests
r = requests.get("https://getonym.com/api/v1/domains", headers={"Authorization": "Bearer YOUR_API_KEY"})
print(r.json())const r = await fetch("https://getonym.com/api/v1/domains", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
console.log(await r.json());Conventions
- Domains are addressed by host (
acme.example) or ID. - Rates are numbers from 0 to 1, always with
k,n,lowandhigh. See Rates and changes. - Filters are the same on every analytics endpoint. See Filters.
- Dates are UTC.
run_dateisYYYY-MM-DD; timestamps are ISO 8601. - Errors use one object with a stable
code. See Errors.
Endpoints
| Endpoint | |
|---|---|
GET /domains |
Domains in the workspace |
GET /domains/{domain}/metrics |
Headline metrics with changes |
GET /domains/{domain}/timeseries |
Visibility per run for you and competitors |
GET /domains/{domain}/competitors |
The competitor benchmark |
GET /domains/{domain}/prompts |
Prompts with performance |
GET /domains/{domain}/prompts/{id} |
One prompt in detail |
POST /domains/{domain}/prompts |
Add prompts as suggestions |
GET /domains/{domain}/answers |
Answers, newest first |
GET /domains/{domain}/answers/{id} |
One answer in full |
GET /domains/{domain}/sources |
Cited sites and pages |
GET /domains/{domain}/changes |
Significant changes, run over run |
GET /domains/{domain}/opportunities |
Opportunities with measured impact |
GET /domains/{domain}/datasets/{name} |
Flat datasets for BI tools |
Also available
- OpenAPI spec for code generators and API clients.
- Webhooks to get results pushed after each run.
- The MCP server for AI assistants.