Install the SDK and start scraping with your API key:
pip install runcrawl
from runcrawl import RunCrawl
ck = RunCrawl(api_key="your-api-key", base_url="https://runcrawl.runsystem.work")
result = ck.scrape("https://example.com")
print(result.content)
npm install runcrawl
const { CrawlKit } = require('runcrawl');
const ck = new CrawlKit({ apiKey: 'your-api-key', baseUrl: 'https://runcrawl.runsystem.work' });
const result = await ck.scrape('https://example.com');
console.log(result.content);
JavaScript rendering and consent handling require a browser-enabled API server with Playwright and Chromium.
Loading cURL example...
The response reports consent handling in data.consent. For normal crawls, keep "include_html":false and "screenshot":false (both are defaults); enable them only when needed because raw HTML and Base64 screenshots make responses large.
| Name | Key | Plan | Created | Status | Actions |
|---|---|---|---|---|---|
| Loading... | |||||
| Timestamp | URL | Method | Status | Duration |
|---|---|---|---|---|
| Loading... | ||||
Developer guide
Connect your app to RUNCrawl with an API key and a single HTTP request.
https://runcrawl.runsystem.work
Send your API key as a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Quickstart
This example is loaded from the API for the current environment.
Loading cURL example...
Keep API keys private. Do not expose them in client-side JavaScript or commit them to source control.
This separate cURL example downloads a static HTML snapshot with loaded CSS and fonts to ~/Downloads. The filename is based on the page title. The Quickstart above remains a JSON scrape example.
Loading HTML download example...
| Option | Default | Purpose |
|---|---|---|
format | markdown | Choose markdown, text, or html_clean output. |
chunk | true | Return content split into retrieval-ready chunks. |
force_js | false | Render JavaScript-heavy pages in Chromium. Requires a browser-enabled deployment. |
js_scenario | null | Run ordered browser commands before extracting content: click, wait, wait_for, wait_for_and_click, fill, scroll_x, scroll_y, infinite_scroll, evaluate, and repeat_click. Selectors may use CSS or XPath. Forces Chromium; default limits are 20 commands and 40 seconds. |
js_scenario_strict | true | Stop and return an error on the first command failure. Set to false to skip failed commands and continue; the total time limit still applies. |
captcha_ocr | false | Attempt one local OCR pass for a generic static text/number image CAPTCHA. Requires the global opt-in, Chromium, and EasyOCR. |
include_html | false | Include the fetched or rendered HTML in the response. |
include_css | false | Inline loaded CSS and captured fonts into the HTML snapshot. Enables browser rendering and increases response size. Combine with Accept: text/html to download the HTML file; action-only scenarios are supported, but evaluate and repeat_click snapshot require JSON. |
screenshot | false | Capture a page screenshot. Requires Chromium and increases response size. |
cookies | null | Pass cookies as a Cookie header string or a list of cookie objects. This selects an isolated Chromium context. |
storage_state | null | Pass Playwright cookies and localStorage for the target site. The origin must match the page URL. |
session_id | null | Reuse this API key's isolated browser session, cookies, and outbound route for up to 5 minutes. |
session_name | null | Load an encrypted saved cookie/localStorage state by name for this API key. Cannot be combined with session_id, cookies, or storage_state. |
js_scenario is an ordered list of one-key command objects. wait takes milliseconds; click, wait_for, and wait_for_and_click take a CSS or XPath selector string; fill takes an object with both selector and value. scroll_x and scroll_y take signed pixel distances. infinite_scroll takes max_count (0 means no count limit), delay in milliseconds, and an optional end_click selector. It stops when page height/text stop growing or the scenario time limit is reached. evaluate runs a JavaScript expression (maximum 20,000 characters) and returns values in data.evaluate_results. repeat_click requires a selector, max_count (1-1,000), and delay (0-10,000 ms); use append for Load more pages that accumulate content, and snapshot for Next buttons that replace the page content. Snapshot returns the initial and each changed page as HTML in data.repeat_click_results, so it can use more response space and is limited to 5 MiB per scenario. The command waits up to delay for visible text to change and stops when the selector disappears, content does not change, or the count is reached. Snapshot requires a JSON response. CSS is the default selector syntax; prefix XPath with xpath= or use an expression beginning with //.
Command shape reference (illustrative only; use commands/selectors that match your target page):
[
{"click": "#next"},
{"wait": 1000},
{"wait_for": "#result"},
{"wait_for_and_click": "xpath=//button[@type='submit']"},
{"fill": {"selector": "#username", "value": "YOUR_TEST_USERNAME"}},
{"scroll_y": 700},
{"scroll_x": 100},
{"infinite_scroll": {"max_count": 0, "delay": 500, "end_click": "#load-more"}},
{"evaluate": "document.title"},
{"repeat_click": {"selector": "#load-more", "max_count": 5, "delay": 500, "mode": "append"}}
]
Use snapshot when clicking Next replaces the current page without changing the URL:
{"repeat_click": {"selector": "#next", "max_count": 5, "delay": 500, "mode": "snapshot"}}
data.js_scenario_report reports overall status, total/attempted/failed command counts, total time, and each attempted command's index, name, status, duration, and result. Failed commands include an error. In strict mode, the report is included with the 422 response and commands after the first failure are not run. In non-strict mode, failed commands are marked skipped and execution continues. If the outer fetch budget expires during a command, its partial report is included with the 504 response. Command arguments are not included. The report is available in JSON responses only and is omitted from raw HTML downloads. Action-only scenarios can still use Accept: text/html; scenarios with evaluate or repeat_click snapshot require JSON for their separate result fields.
Copy-paste test for the public Dynamic Loading demo. Replace the API host and key. A scenario automatically uses Chromium, so force_js is not required. Success should include Hello World! in the returned content.
curl -sS -X POST 'https://YOUR_API_HOST/v1/scrape' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://the-internet.herokuapp.com/dynamic_loading/2",
"js_scenario": [
{"click": "#start button"},
{"wait_for": "#finish"}
],
"js_scenario_strict": true,
"include_html": true
}'
js_scenario_strict defaults to true: the first failed command stops the scenario and returns an error. Set it to false to skip a failed command and continue; the total time limit still applies. Defaults are 20 commands and 40 seconds, configurable with CRAWLKIT_JS_SCENARIO_MAX_COMMANDS and CRAWLKIT_JS_SCENARIO_TIMEOUT_SECONDS.
For any user-submitted target URL, the API can make one local OCR attempt on a visible generic static image CAPTCHA containing simple letters or numbers. Set CRAWLKIT_CAPTCHA_OCR_ENABLED=true on the API server and send captcha_ocr: true. Use a browser-enabled server with Chromium and EasyOCR. The OCR runs locally; no external solver/API is called. You are responsible for having the right to automate access and following the target site's terms. The result is reported as solved only if the page displays [data-captcha-result="success"]; otherwise the flow fails closed.
curl -sS -X POST 'https://runcrawl.runsystem.work/v1/scrape' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://your-authorized-site.example/page",
"captcha_ocr": true,
"force_js": true
}'
There is no extra CAPTCHA-specific HTTP header. This does not solve reCAPTCHA, hCaptcha, Turnstile/Cloudflare challenges, checkbox, audio, token, behavioral, or real-world slider challenges; those remain unsupported. Slider work is currently limited to a local development fixture test; there is no cURL option for solving real slider CAPTCHA pages.
To crawl a private page, send a valid sign-in cookie for that website with your request. Without session_id, the cookie is used for this crawl only. With the same session_id and API key, RUNCrawl retains cookies between requests for up to 5 minutes from the first request, then discards the session. RUNCrawl does not ask for your website password or automatically use the session open in your browser.
Use a session your application is authorized to use. Your application or integration must provide the cookie; if you only signed in through a browser, that browser session is not automatically shared with RUNCrawl. Cookie names and values are specific to each website. Some sites require more than one cookie, and sending a cookie does not guarantee the site will accept the session. Authenticated session mode currently supports web pages, not PDF or video URLs; do not combine it with force_static.
Instead of sending cookies on every scrape, save them once with POST /v1/sessions and choose a name yourself. RUNCrawl does not read cookies from your browser automatically: sign in to a site you are authorized to access, then copy the required cookies from a successful browser request. Send one object per cookie with its actual domain and path. The response contains metadata only, never cookie values.
curl -X POST https://runcrawl.runsystem.work/v1/sessions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "support-portal",
"url": "https://support.example.com/account",
"cookies": [
{
"name": "SESSION",
"value": "REDACTED",
"domain": "support.example.com",
"path": "/",
"secure": true,
"httpOnly": true
},
{
"name": "CSRF-TOKEN",
"value": "REDACTED",
"domain": "support.example.com",
"path": "/",
"secure": true,
"httpOnly": false
}
]
}'
Each cookie requires name, value, and exactly one of domain or url; path, secure, and httpOnly should match the browser cookie details. A Cookie header string is scoped to the target host from / to support same-host redirects; use objects for cookies with narrower paths. Invalid cookie field types and auth states over 1 MiB are rejected. For Playwright storage_state, send that field instead of cookies and make sure its origin exactly matches the URL. The request body goes directly to the API—no temporary file on the server is needed.
Then reuse the name when scraping:
curl -X POST https://runcrawl.runsystem.work/v1/scrape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://support.example.com/account",
"format": "text",
"chunk": false,
"session_name": "support-portal"
}'
GET /v1/sessions lists your names, GET /v1/sessions/{name} views safe metadata, and DELETE /v1/sessions/{name} removes a saved session. Names are scoped to your API key and exact website origin. Saved data is encrypted in worker memory and cleared on restart; run one API worker. The limit is 100 names per API key, 1 MiB per state, and 256 MiB total encrypted state per worker. Management requests per API key/minute are limited by plan: free 10, starter 60, pro 300, enterprise 1000. Refreshed state is filtered to the saved origin. session_name cannot be combined with session_id, cookies, or storage_state in the same scrape request, and does not pin an egress route.
curl -X POST https://runcrawl.runsystem.work/v1/scrape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-site.example",
"format": "text",
"chunk": false,
"session_id": "YOUR_SESSION_ID",
"cookies": [
{
"name": "SESSION_COOKIE_NAME",
"value": "YOUR_SESSION_COOKIE_VALUE",
"domain": "your-site.example",
"path": "/",
"secure": true,
"httpOnly": true
}
]
}'
Replace the example URL, cookie, and session ID with values for your integration. Use a unique session ID of 1–128 letters, numbers, dots, underscores, colons, or hyphens. For each cookie, name, value, and one of domain or url are required; path, secure, and httpOnly are optional. The cookie domain must match the target website. Add one object per cookie the site requires. Reuse the same session ID with the same API key on later requests; omit cookies to use cookies retained from earlier requests. The first request pins the route (client proxy, system-pool proxy, or direct); later requests must keep that route. Session state is held in worker memory, so run one API worker; a server restart clears sessions. If your integration uses Playwright, you can send its storage_state instead.
Cookies grant access to your account. Keep them secret, send requests over HTTPS, and never put real cookie values in shared examples, browser-side code, logs, or source control.
For a user-submitted target URL with a generic static text/number CAPTCHA, enable CRAWLKIT_CAPTCHA_OCR_ENABLED=true and send "captcha_ocr": true. OCR runs locally and requires Chromium/EasyOCR. The target page must show [data-captcha-result="success"] before the response reports solved; use only where you have permission and follow the site's terms.
-d '{"url":"https://example.com/page","captcha_ocr":true,"force_js":true}'
Only one local OCR attempt is made. reCAPTCHA, hCaptcha, Turnstile, Cloudflare challenges, checkbox, audio, token, drag-and-drop, and behavioral CAPTCHA are unsupported.
Send multiple URLs to POST /v1/batch. Batch size depends on your plan, and the endpoint requires an API key.
curl -X POST https://runcrawl.runsystem.work/v1/batch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls":["https://example.com/one","https://example.com/two"]}'
| Plan | Requests / hour | URLs / batch | Concurrent renders |
|---|---|---|---|
| Free | 20 | 5 | 1 |
| Starter | 200 | 50 | 2 |
| Pro | 2,000 | 500 | 4 |
Browser render capacity is per worker. Requests over a limit may return 429; temporary browser capacity timeouts may return 503.
The full reference includes request fields, response formats, authentication endpoints, and error behavior.
Browse API endpointsScan QR code to pay via VietQR