Overview & Purpose

POST /scrape is pline’s synchronous, single-URL endpoint: send one URL, get content back in the same HTTP response. No job to create, no polling — the response is the result. Use it when your workflow needs an answer right now for one URL — a page load in a user-facing app, a single product lookup, an interactive script, or any place where waiting on a background job isn’t an option. Prerequisites: a valid API key on every request (see Getting started). No special scope or permission beyond a standard key is required.
Note: If you’re about to reach for /scrape in a loop over many known URLs, or to discover a site’s structure first, stop — see Batch scrape and Map instead. /scrape is built for one URL at a time.

Best practices

  • pline is adaptive by default. Every request starts with the cheapest fetch method and opens up from there — escalating to a browser, and to different proxies, only as far as needed to get the data back. Only set js_render or proxy_strategy explicitly once you already know a target site needs it — guessing wrong just adds latency and cost.
  • Reuse session_id across requests that need to share cookies, instead of re-authenticating every call.
  • Prefer wait_for_selector-style actions over fixed delays when you can — waiting on a specific element is more reliable than guessing a wait_ms value.
  • Concurrency: requests sharing the same session_id are serialized; a second in-flight request on that session receives a 429.
  • Set a tag on requests you’ll want to find again later — it lets you filter and trace requests in Request history for debugging, without having to remember URLs or timestamps. It isn’t echoed back in the response body itself.
Actions (actions) simulate interactions in a real browser before content is captured — implies js_render: true. Use them whenever the data you need doesn’t exist until something happens on the page: For the complete, authoritative list of request/response fields, see the API reference — this page intentionally doesn’t repeat it.

Practical Implementation Example

Scenario: fetch a product page, wait for its JS-rendered price to load, and extract structured fields — a common “one URL, structured answer” workflow.

Error codes

Note: Always inspect status in the response before assuming failure from a non-200 body — see Request history to trace a specific request end-to-end with request_id.