Logo
Portal
GuidesRecipesAPI ReferenceChangelog
GuidesRecipesAPI ReferenceChangelog
  • Airtop API
Portal
Airtop APIWindows

POST
https://api.airtop.ai/api/v1/sessions/:sessionId/windows/:windowId/scrape-content
POST
/api/v1/sessions/:sessionId/windows/:windowId/scrape-content
1curl -X POST https://api.airtop.ai/api/v1/sessions/6aac6f73-bd89-4a76-ab32-5a6c422e8b0b/windows/0334da2a-91b0-42c5-6156-76a5eba87430/scrape-content \
2 -H "Authorization: Bearer <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{}'
Try it
201Created
1{
2 "data": {
3 "modelResponse": {
4 "scrapedContent": {
5 "contentType": "contentType",
6 "text": "text"
7 },
8 "title": "title",
9 "selectedText": "selectedText"
10 }
11 },
12 "meta": {
13 "status": "success",
14 "usage": {
15 "credits": 1000000,
16 "id": "id"
17 },
18 "clientProvided": {
19 "clientRequestId": "clientRequestId"
20 },
21 "requestId": "requestId",
22 "screenshots": [
23 {}
24 ]
25 },
26 "errors": [
27 {
28 "message": "message",
29 "code": "code",
30 "details": {
31 "key": "value"
32 },
33 "reason": "reason"
34 }
35 ],
36 "warnings": [
37 {
38 "message": "message",
39 "code": "code",
40 "details": {
41 "key": "value"
42 },
43 "reason": "reason"
44 }
45 ]
46}
Was this page helpful?
Previous

Take a screenshot

Next
Built with
Scrape a window and return the content as markdown
Scrape

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path Parameters

sessionIdstringRequired
The session id for the window.
windowIdstringRequired
The Airtop window id of the browser window to scrape.

Request

This endpoint expects an object.
clientRequestIdstringOptional
costThresholdCreditslongOptional
A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).
timeThresholdSecondslongOptional
A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended). This setting does not extend the maximum session duration provided at the time of session creation.

Response

Created
dataobject
metaobject
errorslist of objects or null
warningslist of objects or null
Created

A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is not a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).

A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is not a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).

This setting does not extend the maximum session duration provided at the time of session creation.