مستندات توسعه دهندگان

اجرای دوباره تست Agentic browsing

POST/sites/{siteId}/agentic/run
Scope
issues:recheck
ابزار MCP
run_agentic_check

Re-run the Agentic browsing check for one page Queues one PageSpeed run (performance and Agentic browsing, stored like a speed test) and answers 202 at once; a run takes 20 to 60 seconds. Poll GET /sites/{siteId}/agentic/runs/{jobId}. Uses one run of the website's daily PageSpeed budget.

توضیح ها از سند OpenAPI می آیند و انگلیسی اند.

پارامترها

ناممحلتوضیح
siteIdاجباریpathstringWebsite id, from GET /sites.

بدنه درخواست

فیلدتوضیح
urladdress (URL) · required; A page of this website
strategymobile | desktop · default mobile; Device to emulate; default mobile
{
  "url": "https://acmebikes.com/",
  "strategy": "mobile"
}

پاسخ

202 · application/json

فیلدتوضیح
queuedtrue or false · required; Always true
jobIdstring · required; Run id to poll
statusqueued · required
urlstring · required; Page to test
strategymobile | desktop · required; Device PageSpeed emulated
budgetobject · required; The website's daily PageSpeed budget, shared with speed tests
budget.perDayinteger · required; PageSpeed runs per website per day (plan)
budget.usedTodayinteger · required; Runs in the last 24 hours
budget.leftinteger · required; Runs left now
budget.nextFreeAtstring or null · required; When the next run frees up, when none is left
polladdress (URL) · required; Address to poll
notestring · required; What happens next

خطاها

کدمعنی
400Bad request. Codes: bad_url, other_host, bad_strategy.
401Missing, unknown or revoked key. Codes: missing_key, invalid_key.
403The key lacks the scope, covers another website, or its owner lost access. Codes: missing_scope, other_site, owner_left, no_owner, forbidden.
404Not found. Codes: not_found.
409Conflict with the current state. Codes: already_queued.
429A limit is reached. rate_limited: too many requests this hour for this key. Codes: rate_limited, budget_used, too_many_runs.

نمونه درخواست

curl -X POST \
  -H "Authorization: Bearer mr_ws_…" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://acmebikes.com/","strategy":"mobile"}' \
  "https://app.monoranks.com/api/v1/sites/SITE_ID/agentic/run"

نمونه پاسخ

{
  "queued": true,
  "jobId": "a1c3e5f7-9b1d-4f3b-8d5f-7b9d1f3b5d7e",
  "status": "queued",
  "url": "https://acmebikes.com/",
  "strategy": "mobile",
  "budget": {
    "perDay": 5,
    "usedToday": 2,
    "left": 2,
    "nextFreeAt": null
  },
  "poll": "https://app.monoranks.com/api/v1/sites/3f6c2a1e-8b4d-4c7a-9e21-5d0b7a6f4c13/agentic/runs/a1c3e5f7-9b1d-4f3b-8d5f-7b9d1f3b5d7e",
  "note": "Queued: PageSpeed loads the page on Google's servers, which takes 20 to 60 seconds."
}

سرور MCP همین کار را با ابزار run_agentic_check انجام می دهد.