pline.ai
v0.3.13Scrape, crawl, batch-scrape, map, and search the web through the hosted pline.ai API.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
batch_scrape_cancel
Request cancellation of a batch scrape job (DELETE /batch/scrape/{id}). 409 if already finished.
| Parameter | Type | Description |
|---|---|---|
id * | string | Job UUID returned by the start tool. |
batch_scrape_start
Scrape a known list of URLs as one durable background job (POST /batch/scrape). Returns 202 metadata with the job id. Poll with batch_scrape_status. Completed jobs expose one JSONL artifact per output format, one line per URL: index, url, success, status, finalUrl, output, error. Cheaper and more predictable than a crawl when the URLs are already known. API docs: https://apidocs.pline.ai/guides/endpoints/batch-scrape
| Parameter | Type | Description |
|---|---|---|
urls * | array | URLs to scrape with identical options (max 10000). |
actions | array | null | Browser steps run in order after load, e.g. {"action":"click","selector":"#more"}, {"action":"type","selector":"input","value":"q"}, {"action":"scroll","value":"800"}, {"action":"wait","value":"1500"}… |
body | object | string | null | Request body (JSON object or string) for POST/PUT/DELETE; not allowed with GET or a browser. |
email | string | null | Optional completion email. |
geolocation | string | null | Fetch as a visitor from this 2-letter ISO country, e.g. "US". |
heartbeat_timeout_secs | integer | Workflow heartbeat timeout in seconds. Default 30. |
js_render | boolean | null | JavaScript rendering, three-way. Unset (default): the service decides, escalating to a browser only when a plain fetch comes back empty or as a JS shell. true: require a browser from the first attempt… |
limit | integer | Maximum URLs accepted for this job (1-10000). Default 10000. |
method | HTTP method for API-style targets; browser paths are GET only. Default GET. | |
only_main_content | boolean | Strip navigation, footer, and ads from clean_html, links, markdown, and json input. |
output | array | null | Formats to return, any combination of html, clean_html, links, markdown, clean_markdown, screenshot, screenshot_full_page, json. Default ["html"]. Returned under `data` as html_body, clean_html, links… |
prompt | string | null | Extraction instructions for output json (max 16384 chars). |
proxy_strategy | Access-strength tier in ascending cost. Unset/auto: start cheap and escalate only as far as the site requires. basic: cheapest tier only, fails rather than escalating. premium: start at the strongest,… | |
schedule_to_close_timeout_secs | integer | Workflow schedule-to-close deadline in seconds. Default 86400. |
schema | object | array | null | Desired JSON shape for output json; lenient, not strict JSON Schema, e.g. {"name":"string","price":"number"}. A list-shaped schema extracts a listing page and returns an array. |
session_id | string | null | Session id applied to every URL; all URLs must then share one registrable domain. |
tag | Up to 25 labels, 1-25 chars each of [A-Za-z0-9._-], echoed in usage logs. | |
timeout | integer | null | Request timeout in milliseconds (1000-60000). |
wait_ms | integer | null | Extra browser settle wait in milliseconds (0-60000). |
wait_selector | string | null | CSS selector to wait for before returning a browser-rendered page. |
webhook | Optional completion webhook. |
batch_scrape_status
Read a batch scrape job's progress (GET /batch/scrape/{id}). status is scraping | completed | failed | cancelled with completed/failed/pending/inFlight counts. On completion s3PresignedUrls maps each format to an expiring JSONL download. Long jobs are fine to leave running: report the id instead of blocking.
| Parameter | Type | Description |
|---|---|---|
id * | string | Job UUID returned by the start tool. |
download_dir | string | null | When the job is completed, download every artifact into this directory on the server's filesystem. Available only over stdio; HTTP rejects this option. |
wait_seconds | number | Poll until the job finishes or this many seconds pass (0 = return current status now; max 600). |
crawl_cancel
Request cancellation of a crawl job (DELETE /crawl/{id}). 409 if already finished.
| Parameter | Type | Description |
|---|---|---|
id * | string | Job UUID returned by the start tool. |
crawl_start
Discover and scrape a whole site by following links, as a durable background job (POST /crawl). Returns 202 metadata with the job id. Poll with crawl_status. Completed jobs expose one ZIP per format with a manifest.json mapping files to source URLs. Scope it first: an unscoped crawl of a large site burns credits fast, and map_site shows what a crawl would hit for one cheap call. API docs: https://apidocs.pline.ai/guides/endpoints/crawl
| Parameter | Type | Description |
|---|---|---|
url * | string | Seed URL; the crawl follows links from here. |
actions | array | null | Browser steps run on every page after load; implies a browser. |
allow_subdomains | boolean | Include subdomains of the seed's domain. |
crawl_entire_domain | boolean | Allow leaving the seed's path prefix. |
email | string | null | Address notified when the crawl completes. |
exclude_paths | array | null | Regexes; matching paths are skipped. |
geolocation | string | null | Fetch every page as a visitor from this 2-letter ISO country. |
heartbeat_timeout_secs | integer | Workflow heartbeat timeout in seconds. Default 30. |
ignore_query_parameters | boolean | Drop URLs carrying query strings. |
ignore_robots_txt | boolean | Ignore robots.txt while discovering URLs. Default true. |
include_paths | array | null | Regexes; only matching paths are crawled. |
js_render | boolean | null | Same meaning as on scrape, applied to every page fetch. |
limit | integer | Maximum pages (1-10000). Default 10000, matching the API. Confirm scope for large sites. |
max_discovery_depth | integer | null | Link depth from the seed. |
only_main_content | boolean | Strip navigation, footer, and ads from cleaned outputs. |
output | array | null | Formats to store, any of markdown, html, clean_html, links, screenshot, screenshot_full_page. Default ["markdown"]. |
proxy_strategy | Same meaning as on scrape, applied to every page fetch. | |
schedule_to_close_timeout_secs | integer | Workflow schedule-to-close deadline in seconds. Default 86400. |
sitemap | string | include: use sitemaps plus links; only: sitemaps alone; skip: ignore sitemaps. Default include. |
tag | Up to 25 labels echoed in usage logs. | |
timeout | integer | null | Per-page request deadline in milliseconds (1000-60000). |
wait_ms | integer | null | Extra settle wait in milliseconds per browser-rendered page (0-60000). |
wait_selector | string | null | CSS selector to wait for on every browser-rendered page. |
webhook | Full event webhook configuration. Use this instead of webhook_url for headers, metadata, or event selection. | |
webhook_url | string | null | Public HTTPS URL receiving started/page/completed/failed events. |
crawl_status
Read a crawl job's progress (GET /crawl/{id}). status is scraping | completed | failed | cancelled with completed/failed/pending/inFlight counts. On completion s3PresignedUrls maps each format to an expiring ZIP download. Long jobs are fine to leave running: report the id instead of blocking.
| Parameter | Type | Description |
|---|---|---|
id * | string | Job UUID returned by the start tool. |
download_dir | string | null | When the job is completed, download every artifact into this directory on the server's filesystem. Available only over stdio; HTTP rejects this option. |
wait_seconds | number | Poll until the job finishes or this many seconds pass (0 = return current status now; max 600). |
map_site
List a site's URLs synchronously (POST /map), each with a type classification plus title and description when known. Cheap. Use it to size up a site before crawl_start, or when only the URL list is needed. API docs: https://apidocs.pline.ai/guides/endpoints/map
| Parameter | Type | Description |
|---|---|---|
url * | string | Base website URL to discover URLs for. |
ignore_cache | boolean | Bypass discovery caches and refresh. |
ignore_query_parameters | boolean | Exclude URLs carrying query strings. Default true. |
include_subdomains | boolean | Include subdomains of the registrable domain. Default true. |
limit | integer | Maximum links to return (1-1000000). Default 1000. |
sitemap | string | include: sitemaps, search fallback only when none exist; only: sitemaps alone; skip: search only. |
timeout | integer | null | Whole-request budget in ms; the service answers 504 when exceeded. |
scrape
Fetch one page synchronously and return its content in the requested formats (POST /scrape). Returns the flat pline.ai response: data (keyed by output), status (the page's HTTP status), final_url, session_id, request_id, effective_geolocation, site_tier. A 200 with empty data is a soft failure: retry with js_render=true if it was unset, or drop a proxy_strategy pin. The session returned is remembered per host and reused on the next scrape of that host. API docs: https://apidocs.pline.ai/guides/endpoints/scrape
| Parameter | Type | Description |
|---|---|---|
url * | string | Absolute http/https URL to fetch (max 2048 chars). |
actions | array | null | Browser steps run in order after load, e.g. {"action":"click","selector":"#more"}, {"action":"type","selector":"input","value":"q"}, {"action":"scroll","value":"800"}, {"action":"wait","value":"1500"}… |
body | object | string | null | Request body (JSON object or string) for POST/PUT/DELETE; not allowed with GET or a browser. |
geolocation | string | null | Fetch as a visitor from this 2-letter ISO country, e.g. "US". |
js_render | boolean | null | JavaScript rendering, three-way. Unset (default): the service decides, escalating to a browser only when a plain fetch comes back empty or as a JS shell. true: require a browser from the first attempt… |
max_chars | integer | Clip each returned output to this many characters (0 = no clipping). Default 60000. |
method | HTTP method for API-style targets; browser paths are GET only. Default GET. | |
new_session | boolean | Start a fresh session for this host instead of reusing the remembered one. |
only_main_content | boolean | Strip navigation, footer, and ads from clean_html, links, markdown, and json input. |
output | array | null | Formats to return, any combination of html, clean_html, links, markdown, clean_markdown, screenshot, screenshot_full_page, json. Default ["html"]. Returned under `data` as html_body, clean_html, links… |
prompt | string | null | Extraction instructions for output json (max 16384 chars). |
proxy_strategy | Access-strength tier in ascending cost. Unset/auto: start cheap and escalate only as far as the site requires. basic: cheapest tier only, fails rather than escalating. premium: start at the strongest,… | |
request_id | string | null | Your correlation id; echoed back as request_id. |
save_dir | string | null | Write each output to a file in this directory on the server's filesystem and return paths instead of content. Available only over stdio; HTTP rejects this option. |
schema | object | array | null | Desired JSON shape for output json; lenient, not strict JSON Schema, e.g. {"name":"string","price":"number"}. A list-shaped schema extracts a listing page and returns an array. |
session_id | string | null | Explicit session id to reuse. Unset: the server reuses the session it remembers for this host. |
tag | Up to 25 labels, 1-25 chars each of [A-Za-z0-9._-], echoed in usage logs. | |
timeout | integer | null | Request timeout in milliseconds (1000-60000). |
wait_ms | integer | null | Extra browser settle wait in milliseconds (0-60000). |
wait_selector | string | null | CSS selector to wait for before returning a browser-rendered page. |
search
Search the web (GET /serp) and return organic results, plus search features in full mode. Organic results carry position, title, link, snippet, domain, page, and html_body/clean_html/links when output was requested. API docs: https://apidocs.pline.ai/guides/endpoints/serp
| Parameter | Type | Description |
|---|---|---|
query * | string | Search keywords (max 512 chars). |
country | string | Country code for localization, or "all". Default all. |
device | string | Device profile. Default desktop. |
language | string | 2-letter result language code. Default en. |
mode | string | fast = 1 credit, organic results only; full = 3 credits, adds knowledge graph, people-also-ask, related searches, sitelinks. Default full. |
num_results | integer | Organic results to return (1-100). Default 10. |
only_main_content | boolean | Strip navigation and layout from enriched page content. Default true. |
output | array | null | Also fetch each result page: any of html, clean_html, links. Best-effort, +1 credit per page. |
tbs | Time filter: qdr:d (past day), qdr:w (past week), qdr:m (past month). |
sessions_list
Return the host -> session_id map this server is reusing for you. Empty until the first scrape.