Request options and usage

Configure method, strategy, routing, redirects, readiness, and execution limits.

Configure only what the request needs

Important request controls include:

SettingPurpose
urlRequired public HTTP or HTTPS destination.
methodGET or POST; rendering and readiness are intended for GET.
strategyRetrieval level: standard, adaptive, or premium; see the choices below.
proxyOptional country and sticky-session preferences.
headers and bodyOptional headers and body sent to the target URL.
follow_redirectsWhether to follow safe public redirects.
wait_forOptional readiness selectors for rendered retrieval.
success_criteriaOptional checks that the returned response must satisfy before it is accepted.
timeout_msTotal execution budget within the documented limits.
max_request_unitsMaximum request units the caller permits.

Choose a retrieval strategy

StrategyBehaviourChoose it when
standardUses HTTP retrieval only.The destination is straightforward and does not require rendered page readiness.
adaptiveStarts efficiently and adds stronger retrieval automatically when needed.Most public destinations; this is the recommended default.
premiumStarts with rendered browser retrieval.The destination requires JavaScript rendering immediately or has consistently needed browser retrieval.

Readiness selectors require adaptive or premium.

Choose location and request continuity

The optional proxy object accepts location and continuity preferences:

FieldPurpose
countryTwo-letter country from which the request should originate. Omit it when any available country is acceptable.
session_idReuse a bounded continuity identifier for related requests. Omit it for independent requests.

Select page readiness syntax

wait_for_typeBehaviour
cssInterpret every wait_for entry as a CSS selector.
xpathInterpret every wait_for entry as an XPath expression.

wait_for supports up to ten selectors and completes after at least one
selector matches. It is available only for rendered GET requests with
redirect following enabled.

Require a usable response

Use success_criteria when an HTTP success status alone does not prove that the
page is usable. Every supplied criterion must pass. A response that does not
pass is treated as incomplete, allowing the approved retry and browser
escalation policy to continue within the original time and request-unit limits.

FieldBehaviour
status_codesAccept only one of up to twenty HTTP status codes.
content_typesAccept one of up to ten media types; a type such as text/* matches any subtype.
body_containsRequire every supplied text fragment to be present.
body_excludesRequire every supplied text fragment to be absent.
min_body_bytesRequire at least this many response-body bytes.
{
  "url": "https://example.com/products",
  "strategy": "adaptive",
  "success_criteria": {
    "status_codes": [200],
    "content_types": ["text/html"],
    "body_contains": ["Products"],
    "body_excludes": ["Access denied"],
    "min_body_bytes": 1000
  }
}

Text checks are exact and case-sensitive. Each text list supports up to ten
unique fragments of at most 200 characters. Requests without
success_criteria retain the normal Web Unblocker success classification.

Set follow_redirects to true to follow safe public redirects or false to
return the first response. Use max_request_units as a cost ceiling: the
request stops rather than exceeding the supplied value.

Confirm your account limits in the Raspbytes dashboard before increasing
concurrency. A completed response includes the usage information needed to
measure and control request cost.


Did this page help you?