Ignore a keyword, or undo it
POST
/sites/{siteId}/keywords/ignore- Scope
actions:write- ابزار MCP
ignore_keyword
Ignore a keyword, or undo it Hides the keyword from Keywords, Keyword gaps, content ideas and the opportunity counts. Kept by the keyword text, so it stays hidden after keyword and gap refreshes, and a gap keyword not in the list can be ignored too. on false undoes it. The same call twice changes nothing (changed false). Ignoring stops daily checks of the keyword. Recorded in the website's Activity as the key owner.
توضیح ها از سند OpenAPI می آیند و انگلیسی اند.
پارامترها
| نام | محل | توضیح |
|---|---|---|
siteIdاجباری | path | stringWebsite id, from GET /sites. |
بدنه درخواست
| فیلد | توضیح |
|---|---|
keyword | string · at most 120 characters; The keyword text |
keyword_id | string · Or the keyword id, from GET /keywords |
on | true or false · Default true; false undoes it |
reason | string · at most 300 characters; Why, kept with it (at most 300 characters) |
{
"keyword": "bike shop login",
"reason": "A competitor brand"
}پاسخ
200 · application/json
| فیلد | توضیح |
|---|---|
keyword | string · required; The keyword text, normalised |
ignored | true or false · required; Hidden now |
changed | true or false · required; False when it already was in that state |
untracked | true or false · required; True when ignoring stopped its daily checks |
link | address (URL) · required; The Keywords screen in the app |
خطاها
| کد | معنی |
|---|---|
400 | Bad request. Codes: missing_keyword, bad_keyword, bad_on, bad_reason, reason_too_long. |
401 | Missing, unknown or revoked key. Codes: missing_key, invalid_key. |
403 | The key lacks the scope, covers another website, or its owner lost access. Codes: missing_scope, other_site, owner_left, no_owner, forbidden. |
404 | Not found. Codes: not_found, keyword_not_found. |
429 | Too many requests this hour for this key. Codes: rate_limited. |
نمونه درخواست
curl -X POST \
-H "Authorization: Bearer mr_ws_…" \
-H "Content-Type: application/json" \
-d '{"keyword":"bike shop login","reason":"A competitor brand"}' \
"https://app.monoranks.com/api/v1/sites/SITE_ID/keywords/ignore"const res = await fetch("https://app.monoranks.com/api/v1/sites/SITE_ID/keywords/ignore", {
method: "POST",
headers: { Authorization: "Bearer mr_ws_…", "Content-Type": "application/json" },
body: JSON.stringify({
"keyword": "bike shop login",
"reason": "A competitor brand"
}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();import requests
res = requests.post(
"https://app.monoranks.com/api/v1/sites/SITE_ID/keywords/ignore",
headers={"Authorization": "Bearer mr_ws_…"},
json={
"keyword": "bike shop login",
"reason": "A competitor brand",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://app.monoranks.com/api/v1/sites/SITE_ID/keywords/ignore");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => ["Authorization: Bearer mr_ws_…", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{"keyword":"bike shop login","reason":"A competitor brand"}',
CURLOPT_RETURNTRANSFER => true,
]);
$data = json_decode(curl_exec($ch), true);import axios from "axios";
const { data } = await axios.post(
"https://app.monoranks.com/api/v1/sites/SITE_ID/keywords/ignore",
{
"keyword": "bike shop login",
"reason": "A competitor brand"
},
{ headers: { Authorization: "Bearer mr_ws_…" } },
);نمونه پاسخ
{
"keyword": "bike shop login",
"ignored": true,
"changed": true,
"untracked": false,
"link": "https://app.monoranks.com/sites/3f6c2a1e-8b4d-4c7a-9e21-5d0b7a6f4c13/keywords"
}{
"error": {
"code": "missing_keyword",
"message": "Send keyword (the text) or keyword_id (from GET /keywords)."
}
}{
"error": {
"code": "missing_key",
"message": "Send the key as Authorization: Bearer mr_site_…"
}
}{
"error": {
"code": "missing_scope",
"message": "This key does not have the scope this call needs."
}
}{
"error": {
"code": "not_found",
"message": "Website not found."
}
}{
"error": {
"code": "rate_limited",
"message": "More than 1200 requests this hour for this key."
}
}سرور MCP همین کار را با ابزار ignore_keyword انجام می دهد.