> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrape any web page by URL with Fetch API

> Use the Bright Data Fetch API scraper to collect any public web page by URL as Markdown, plain text, raw HTML or JSON-LD. Send POST /datasets/v3/scrape.

Fetch API (formerly Crawl API) is the Scraper API equivalent of Web Unlocker API. Send any public URL and get back the page as Markdown, plain text, raw HTML and JSON-LD in a single record.

## Query Parameters

<ParamField query="dataset_id" type="string" default="gd_m6gjtfmeh43we6cqc" required>
  The dataset ID used for this request.

  <Warning>
    Must be set to `gd_m6gjtfmeh43we6cqc` to collect **Fetch API - Collect by URL** data.
  </Warning>
</ParamField>

<ParamField query="notify" type="boolean" default={false}>
  Whether to send notifications when the request is completed.
</ParamField>

<ParamField query="include_errors" type="boolean" default={true}>
  Whether to include errors in the response.
</ParamField>

<ParamField query="custom_output_fields" type="string">
  Return only the listed output fields, separated by a pipe (`|`). For example, `url|markdown` returns only the URL and the Markdown version of the page.
</ParamField>

## Request Body

<ParamField body="input" type="object[]" required>
  An array of input objects.

  <Expandable title="properties">
    <ParamField body="url" type="string" required>
      The URL of the web page to fetch. Any public domain is accepted.
    </ParamField>

    <ParamField body="country" type="string">
      Two-letter country code to fetch the page from, for example `us` or `de`.
    </ParamField>
  </Expandable>

  #### Example

  ```json wrap theme={null}
  {
    "input": [
      {"url": "https://example.com"},
      {"url": "https://example.com/1", "country": "us"}
    ]
  }
  ```
</ParamField>

## Output fields

Each record holds these fields:

| Field | Type | Description |
| - | - | - |
| `url` | url | The input URL |
| `final_url` | url | The URL after redirects |
| `page_title` | text | The page title |
| `country` | country | The country the page was fetched from |
| `markdown` | Markdown | Page content as Markdown, keeping headings, lists and links |
| `html2text` | text | Page text with all HTML tags and formatting removed |
| `page_html` | HTML | The complete HTML source, including tags, scripts and styles |
| `ld_json` | JSON | Structured JSON-LD metadata from the page, such as schema.org data |

To get only some of these fields, set `custom_output_fields`, for example `custom_output_fields=url|markdown`.

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "url": "https://example.com",
      "final_url": "https://example.com/",
      "page_title": "Example Domain",
      "country": "us",
      "markdown": "# Example Domain\n\nThis domain is for use in illustrative examples in documents.",
      "html2text": "Example Domain\n\nThis domain is for use in illustrative examples in documents.",
      "page_html": "<!doctype html><html><head><title>Example Domain</title></head><body><div><h1>Example Domain</h1><p>This domain is for use in illustrative examples in documents.</p></div></body></html>",
      "ld_json": null
    }
  ]
  ```
</ResponseExample>
