Call it
curl https://api.peume.com/v1/call/domain-metrics-by-category \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"category_codes": [],
"first_date": "your first date",
"second_date": "your second date"
}
}'const res = await fetch("https://api.peume.com/v1/call/domain-metrics-by-category", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"category_codes": [],
"first_date": "your first date",
"second_date": "your second date"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/domain-metrics-by-category",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"category_codes": [],
"first_date": "your first date",
"second_date": "your second date"
}
},
)
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: domain-metrics-by-category.
Parameters
category_codesRequiredarrayCategory codes from the Labs categories dictionary (1-5).
first_dateRequiredstringFirst date of comparison period
second_dateRequiredstringSecond date of comparison period
location_namestringFull location name exactly as listed in the locations dictionary, e.g. 'London,England,United Kingdom' or 'United States'.
location_codeintegerNumeric location code from the locations dictionary, e.g. 2840 (United States).
language_namestringFull language name, e.g. 'English'.
language_codestringLanguage code, e.g. 'en'.
item_typesarrayDisplay results by item type (default ['organic', 'paid']; values: ['organic', 'paid', 'featured_snippet', 'local_pack'])
top_categories_countintegerNumber of additional domain categories (max 5)
include_subdomainsbooleanReturn subdomains in the API response (default true)
etv_minintegerMinimum current organic ETV of the domain
etv_maxintegerMaximum current organic ETV of the domain
correlatebooleanCorrelate data with previously obtained datasets (default true)
limitintegerRows to return (1-1000, default 100).
offsetintegerRows to skip before the first returned row.
filtersarrayFilter rules as nested arrays: [["field","op",value], "and", [...]] — operators =, <>, <, <=, >, >=, in, not_in, like, not_like, regex, not_regex, match, not_match; up to 8 rules. Field names come from this API's filters dictionary.
order_byarraySort rules as 'field,asc' or 'field,desc', e.g. ['keyword_info.search_volume,desc']; up to 3.
