POST
/
v1
/
ai
/
scrape

Body

url
string
required

URL of the page to scrape

element_prompts
array<string>
required

Items on the page to scrape. E.g. Plan price, Plan title

advance_config
object

Advance configurations

console
boolean
network
boolean
cookies
boolean
http_headers
object

This parameter allows you set header properties. e.g Authentication header

reject_request_pattern
array<string>

Intercepting requests

  • jpg
  • png
goto_options
object

This parameter allows you to specify custom page-load behavior.

timeout
number
default: "15000"

Custom timeout in milliseconds. Maximum value is 15000(15seconds)

wait_until
string
default: "load"
  • load
  • domcontentloaded
  • networkidle0
  • networkidle2
wait_for
object

Specifies conditions under which an operation should wait before proceeding.

mode
string

Supported values:

  • timeout
  • selector
  • function
value
string|number

This parameter can accept one of three options:

  • A number indicating the time in milliseconds to wait. Maximum timeout 15000

  • A valid selector to wait for. e.g h2
  • A function to be ran within the page’s context, inside of the browser. e.g () => document.querySelector('h2')

cookies
array<CookieParameter>

Set cookie(s)

name
string
required

Cookie name.

value
string
required

Cookie value.

url
string

The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.

domain
string

Cookie domain.

path
string

Cookie path.

secure
boolean

True if cookie is secure.

httpOnly
boolean

True if cookie is http-only.

sameSite
string

Cookie SameSite type.Supported values:

  • Strict
  • Lax
  • None
expires
number

Cookie expiration date, session cookie if not set.

priority
string

Cookie Priority. Supported values:

  • Low
  • Medium
  • High
sameParty
boolean

True if cookie is SameParty.

partitionKey
string

Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. If not set, the cookie will be set as not partitioned.

sourcePort
number

Cookie source port. Valid values are , -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.

sourceScheme
string

Cookie source scheme type. Supported values:

  • Secure
  • NonSecure
  • Unset
size_preset
string

The screen size preset to use. Supported values are:

  • QVGA
  • VGA
  • SVGA
  • HD
  • HD+
  • SXGA
  • FHD
  • 2K
  • 2K QHD
  • 5K
  • 4K UHD
is_mobile
boolean

Sets the viewport to mobile.

scale
number
default: "1"

The device scale factor. The default value is 1.

width
number
default: "1920"

The width of the viewport.

height
number
default: "1080"

The height of the viewport

force_rotate_proxy
boolean

When enabled, this option forces a proxy rotation on every request. Note: Enabling this feature incurs an extra API request cost. For example, for every single request, you will be billed for two.

byo_proxy
object

Allows you to specify any proxy for the scraping task.

server
string

The proxy server url. E.g https://{username}:{password}@proxy.com

auth
object

Authentication credentials. If the credentials are already included in the server URL (e.g., https://{username}:{password}@proxy.com), there is no need to provide the auth parameter.

username
string

The authentication username.

password
string

The authentication password.

x-api-key
string
required

Your JigsawStack API key

Response

success
boolean

Indicates whether the call was successful.

data
json

Scrape data of the page