Docs/API reference

Session

Configure request behavior before creating a job. Python uses snake_case methods; Node.js uses camelCase.

Download .md
Developers2 min read4 sections
Source reference · Match your SDK version. Availability and known issues
In this guide

Create and pass a session

import json
from crawlingo import DatasetJob, Session

with open("job.json", encoding="utf-8") as source:
    config = json.load(source)

session = Session().rate_limit(2).timeout(30)
session.headers({"User-Agent": "MyDatasetBot/1.0"})
report = DatasetJob(config, session=session).run()
print(report)
python10 lines · copy-ready

Request configuration methods

These setters return the session for chaining. Configure them before the first request; per-host rate limiters cache their configuration. timeout uses seconds. Session pacing is per host, while JobConfig.concurrency limits simultaneous page work.

PythonNode.jsArgumentPurpose
headers(headers)headers(headers)dict / Record<string, string>Request headers, including the User-Agent used for robots matching.
cookies(cookies)cookies(cookies)dict / Record<string, string>Request cookies.
timeout(seconds)timeout(seconds)int / numberRequest timeout in seconds.
rate_limit(requests_per_second)rateLimit(requestsPerSecond)float / numberPer-host request pacing.
proxy(proxy_url)proxy(proxyUrl)stringConfigure an outbound proxy URL.
proxy_pool(proxies)proxyPool(proxies)list[str] / string[]Configure a set of proxy URLs.
proxy_provider(url)proxyProvider(url)URL string; Node also accepts nullConfigure a proxy-provider URL.

Transport and selector recovery

A transport profile does not guarantee access to a target site. Configure browser rendering only through a build and API that expose it.

PythonNode.jsValues / behavior
fetcher_tier(tier)fetcherTier(tier)Node typing supports standard and stealthy. Chromium requires a separate browser-enabled Rust build.
browser_profile(profile)browserProfile(profile)Transport profile: chrome, firefox or safari in the Node type.
auto_match(enabled)autoMatch(enabled)Enable selector recovery for supported existing extraction APIs. Not used by DatasetJob row extraction.
fingerprint_path(path)fingerprintPath(path)Location for stored selector fingerprints.
auto_match_weights(weights)autoMatchWeights(weights)Dictionary / record of numeric matching weights.

Ownership and binding differences

clone() returns another Session wrapper backed by the native clone operation. destroy() invokes native cleanup and returns None / void; avoid destroying a session while its jobs are running.

Both bindings load config and expose retry and explicit cookie controls. Python uses snake_case names such as retry_delay and get_cookies; Node uses retryDelay and getCookies. The Python wrapper additions are in development source and require a future package release. Python additionally provides basic_auth, bearer_auth, metrics, page and dataset helpers. Read the language-specific signatures.