---
title: "Scrape Webpage"
method: POST
path: "/scrape"
tags: ["scrape"]
---

# Scrape Webpage

`POST /scrape`

## Headers

- `x-notte-request-origin` string, nullable
- `x-notte-sdk-version` string, nullable

## Request body

- GlobalScrapeRequest
  - `headless` boolean — Whether to run the session in headless mode.
  - `solve_captchas` boolean — Whether to try to automatically solve captchas
  - `max_duration_minutes` integer — Maximum session lifetime in minutes (absolute maximum, not affected by activity).
  - `idle_timeout_minutes` integer — Idle timeout in minutes. Session closes after this period of inactivity (resets on each operation).
  - `proxies` union — List of custom proxies to use for the session. If True, the default proxies will be used.
    - union[]
      - union
        - NotteProxy
          - `type` 'notte'
          - `id` string, nullable
          - `country` 'ad' | 'ae' | 'af' | 'ag' | 'ai' | 'al' | 'am' | 'ao' | 'ar' | 'at' | 'au' | 'aw' | 'az' | 'ba' | 'bb' | 'bd' | 'be' | 'bf' | 'bg' | 'bh' | 'bi' | 'bj' | 'bm' | 'bn' | 'bo' | 'bq' | 'br' | 'bs' | 'bt' | 'bw' | 'by' | 'bz' | 'ca' | 'cd' | 'cg' | 'ch' | 'ci' | 'cl' | 'cm' | 'cn' | 'co' | 'cr' | 'cu' | 'cv' | 'cw' | 'cy' | 'cz' | 'de' | 'dj' | 'dk' | 'dm' | 'do' | 'dz' | 'ec' | 'ee' | 'eg' | 'es' | 'et' | 'fi' | 'fj' | 'fr' | 'ga' | 'gb' | 'gd' | 'ge' | 'gf' | 'gg' | 'gh' | 'gi' | 'gm' | 'gn' | 'gp' | 'gq' | 'gr' | 'gt' | 'gu' | 'gw' | 'gy' | 'hk' | 'hn' | 'hr' | 'ht' | 'hu' | 'id' | 'ie' | 'il' | 'im' | 'in' | 'iq' | 'ir' | 'is' | 'it' | 'je' | 'jm' | 'jo' | 'jp' | 'ke' | 'kg' | 'kh' | 'kn' | 'kr' | 'kw' | 'ky' | 'kz' | 'la' | 'lb' | 'lc' | 'lk' | 'lr' | 'ls' | 'lt' | 'lu' | 'lv' | 'ly' | 'ma' | 'md' | 'me' | 'mf' | 'mg' | 'mk' | 'ml' | 'mm' | 'mn' | 'mo' | 'mq' | 'mr' | 'mt' | 'mu' | 'mv' | 'mw' | 'mx' | 'my' | 'mz' | 'na' | 'nc' | 'ne' | 'ng' | 'ni' | 'nl' | 'no' | 'np' | 'nz' | 'om' | 'pa' | 'pe' | 'pf' | 'pg' | 'ph' | 'pk' | 'pl' | 'pr' | 'ps' | 'pt' | 'py' | 'qa' | 're' | 'ro' | 'rs' | 'ru' | 'rw' | 'sa' | 'sc' | 'sd' | 'se' | 'sg' | 'si' | 'sk' | 'sl' | 'sm' | 'sn' | 'so' | 'sr' | 'ss' | 'st' | 'sv' | 'sx' | 'sy' | 'sz' | 'tc' | 'tg' | 'th' | 'tj' | 'tm' | 'tn' | 'tr' | 'tt' | 'tw' | 'tz' | 'ua' | 'ug' | 'us' | 'uy' | 'uz' | 'vc' | 've' | 'vg' | 'vi' | 'vn' | 'ye' | 'za' | 'zm' | 'zw'
          - `city` string, nullable
        - ExternalProxy
          - `type` 'external'
          - `server` string, required
          - `username` string, nullable
          - `password` string, nullable
          - `bypass` string, nullable
        - TailnetProxy
          - `type` 'tailnet'
          - `oauth_client_id` string, required
          - `oauth_client_secret` string, nullable
    - boolean
  - `browser_type` 'chromium' | 'chrome' | 'chrome-nightly' | 'chrome-turbo' — The browser type to use. Supported values are chromium and chrome. chrome-nightly and chrome-turbo are legacy aliases for chrome.
  - `user_agent` string, nullable — The user agent to use for the session
  - `chrome_args` string[], nullable — Overwrite the chrome instance arguments
  - `viewport_width` integer, nullable — The width of the viewport
  - `viewport_height` integer, nullable — The height of the viewport
  - `aspect_ratio` '5:4' | '16:9', nullable — Viewport shape preset. When set, the backend fits the largest rectangle of this aspect ratio inside the sampled available screen area. Cannot be combined with explicit viewport_width/viewport_height.
  - `cdp_url` string, nullable — The CDP URL of another remote session provider.
  - `use_file_storage` boolean — Whether FileStorage should be attached to the session.
  - `screenshot_type` 'raw' | 'full' | 'last_action' — The type of screenshot to use for the session.
  - `profile` SessionProfile
    - `id` string, required — Profile ID to use for this session
    - `persist` boolean — Whether to save browser state to profile on session close
  - `web_bot_auth` boolean — Whether to use web bot authentication.
  - `extra_http_headers` object, nullable — Extra HTTP headers to be sent with every request.
  - `vault_id` string, nullable — The vault to use for the session
  - `auth_ids` string[] — Managed Auth connection IDs to verify and, when necessary, authenticate inside this session before it is returned.
  - `wait_for_authentication` boolean — Whether to wait for Managed Auth before returning the session. Defaults to true. When true, authentication failure or timeout fails session creation; when false, authentication continues in the background after the browser is ready.
  - `selector` string, nullable — Playwright selector to scope the scrape to. Only content inside this selector will be scraped.
  - `scrape_links` boolean — Whether to scrape links from the page. Links are scraped by default.
  - `scrape_images` boolean — Whether to scrape images from the page. Images are scraped by default.
  - `ignored_tags` string[], nullable — HTML tags to ignore from the page
  - `only_main_content` boolean — Whether to only scrape the main content of the page. If True, navbars, footers, etc. are excluded.
  - `only_images` boolean — Whether to only scrape images from the page. If True, the page content is excluded.
  - `response_format` unknown
  - `instructions` string, nullable — Additional instructions to use for the scrape. E.g. 'Extract only the title, date and content of the articles.'
  - `use_link_placeholders` boolean — Whether to use link/image placeholders to reduce the number of tokens in the prompt and hallucinations. However this is an experimental feature and might not work as expected.
  - `url` string, required

## Response `200`

Successful Response

- DataSpace
  - `markdown` string, required — Markdown representation of the extracted data
  - `images` ImageData[], nullable — List of images extracted from the page (ID and download link)
    - `url` string, nullable — URL of the image
    - `category` 'favicon' | 'icon' | 'content_image' | 'decorative' | 'svg_icon' | 'svg_content'
    - `description` string, nullable — Description of the image
  - `structured` StructuredDataBaseModel
    - `success` boolean — Whether the data was extracted successfully
    - `error` string, nullable — Error message if the data was not extracted successfully
    - `data` union — Structured data extracted from the page in JSON format
      - BaseModel
      - unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/notte/apis/notte-api.md) · [All operations](https://skmtc.net/notte/apis/notte-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/notte/notte-api/revisions/246f6d21de0c/schema)
