pline.ai

v0.3.13
io.github.grepsr/pline-ai Checked 6 hours ago Published 8 days ago

Scrape, 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.

ParameterTypeDescription
id *stringJob 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

ParameterTypeDescription
urls *arrayURLs to scrape with identical options (max 10000).
actionsarray | nullBrowser 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"}…
bodyobject | string | nullRequest body (JSON object or string) for POST/PUT/DELETE; not allowed with GET or a browser.
emailstring | nullOptional completion email.
geolocationstring | nullFetch as a visitor from this 2-letter ISO country, e.g. "US".
heartbeat_timeout_secsintegerWorkflow heartbeat timeout in seconds. Default 30.
js_renderboolean | nullJavaScript 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…
limitintegerMaximum URLs accepted for this job (1-10000). Default 10000.
methodHTTP method for API-style targets; browser paths are GET only. Default GET.
only_main_contentbooleanStrip navigation, footer, and ads from clean_html, links, markdown, and json input.
outputarray | nullFormats 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…
promptstring | nullExtraction instructions for output json (max 16384 chars).
proxy_strategyAccess-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_secsintegerWorkflow schedule-to-close deadline in seconds. Default 86400.
schemaobject | array | nullDesired 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_idstring | nullSession id applied to every URL; all URLs must then share one registrable domain.
tagUp to 25 labels, 1-25 chars each of [A-Za-z0-9._-], echoed in usage logs.
timeoutinteger | nullRequest timeout in milliseconds (1000-60000).
wait_msinteger | nullExtra browser settle wait in milliseconds (0-60000).
wait_selectorstring | nullCSS selector to wait for before returning a browser-rendered page.
webhookOptional 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.

ParameterTypeDescription
id *stringJob UUID returned by the start tool.
download_dirstring | nullWhen the job is completed, download every artifact into this directory on the server's filesystem. Available only over stdio; HTTP rejects this option.
wait_secondsnumberPoll 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.

ParameterTypeDescription
id *stringJob 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

ParameterTypeDescription
url *stringSeed URL; the crawl follows links from here.
actionsarray | nullBrowser steps run on every page after load; implies a browser.
allow_subdomainsbooleanInclude subdomains of the seed's domain.
crawl_entire_domainbooleanAllow leaving the seed's path prefix.
emailstring | nullAddress notified when the crawl completes.
exclude_pathsarray | nullRegexes; matching paths are skipped.
geolocationstring | nullFetch every page as a visitor from this 2-letter ISO country.
heartbeat_timeout_secsintegerWorkflow heartbeat timeout in seconds. Default 30.
ignore_query_parametersbooleanDrop URLs carrying query strings.
ignore_robots_txtbooleanIgnore robots.txt while discovering URLs. Default true.
include_pathsarray | nullRegexes; only matching paths are crawled.
js_renderboolean | nullSame meaning as on scrape, applied to every page fetch.
limitintegerMaximum pages (1-10000). Default 10000, matching the API. Confirm scope for large sites.
max_discovery_depthinteger | nullLink depth from the seed.
only_main_contentbooleanStrip navigation, footer, and ads from cleaned outputs.
outputarray | nullFormats to store, any of markdown, html, clean_html, links, screenshot, screenshot_full_page. Default ["markdown"].
proxy_strategySame meaning as on scrape, applied to every page fetch.
schedule_to_close_timeout_secsintegerWorkflow schedule-to-close deadline in seconds. Default 86400.
sitemapstringinclude: use sitemaps plus links; only: sitemaps alone; skip: ignore sitemaps. Default include.
tagUp to 25 labels echoed in usage logs.
timeoutinteger | nullPer-page request deadline in milliseconds (1000-60000).
wait_msinteger | nullExtra settle wait in milliseconds per browser-rendered page (0-60000).
wait_selectorstring | nullCSS selector to wait for on every browser-rendered page.
webhookFull event webhook configuration. Use this instead of webhook_url for headers, metadata, or event selection.
webhook_urlstring | nullPublic 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.

ParameterTypeDescription
id *stringJob UUID returned by the start tool.
download_dirstring | nullWhen the job is completed, download every artifact into this directory on the server's filesystem. Available only over stdio; HTTP rejects this option.
wait_secondsnumberPoll 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

ParameterTypeDescription
url *stringBase website URL to discover URLs for.
ignore_cachebooleanBypass discovery caches and refresh.
ignore_query_parametersbooleanExclude URLs carrying query strings. Default true.
include_subdomainsbooleanInclude subdomains of the registrable domain. Default true.
limitintegerMaximum links to return (1-1000000). Default 1000.
sitemapstringinclude: sitemaps, search fallback only when none exist; only: sitemaps alone; skip: search only.
timeoutinteger | nullWhole-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

ParameterTypeDescription
url *stringAbsolute http/https URL to fetch (max 2048 chars).
actionsarray | nullBrowser 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"}…
bodyobject | string | nullRequest body (JSON object or string) for POST/PUT/DELETE; not allowed with GET or a browser.
geolocationstring | nullFetch as a visitor from this 2-letter ISO country, e.g. "US".
js_renderboolean | nullJavaScript 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_charsintegerClip each returned output to this many characters (0 = no clipping). Default 60000.
methodHTTP method for API-style targets; browser paths are GET only. Default GET.
new_sessionbooleanStart a fresh session for this host instead of reusing the remembered one.
only_main_contentbooleanStrip navigation, footer, and ads from clean_html, links, markdown, and json input.
outputarray | nullFormats 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…
promptstring | nullExtraction instructions for output json (max 16384 chars).
proxy_strategyAccess-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_idstring | nullYour correlation id; echoed back as request_id.
save_dirstring | nullWrite 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.
schemaobject | array | nullDesired 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_idstring | nullExplicit session id to reuse. Unset: the server reuses the session it remembers for this host.
tagUp to 25 labels, 1-25 chars each of [A-Za-z0-9._-], echoed in usage logs.
timeoutinteger | nullRequest timeout in milliseconds (1000-60000).
wait_msinteger | nullExtra browser settle wait in milliseconds (0-60000).
wait_selectorstring | nullCSS selector to wait for before returning a browser-rendered page.

sessions_list

Return the host -> session_id map this server is reusing for you. Empty until the first scrape.