Call it
curl https://api.peume.com/v1/call/top-ranking-pages-of-a-domain-in-google \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"target": "amazon.com",
"location_code": 2840,
"language_name": "English",
"limit": 3,
"filters": [
[
"metrics.organic.pos_1",
"<>",
0
],
"or",
[
"metrics.organic.pos_2_3",
"<>",
0
]
],
"order_by": [
"metrics.organic.etv,desc"
]
}
}'const res = await fetch("https://api.peume.com/v1/call/top-ranking-pages-of-a-domain-in-google", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"target": "amazon.com",
"location_code": 2840,
"language_name": "English",
"limit": 3,
"filters": [
[
"metrics.organic.pos_1",
"<>",
0
],
"or",
[
"metrics.organic.pos_2_3",
"<>",
0
]
],
"order_by": [
"metrics.organic.etv,desc"
]
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/top-ranking-pages-of-a-domain-in-google",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"target": "amazon.com",
"location_code": 2840,
"language_name": "English",
"limit": 3,
"filters": [
[
"metrics.organic.pos_1",
"<>",
0
],
"or",
[
"metrics.organic.pos_2_3",
"<>",
0
]
],
"order_by": [
"metrics.organic.etv,desc"
]
}
},
)
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: top-ranking-pages-of-a-domain-in-google.
Parameters
targetstringdomain required field the domain name of the target website the domain should be specified without https:// and www.
Example: amazon.com
location_namestringfull name of the location optional field if you use this field, you don’t need to specify location_code you can receive the list of available locations with their location_name by making a separate request to the ignore this field
location_codeintegerlocation code optional field if you use this field, you don’t need to specify location_name you can receive the list of available locations with their location_code by making a separate request to the ignore this field to get the
Example: 2840
language_namestringfull name of the language optional field if you use this field, you don’t need to specify language_code you can receive the list of available languages with their language_name by making a separate request to the ignore this field
Example: English
language_codestringlanguage code optional field if you use this field, you don’t need to specify language_name you can receive the list of available languages with their language_code by making a separate request to the ignore this field to get the
item_typesarraydisplay results by item type optional field indicates the type of search results included in the response Note: if the item_types array contains item types that are different from organic, the results will be ordered by the first item type in the array; you will not be able to sort and filter result
include_clickstream_databooleaninclude or exclude data from clickstream-based metrics in the result optional field if the parameter is set to true, you will receive clickstream_etv, clickstream_gender_distribution, and clickstream_age_distribution fields with clickstream data in the response default value: false with this paramet
limitintegerthe maximum number of returned pages optional field default value: 100 maximum value: 1000
Example: 3
offsetintegeroffset in the results array of returned pages optional field default value: 0 if you specify the 10 value, the first ten pages in the results array will be omitted and the data will be provided for the successive pages
historical_serp_modestringdata collection mode optional field you can use this field to filter the results; possible types of filtering: live — return metrics for SERPs in which the specified target currently has ranking results; lost — return metrics for SERPs in which the specified target had previously had ranking results
ignore_synonymsbooleanignore highly similar keywords optional field if set to true, only core keywords will be returned, all highly similar keywords will be excluded; default value: false
filtersarrayarray of results filtering parameters optional field you can add several filters at once (8 filters maximum) you should set a logical operator and, or between the conditions the following operators are supported: regex, not_regex, <, <=, >, >=, =, <>, in, not_in example: ["metrics.paid.count",">",0]
Example: [["metrics.organic.pos_1","<>",0],"or",["metrics.organic.pos_2_3","<>",0]]
order_byarrayOptional. Flat array of comma-separated "field,direction" strings (asc or desc). Field names match the filters array. Nested [["field","desc"]] (the filters-array shape) returns task status 40501 Invalid Field: 'order_by'.
Example: ["metrics.organic.etv,desc"]
tagstringuser-defined task identifier optional field the character limit is 255 you can use this parameter to identify the task and match it with the result you will find the specified tag value in the data object of the response
