---
title: "Page Scrape"
method: POST
path: "/sessions/{session_id}/page/scrape"
tags: ["sessions", "page"]
---

# Page Scrape

`POST /sessions/{session_id}/page/scrape`

## Path parameters

- `session_id` string, required

## Query parameters

- `update_metadata` boolean

## Headers

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

## Request body

- ScrapeRequest
  - `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.

## 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/versions/8dda4e3d49cc/schema)
