REST API endpoint
GET /v1/prompts/{id} — one tracked question, its rivals and its sources
Everything recorded for a single tracked prompt, including the competitors seen in its answers and the domains those answers cited, by id or by exact text.
Karl-Gustav Kallasmaa, Founder & CEOLast updated The request
Paste this and change the key. Every endpoint takes a bearer key and none takes a workspace id — the key names the workspace.
curl https://api.attensira.com/v1/prompts/prm_8f21?days=30 \
-H "Authorization: Bearer atn_live_<your key>"
Parameters
Every parameter the published reference documents, and nothing it does not.
| Name | In | Type | Default | Notes |
|---|---|---|---|---|
| prompt* | path | string | — | A prompt id, or the prompt's exact text, percent-encoded. Inexact text will not match. |
| days | query | integer | 30 | The window for the returned rates, from 1 to 365. |
The response (200)
Abbreviated, never invented — this is the shape the published reference documents.
{
"id": "prm_8f21",
"text": "best crm for small teams",
"topic": "buying intent",
"country": "US",
"delta": { "value": -0.05, "real": true },
"platforms": {
"chatgpt": { "tracked": true, "readable": true, "rate": { "value": 0.2, "n": 15 } }
},
"competitors": [{ "name": "rival.com", "rate": { "value": 0.6, "n": 25 } }],
"sources": [{ "url": "https://g2.com/categories/crm", "rate": { "value": 0.44, "n": 25 } }]
}
What goes wrong, and what it means
The condition on the left, the correct reading of it on the right.
- Passing prompt text returns nothing
- The match on text is exact, not fuzzy. A stray plural or a different capitalisation misses, and the fallback is GET /v1/search to find the id.
- A prompt containing a slash or a question mark changes the route
- The text goes in a path segment, so it must be percent-encoded. An unencoded slash silently addresses a different path and the failure looks like a missing prompt.
- Competitor rates do not sum to one with yours
- They are not meant to. Each rate uses the same denominator as your own, so they are separate mention rates rather than shares of a category.
What this endpoint cannot tell you
The limits are part of the answer, not a disclaimer under it.
- It cannot rank you against the competitors it lists. The rates are each brand's own mention rate over the same denominator, so a competitor at a higher rate is mentioned more often, not placed above you in any ordering the product computes.
- It cannot explain why a prompt is losing. It reports what was observed in the window; the investigation that reads the pages and audits them as a model sees them is a separate, credit-spending call to the agent.
A prompt is the unit of tracking, and this is the endpoint that opens one up. It returns the prompt's own metadata — its text, the topic it is filed under, the country it runs in — alongside its rates per platform, its change against the previous window, and two lists that are the real reason to call it.
The two lists
The first is competitors: the brands observed in the answers collected for this prompt, each with a rate. The second is sources: the external domains those answers cited, again each with a rate. Both are scoped to this prompt, which is what makes them worth a call of their own.
The analytics endpoint has competitor and source areas too, but those are workspace-wide aggregates. They answer "who shows up against us generally" and "which domains do the models trust in our category". This endpoint answers the much sharper version: on this exact question, in this exact window, who else was named and what did the model lean on. Those are the two facts you need before deciding whether the fix is a page of your own or a mention on somebody else's.
Because both lists come back inline, there is no second call to make. A pipeline that fetches a prompt and then queries the competitor area is asking a broader question and paying an extra round-trip for a worse answer.
Addressing a prompt by what it says
The path parameter takes an id or the prompt's exact text. The text form is a genuine convenience — it removes a search call when you already know the wording, which is the common case for anything driven off a spreadsheet or a config file.
It comes with two sharp edges. The match is exact, so a plural, a trailing space or a different capitalisation misses entirely and returns nothing rather than something approximate. And the text occupies a path segment, so it must be percent-encoded: a prompt containing a slash or a question mark will otherwise address a different route altogether, and the resulting failure looks like a missing prompt rather than a malformed request. If either bites, fall back to search, take the id, and use that.
Reading the rates
The same conventions apply here as everywhere else in the API. Rates carry their denominator, so you can see how much evidence a number rests on. Platforms that your plan does not track are marked as untracked rather than reported as zero, because they were never queried. And the delta carries a flag saying whether the movement cleared the significance test, so a report can distinguish a real decline from a week of noise.
Competitor rates deserve one extra sentence, because they are misread constantly. They use the same denominator as yours — successful runs naming the brand, over all successful runs — which means they are each brand's own mention rate rather than slices of a category. Nothing sums to one hundred percent, and a competitor sitting above you is mentioned more often, not ranked above you by anything Attensira computes. There is no rank here to read.
What comes next after a bad number
This endpoint tells you what happened. It does not tell you why, and it does not propose anything. When a prompt is losing and you want the reason, the agent is the surface for that: it can crawl the relevant pages, audit them the way a model sees them, and search the web, and it costs credits and takes time precisely because it is doing work rather than reading a table.
The right order is almost always the cheap call first. Look at the prompt, look at its sources, form a hypothesis, and only then spend an agent run on the part you genuinely cannot see from here.
Questions people ask
- Can I look a prompt up by its text instead of its id?
- Yes, and it saves a search round-trip when you already know the wording. The match is exact and the text must be percent-encoded, because it goes into a path segment.
- What is in the sources list?
- The external domains cited by the answers collected for this prompt, each with a rate. It is the per-prompt version of the source area in analytics.
- Does this endpoint show every platform?
- It shows the platforms your plan tracks. One that is not tracked comes back marked as such rather than as a zero, because it was never queried.
- How far back can I ask?
- Up to 365 days, with a default of 30. A longer window raises the denominator, which is usually what you want when a prompt has few readings.
- Is there an MCP equivalent?
- Yes — the get_prompt tool, which takes the same prompt argument accepting an id or exact text, and the same days window.
Sources
Every factual statement above, with the page it came from and the date that page was read.
The Attensira API reference states that the prompt path parameter accepts either a prompt id or the prompt's exact text, percent-encoded, and that inexact text will not match.
docs.attensira.com · retrieved
“Required. A prompt id, or the prompt's exact text, percent-encoded”
The API reference states that for the rivals and cited sources of one prompt, GET /v1/prompts/{prompt} already returns both, with no second call needed.
docs.attensira.com · retrieved
“For the rivals and cited sources of one prompt, GET /v1/prompts/{prompt} already returns both — no second call needed.”
Next
- GET /v1/analytics/{area}GET /v1/analytics/{area} — the eight ranked slices of your data
- GET /v1/searchGET /v1/search — find a prompt, page or session by wording
- POST /v1/promptsPOST /v1/prompts — start tracking, and what it costs
- DELETE /v1/prompts/{prompt}DELETE /v1/prompts/{prompt} — stop tracking, and lose the history