Prerequisites
- An AthenaHQ API key with access to the website (Organization → API tab). See the Authentication page. A dedicated key scoped to this one website is the safest choice for a scheduled job.
- The
website_idyou want to report on. Fetch it withGET /api/v1/websites. - A saved view on that website, created in the dashboard.
Setup
1
Find the saved view's id
id of the view whose name you want. The id stays the same when someone edits the view in the dashboard, so the export follows those edits.2
Request a month of metrics for the view
is_self: true) and each competitor the view selects.3
Schedule it
Run the request once a month for the month that just ended and append the rows, with the month, to your table. For example, in Python:
Which number matches the dashboard
The dashboard’s Mention Rate card shows the relevant rate by default. In the API that isrelative_mention_rate: mentions of the brand divided by the responses that mention your brand or one of the view’s competitors. mention_rate is the card’s absolute mode: mentions divided by every response in the view. Read the entry with is_self: true for your own brand.
Because the relevant rate counts responses that mention any of the view’s competitors, changing the view’s competitor list changes your own relevant rate too, both in the dashboard and here.
How the view is applied
- Dates.
start_dateandend_datedecide the window; the date range saved with the view is ignored. Send plain dates (YYYY-MM-DD).end_dateis inclusive. - Defaults. Like the dashboard, the view counts active prompts only and every model, unless the view says otherwise. A request without
saved_view_idkeeps the API’s own defaults, which include paused prompts. - Overrides. Any filter you send next to
saved_view_idreplaces the view’s value for that field. For example,"models": ["chatgpt"]reads the view for ChatGPT only. - Other pages’ filters. A saved view is shared with the Prompts, Responses and Sources pages. Filters that only those pages use, such as sentiment or source tags, do not change metrics in the dashboard, and they do not change them here.
- Every metric. The same
saved_view_idworks on all the metrics endpoints: mention rate, share of voice, citation rate and position, cumulative and time series. The MCP metric tools (get_mention_rate_cumulativeand the others) take it too.