For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Portal
GuidesRecipesAPI ReferenceChangelog
GuidesRecipesAPI ReferenceChangelog
  • Airtop API
      • POSTCreate an automation (async)
      • POSTCreate a form filler automation (async)
      • POSTExecute an automation (async)
      • POSTFill a form using a form-filler automation (async)
      • GETList windows
      • POSTCreate window
      • GETGet window info
      • POSTLoad url
      • DELClose window
      • POSTClick
      • POSTCreate a form-filler automation synchronously
      • POSTFile Input
      • POSTFill a form synchronously using a form-filler automation
      • POSTHover
      • POSTMonitor for a condition
      • POSTQuery a page
      • POSTQuery a page with pagination
      • POSTPrompt content.
      • POSTScrape
      • POSTTake a screenshot
      • POSTScroll
      • POSTSummarize
      • POSTType
Portal
Airtop APIWindows

Query a page

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

Submit a prompt that queries the content of a specific browser window. You may extract content from the page, or ask a question about the page and allow the AI to answer it (ex. Is the user logged in?).

Was this page helpful?
Previous

Query a page with pagination

Next
Built with

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.

Request

This endpoint expects an object.
promptstringRequired
The prompt to submit about the content in the browser window.
clientRequestIdstringOptional
configurationobjectOptional
Request configuration
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).

followPaginationLinksbooleanOptionalDefaults to false

Make a best effort attempt to load more content items than are originally displayed on the page, e.g. by following pagination links, clicking controls to load more content, utilizing infinite scrolling, etc. This can be quite a bit more costly, but may be necessary for sites that require additional interaction to show the needed results. You can provide constraints in your prompt (e.g. on the total number of pages or results to consider).

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
warningslist of objects