POST
/
env
/
scrape
curl --location \
--request POST 'https://api.notte.cc/env/scrape' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your-api-key' \
--data '{
  "session_id": "abc123",
  "url": "https://example.com"
}'
{
  "session_id": "abc123",
  "title": "Example Domain",
  "url": "https://example.com",
  "timestamp": "2024-01-07T12:34:56Z",
  "screenshot": null,
  "data": {
    "markdown": "## Example Domain\n\nThis domain is for use in illustrative examples in documents. You may use this\n    domain in literature without prior coordination or asking for permission.\n\nMore information..."
    "images": null,
    "structured": null
  },
  "space": null
}
curl --location \
--request POST 'https://api.notte.cc/env/scrape' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your-api-key' \
--data '{
  "session_id": "abc123",
  "url": "https://example.com"
}'
{
  "session_id": "abc123",
  "title": "Example Domain",
  "url": "https://example.com",
  "timestamp": "2024-01-07T12:34:56Z",
  "screenshot": null,
  "data": {
    "markdown": "## Example Domain\n\nThis domain is for use in illustrative examples in documents. You may use this\n    domain in literature without prior coordination or asking for permission.\n\nMore information..."
    "images": null,
    "structured": null
  },
  "space": null
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
min_nb_actions
integer | null

The minimum number of actions to list before stopping. If not provided, the listing will continue until the maximum number of actions is reached.

max_nb_actions
integer
default:100

The maximum number of actions to list after which the listing will stop. Used when min_nb_actions is not provided.

session_id
string | null

The ID of the session. A new session is created when not provided.

keep_alive
boolean
default:false

If True, the session will not be closed after the operation is completed.

session_timeout_minutes
integer
default:5

Session timeout in minutes. Cannot exceed the global timeout.

Required range: 0 < x <= 30
screenshot
boolean | null

Whether to include a screenshot in the response.

url
string | null

The URL to observe. If not provided, uses the current page URL.

scrape_images
boolean
default:false

Whether to scrape images from the page. Images are not scraped by default.

only_main_content
boolean
default:true

Whether to only scrape the main content of the page. If True, navbars, footers, etc. are excluded.

Response

200
application/json
Successful Response
session
object
required

Browser session information

metadata
object
required

Metadata of the current page, i.e url, page title, snapshot timestamp.

screenshot
file | null

Base64 encoded screenshot of the current page

data
object | null

Extracted data from the page

space
object | null

Available actions in the current state