Stop a crawl
POST/v1/crawls/{crawl_id}/cancel
Already collected pages are kept.
curl -X POST "https://api.seoscraper.io/v1/crawls/CRAWL_ID/cancel" \ -H "Authorization: Bearer ssk_YOUR_KEY"{ "id": "7c1f0a52-3f0e-4f0b-9c53-2f6f1f1d7a10", "status": "running", "url": "https://books.toscrape.com", "options": { "url": "https://books.toscrape.com", "source": "auto", "max_pages": 50, "max_depth": 5, "concurrency": 5, "delay_ms": 0, "include_subdomains": false, "respect_robots": true, "follow_nofollow": false, "ignore_query": false, "include_html": true, "include_paths": [], "exclude_paths": [] }, "mode": "links", "pages_done": 50, "pages_failed": 0, "pages_found": 312, "recent": [ { "url": "https://books.toscrape.com/catalogue/page-2.html", "status": 200, "error": null } ], "stop_reason": null, "error": null, "summary": null, "file_size": null, "page_limit": 50, "throttle": null, "retry_of": null, "created_at": "2026-11-25T08:00:00Z", "started_at": "2026-11-25T08:00:01Z", "finished_at": null}Path parameters
crawl_idstringrequiredCrawl identifier.
Response202
idstringCrawl identifier.
statusstringqueuedrunningcompletedcanceledfailedurlstringStart address.
optionsobjectOptions the crawl was started with.
Fields of options
urlstringup to 2048 charactersStart address. Without a scheme, https:// is added.
sourcestringdefault: "auto"auto: sitemap URLs, or links when there is no sitemap. sitemap: sitemap only. links: links only.
autositemaplinksmax_pagesintegerdefault: 100min: 1max: 10000Page limit.
max_depthintegerdefault: 5min: 0max: 50Clicks from the start page. Ignored for sitemaps.
concurrencyintegerdefault: 5min: 1max: 10Pages fetched at the same time.
delay_msintegerdefault: 0min: 0max: 10000Pause between requests in milliseconds.
include_subdomainsbooleandefault: falseVisit subdomains too.
respect_robotsbooleandefault: trueObey robots.txt, including Crawl-delay.
follow_nofollowbooleandefault: falseFollow nofollow links too.
ignore_querybooleandefault: falseTreat /a?x=1 and /a as the same page.
include_htmlbooleandefault: trueSave raw HTML in the result file.
include_pathsstring[]up to 200 charactersup to 20 itemsCrawl only these paths. Matches the beginning of the path, like in robots.txt.
*is any text,$is the end.exclude_pathsstring[]up to 200 charactersup to 20 itemsSkip these paths. Matches the beginning of the path, like in robots.txt.
*is any text,$is the end.
modestring | nullWhere the URLs come from. null until the crawl starts.
sitemaplinkspages_doneintegerVisited pages.
pages_failedintegerPages without a response. Included in pages_done.
pages_foundintegerVisited pages and pages waiting in the queue.
recentobject[]Recently visited pages.
Fields of recent
urlstringstatusinteger | nullnull when the page could not be fetched.
errorstring | nullError code when the page could not be fetched.
stop_reasonstring | nullWhy the crawl ended. null until then.
finishedmax_pagesno_tokensmax_timethrottledcanceledinterruptederrorstring | nullError code of a failed crawl.
summaryobject | nullReady when the crawl ends.
Fields of summary
avg_duration_msinteger | nullAverage fetch time in milliseconds.
issuesobjectNumber of pages with each issue. Keys are values of the issue parameter.
file_sizeinteger | nullSize of the compressed SQLite file in bytes.
page_limitintegerReserved tokens. Less than max_pages when you had fewer tokens.
throttleobject | nullSet when the site answered 429 and the crawl slowed down.
Fields of throttle
countintegerNumber of pauses.
delay_msintegerPause between requests after slowing down, in milliseconds.
resume_atstringEnd of the latest pause. In the future: the crawl is waiting.
retry_ofstring | nullCrawl whose pages this one fetches again. null for a regular crawl.
created_atstringWhen the crawl was added to the queue.
started_atstring | nullWhen the crawl left the queue.
finished_atstring | nullWhen the crawl ended.
Errors
Every error has the same format. See what each code means.
- 401
- unauthorized
- 403
- forbidden
- 404
- not_found
- 422
- invalid_request