---
title: "Scrape From Html"
method: POST
path: "/scrape_from_html"
tags: ["scrape"]
---

# Scrape From Html

`POST /scrape_from_html`

## Headers

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

## Request body

- ScrapeFromHtmlRequest
  - `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 — User description as to what needs to be scraped
  - `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.
  - `frames` FrameData[] — Frame data for all frames found in the page. The main frame has to be the first one
    - `frameUrl` string, required — URL of the frame
    - `frameData` string, required — DOM Content of the frame

## Response `200`

Successful Response

- ScrapeSchemaResponse
  - `model_schema` SchemaGenerationResponse, required
    - `success` boolean, required
    - `model_schema` object, nullable
    - `error` string, nullable
  - `scrape` StructuredDataBaseModel, required
    - `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)
