Call it
curl https://api.peume.com/v1/call/change-in-llm-mentions-between-two-dates-for-a \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"target": [
{
"domain": "example.com",
"search_filter": "exclude"
},
{
"keyword": "bmw",
"search_scope": [
"answer"
]
}
],
"date_from": "2025-08-01",
"date_to": "2025-12-01",
"group_range": "month",
"location_code": 2840,
"language_name": "English"
}
}'const res = await fetch("https://api.peume.com/v1/call/change-in-llm-mentions-between-two-dates-for-a", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"target": [
{
"domain": "example.com",
"search_filter": "exclude"
},
{
"keyword": "bmw",
"search_scope": [
"answer"
]
}
],
"date_from": "2025-08-01",
"date_to": "2025-12-01",
"group_range": "month",
"location_code": 2840,
"language_name": "English"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/change-in-llm-mentions-between-two-dates-for-a",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"target": [
{
"domain": "example.com",
"search_filter": "exclude"
},
{
"keyword": "bmw",
"search_scope": [
"answer"
]
}
],
"date_from": "2025-08-01",
"date_to": "2025-12-01",
"group_range": "month",
"location_code": 2840,
"language_name": "English"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: change-in-llm-mentions-between-two-dates-for-a.
Parameters
targetarrayarray of objects containing target entities. Required field. You can specify up to 10 entities (objects) in the target field. One target entity can contain either one domain or one keyword and related parameters. All target entities are AND-combined into one filter / one metrics series (not one series per brand). To compare brands: use.x.ai-optimization-llm-mentions-multi-target-metrics-live, or one call per brand.
Example: [{"domain":"example.com","search_filter":"exclude"},{"keyword":"bmw","search_scope":["answer"]}]
date_fromstring<em>start date of the time range</em><br><strong>required field</strong><br>minimal value: <code>2025-08-01</code><br>date format: <code>"yyyy-mm-dd"</code>
Example: 2025-08-01
date_tostring<em>end date of the time range</em><br><strong>required field</strong><br><strong>Note:</strong>the value specified in <code>date_from</code> cannot exceed the value in <code>date_to</code><br>date format: <code>"yyyy-mm-dd"</code>
Example: 2025-12-01
group_rangestring<em>timeseries delta range</em><br><strong>required field</strong><br>possible values:<br><code>day</code>, <code>week</code>, <code>month</code>, <code>year</code>
Example: month
location_namestringfull name of search location. Optional field. If you use this field, you don't need to specify location_code. Default is United States (location_code 2840). With platform=chat_gpt, only United States is valid; other names return the same task status 40501 Invalid Field on location. The HTTP envelope may still be 200 / top-level status_code 20000 Ok with items_count=0 — always check tasks[].status_code / status_message.
location_codeintegersearch location code. Optional field. If you use this field, you don't need to specify location_name. Default is 2840 (United States). With platform=chat_gpt, only 2840 is valid; any other code (e.g. 2036) returns task status 40501 Invalid Field: 'location_code'. The HTTP envelope may still be 200 / top-level status_code 20000 Ok with items_count=0 — always check tasks[].status_code / status_message.
Example: 2840
language_namestring<em>full name of search language</em><br>optional field<br>if you use this field, you don't need to specify <code>language_code</code>;<br>if you don't specify this field, the <code>language_code</code> with <code class="long-string">en</code> value will be used by default;<br>you can receive the li
Example: English
language_codestring<em>search language code</em><br>optional field<br>if you use this field, you don't need to specify <code>language_name</code>;<br>you can receive the list of available languages of the search engine with their <code>language_code</code> by making a separate request to the <code>
platformstringtarget platform. Optional field. Possible values: chat_gpt, google. When omitted, defaults to google only (not both platforms). chat_gpt data is available for the United States and English only (location 2840 / US + language en; else task status 40501).
Example: google
tagstring<em>user-defined task identifier</em><br>optional field<br><em>the character limit is 255</em><br>you can use this parameter to identify the task and match it with the result<br>you will find the specified <code>tag</code> value in the <code>data</code> object of the response
