انتخاب، کنار گذاشتن یا افزودن رقیب
/sites/{siteId}/competitors- Scope
actions:apply- ابزار MCP
update_competitors
Pick, dismiss or add a competitor pick: a suggestion becomes a picked competitor; dismiss: a suggestion or picked competitor is left out from now on; add: any domain becomes a picked competitor. Picking or adding fetches its keyword gaps (a paid lookup inside the spending limits). Recorded in Activity as the key owner. Answers with the new competitor set.
توضیح ها از سند OpenAPI می آیند و انگلیسی اند.
پارامترها
| نام | محل | توضیح |
|---|---|---|
siteIdاجباری | path | stringWebsite id, from GET /sites. |
بدنه درخواست
| فیلد | توضیح |
|---|---|
action | pick | dismiss | add · required; What to do |
domain | string · required; The competitor domain, like example.com (scheme, www. and path are stripped) |
{
"action": "add",
"domain": "cyclehub.example"
}پاسخ
200 · application/json
| فیلد | توضیح |
|---|---|
action | pick | dismiss | add · required; What was done |
domain | string · required; The domain, cleaned |
competitors | list of values · required; Picked first, then suggestions the AI confirmed, then ones not reviewed yet |
competitors[].domain | string |
competitors[].kind | string |
competitors[].score | number |
competitors[].review | object |
competitors[].review.status | string |
competitors[].review.sameKind | |
competitors[].review.kind | |
competitors[].review.reason | |
competitors[].drivesGaps | true or false |
competitors[].sharedKeywords | number |
competitors[].brandKeywords | number |
competitors[].theirKeywords | number |
competitors[].ourKeywords | number |
competitors[].aboveUs | number |
competitors[].domainRank | number |
competitors[].category | string |
competitors[].visibility | list of numbers |
competitors[].visibilityMonths | list of strings |
competitors[].dataUpdatedAt | string |
ourVisibility | list of number · required; The website's own estimated monthly search traffic, oldest first |
ourVisibilityMonths | list of string · required; Month (YYYY-MM) of each ourVisibility value |
driving | list of string · required; The competitors gaps, link gap and "best X" lists use: picked, else the three strongest confirmed suggestions |
hidden | integer · required; Suggestions left out: weak, or turned down by the AI |
note | string · required; How to read the numbers |
link | address (URL) · required; The Competitors screen in the app |
نکته ها
GET /sites/{siteId}/competitors سایت هایی را که با آن ها رقابت می کنید فهرست می کند: اول رقبایی که خودتان انتخاب کرده اید، بعد سایت هایی که MonoRanks پیشنهاد می دهد چون روی همان جست وجوها رتبه دارند. پیشنهاد تا وقتی کسی انتخابش نکند، پیشنهاد می ماند.
| مورد | توضیح |
|---|---|
score |
(0 تا 100) نشان می دهد یک پیشنهاد چقدر به شما نزدیک است. کلمات کلیدی مشترک نسبت به اندازه هر دو فهرست سنجیده می شوند؛ پس سایت غول پیکری که فقط چند صد کلمه از میلیون ها کلمه اش با شما مشترک است، امتیاز پایینی می گیرد. کلمات مشترکی که فقط به خاطر اسم برند مشترک اند حساب نمی شوند (brandKeywords). |
review |
نتیجه بررسی هوش مصنوعی است که پیشنهاد را با موضوع سایت شما مقایسه می کند: status (reviewed یا not_reviewed)، sameKind (آیا همان نوع کسب وکار یا محصول است؟) و یک reason کوتاه. پیشنهادهایی که هوش مصنوعی رد کند پنهان می شوند و hidden تعدادشان را همراه با پیشنهادهای ضعیف نشان می دهد. اگر هوش مصنوعی در دسترس نباشد، status برابر not_reviewed است و امتیاز تصمیم می گیرد. |
driving |
(و drivesGaps در هر ردیف) رقبایی هستند که شکاف کلمات کلیدی، شکاف لینک و فهرست های «بهترین ها» بر اساس آن ها ساخته می شوند: رقبایی که انتخاب کرده اید؛ اگر هیچ کدام را انتخاب نکرده باشید، سه پیشنهاد قوی تری که هوش مصنوعی تأییدشان کرده؛ و تا قبل از بررسی هر پیشنهادی، سه پیشنهاد قوی تر بر اساس امتیاز. |
POST /sites/{siteId}/competitors فهرست رقبا را عوض می کند. action یکی از این هاست: pick (یک پیشنهاد را رقیب انتخاب شده می کند)، dismiss (یک پیشنهاد یا رقیب انتخاب شده را از این به بعد پنهان می کند) یا add (هر دامنه ای را به عنوان رقیب انتخاب شده اضافه می کند). انتخاب یا اضافه کردن، شکاف کلمات کلیدی آن رقیب را می گیرد که یک استعلام پولی داخل سقف داده فضای کاری شماست. تغییر به نام صاحب کلید در Activity ثبت می شود و پاسخ، فهرست به روزشده رقباست. خطاها: bad_action، bad_domain (برای سایت خودتان، یک آدرس تستی رزروشده یا بیشتر از 10 رقیب انتخاب شده هم همین است) و not_found وقتی pick یا dismiss دامنه ای را نام ببرد که در فهرست نیست.
خطاها
| کد | معنی |
|---|---|
400 | Bad request. Codes: bad_action, bad_domain. |
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. |
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 '{"action":"add","domain":"cyclehub.example"}' \
"https://app.monoranks.com/api/v1/sites/SITE_ID/competitors"const res = await fetch("https://app.monoranks.com/api/v1/sites/SITE_ID/competitors", {
method: "POST",
headers: { Authorization: "Bearer mr_ws_…", "Content-Type": "application/json" },
body: JSON.stringify({
"action": "add",
"domain": "cyclehub.example"
}),
});
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/competitors",
headers={"Authorization": "Bearer mr_ws_…"},
json={
"action": "add",
"domain": "cyclehub.example",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://app.monoranks.com/api/v1/sites/SITE_ID/competitors");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => ["Authorization: Bearer mr_ws_…", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{"action":"add","domain":"cyclehub.example"}',
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/competitors",
{
"action": "add",
"domain": "cyclehub.example"
},
{ headers: { Authorization: "Bearer mr_ws_…" } },
);نمونه پاسخ
{
"action": "add",
"domain": "cyclehub.example",
"competitors": [
{
"domain": "bikeworld.example",
"kind": "picked",
"score": 78,
"review": {
"status": "not_reviewed",
"sameKind": null,
"kind": null,
"reason": null
},
"drivesGaps": true,
"sharedKeywords": 412,
"brandKeywords": 6,
"theirKeywords": 5810,
"ourKeywords": 1240,
"aboveUs": 188,
"domainRank": 41,
"category": "Shop",
"visibility": [
32800,
35600,
37900,
41600
],
"visibilityMonths": [
"2026-06",
"2026-07",
"2026-08",
"2026-09"
],
"dataUpdatedAt": "2026-10-01T04:20:00.000Z"
},
{
"domain": "cyclehub.example",
"kind": "suggested",
"score": 64,
"review": {
"status": "reviewed",
"sameKind": true,
"kind": "Online bike shop",
"reason": "Sells bikes and parts to riders, like Acme Bikes."
},
"drivesGaps": true,
"sharedKeywords": 412,
"brandKeywords": 6,
"theirKeywords": 5810,
"ourKeywords": 1240,
"aboveUs": 188,
"domainRank": 41,
"category": "Shop",
"visibility": [
32800,
35600,
37900,
41600
],
"visibilityMonths": [
"2026-06",
"2026-07",
"2026-08",
"2026-09"
],
"dataUpdatedAt": "2026-10-01T04:20:00.000Z"
}
],
"ourVisibility": [
12400,
13900,
14800,
15700
],
"ourVisibilityMonths": [
"2026-06",
"2026-07",
"2026-08",
"2026-09"
],
"driving": [
"bikeworld.example"
],
"hidden": 3,
"note": "kind: picked (chosen by a person) or suggested. Suggestions stay suggestions until picked.",
"link": "https://app.monoranks.com/sites/3f6c2a1e-8b4d-4c7a-9e21-5d0b7a6f4c13/competitors"
}{
"error": {
"code": "bad_action",
"message": "action must be one of pick, dismiss, add."
}
}{
"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": "cyclehub.example is not in the competitor set. GET /competitors lists it; use action add for a new domain."
}
}{
"error": {
"code": "rate_limited",
"message": "More than 1200 requests this hour for this key."
}
}سرور MCP همین کار را با ابزار update_competitors انجام می دهد.