Create metrics export task
Schedule an asynchronous export task that writes the resulting ZIP archive to cloud storage and exposes it as a presigned download URL. Use this variant when you don't want to keep an HTTP connection open for the duration of the export (for example, for scheduled jobs, very large date ranges, or background pipelines) or when you need files ready to load into BI tools like Looker Studio, BigQuery or Tableau.
The request body is empty; all parameters are passed as query parameters. The date range and the engine filter behave exactly as on the streaming GET variant. Where the GET takes a single entity and metric, this endpoint takes comma-separated entities and metrics so one task can cover several granularities and metrics at once, plus a format selecting how each file is serialized.
The archive holds one file per requested entities × metrics combination, named <entity>_<metric>.<format> — for example prompt_share-of-voice.ndjson. If any individual query fails, the archive also contains an errors.json listing the combinations that could not be produced, and the task reports status: "failed".
format selects how each file is serialized:
ndjson(default) — one JSON object per line, matching theExportRowshape documented on the streaming endpoint. Fields that have no value are omitted from the line.csv— a header row followed by one row per record. The columns are theExportRowfields for the requested entity and metric, sorted alphabetically and identical on every row; a field with no value is written as an empty cell. Columns are fixed by the schema, so the header is present even when the export contains no rows.
The response is 202 Accepted with links.self pointing at the polling endpoint (GET /api/v1/exports/{export}). Poll that URL until the status becomes completed (or failed). When the export completes, the polling response includes a resultsUrl, a presigned URL that lets you download the archive. Presigned URLs expire 7 days after generation.
Note
This is a long-running operation. The response includes a links.self URL you can use to keep track of the status of the operation. Learn more about async endpoints here.
Important
Calling this endpoint uses 25 tokens from your rate limit bucket. Learn more about rate limiting here.
Authorization
BearerAuth API token authentication. Use format: Bearer ot_your-token-here
In: header
Path Parameters
Unique identifier for the brand
uuidQuery Parameters
Start date for filtering data (ISO 8601 date format). Range is inclusive.
dateEnd date for filtering data (ISO 8601 date format). Range is inclusive.
dateFilter by AI engine. If empty, returns results for all engines
"google-ai-overviews" | "google-ai-mode" | "perplexity" | "openai" | "gemini" | "grok" | "copilot" | "claude" | "bing-ai-mode"Array of different granularities to be exported. Defaults to all granularities available to the caller.
"brand" | "prompt" | "topic"Array of the different metrics to be exported
"share-of-voice,visibility,citations""share-of-voice" | "visibility" | "citations"The format of the resulting exported files
"ndjson""ndjson" | "csv"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.useomnia.com/api/v1/brands/550e8400-e29b-41d4-a716-446655440000/export?startDate=2026-01-01&endDate=2026-01-31"{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"type": "metrics_export",
"links": {
"self": "https://app.useomnia.com/api/v1/resource"
}
}
}{
"error": {
"code": 1002,
"description": "Invalid input parameters"
}
}{
"error": {
"code": 1004,
"description": "Invalid or expired API token"
}
}{
"error": {
"code": 1006,
"description": "Item not found"
}
}{
"error": {
"code": 1001,
"description": "Internal error"
}
}