SDK Reference
Fresh Source: docs.airtop.aiAll SDK methods organized by category. TypeScript method names shown; Python equivalents use snake_case (e.g., pageQuery → page_query).
Sessions
| Method | Description |
|---|---|
client.sessions.create(config?) | Create a new browser session |
client.sessions.list() | List all active sessions |
client.sessions.getInfo(sessionId) | Get session details and status |
client.sessions.terminate(sessionId, options?) | End a session (optionally save profile) |
Session Configuration
typescript
{
configuration: {
timeoutMinutes: 10, // Auto-terminate timeout
persistProfile: true, // Enable profile saving
profileName: 'my-profile', // Profile to load or save
solveCaptcha: true, // Enable captcha solver
screenResolution: '1920x1080', // Viewport size
proxy: { // Proxy config
type: 'airtop' | 'custom',
options: { country: 'US', sticky: true }
}
}
}Terminate Options
typescript
{
saveProfileOnTermination: 'profile-name' // Save browser state as profile
}Windows
| Method | Description |
|---|---|
client.windows.create(sessionId, { url }) | Create a new window/tab |
client.windows.list(sessionId) | List windows in a session |
client.windows.close(sessionId, windowId) | Close a window |
client.windows.loadUrl(sessionId, windowId, { url }) | Navigate to a URL |
client.windows.getWindowInfo(sessionId, windowId) | Get window info + liveViewUrl |
Window Create Options
typescript
{
url: 'https://example.com',
waitUntil: 'load' | 'domcontentloaded',
screenResolution: '1920x1080'
}AI Operations
| Method | Description |
|---|---|
client.windows.scrapeContent(sessionId, windowId, config?) | Extract page as markdown |
client.windows.pageQuery(sessionId, windowId, { prompt, configuration? }) | Query page content |
client.windows.paginatedExtraction(sessionId, windowId, config) | Multi-page extraction |
client.windows.promptContent(sessionId, windowId, { prompt }) | Summarize/transform content |
client.windows.monitor(sessionId, windowId, { condition, configuration }) | Watch for page changes |
client.windows.fillForm(sessionId, windowId, { customData }) | AI form filling |
pageQuery Configuration
typescript
{
prompt: 'Extract all products',
configuration: {
outputSchema: { /* JSON Schema */ },
costThresholdCredits: 10,
timeThresholdSeconds: 30
}
}monitor Configuration
typescript
{
condition: 'Price drops below $50',
configuration: {
intervalMs: 5000,
timeoutMs: 300000
}
}Page Interactions
| Method | Description |
|---|---|
client.windows.click(sessionId, windowId, { elementDescription }) | Click an element |
client.windows.type(sessionId, windowId, { elementDescription, text }) | Type text into input |
client.windows.hover(sessionId, windowId, { elementDescription }) | Hover over element |
client.windows.scroll(sessionId, windowId, { direction, amount }) | Scroll the page |
Profiles
| Method | Description |
|---|---|
client.profiles.delete(profileId) | Delete a saved profile |
Files
| Method | Description |
|---|---|
client.files.list() | List uploaded files |
client.files.create(file) | Upload a file |
client.files.get(fileId) | Get file details |
client.files.delete(fileId) | Delete a file |
Automations
| Method | Description |
|---|---|
client.automations.list() | List all automations |
client.automations.create(config) | Create an automation |
client.automations.update(id, config) | Update an automation |
client.automations.delete(id) | Delete an automation |
client.automations.get(id) | Get automation details |
client.automations.asyncExecute(id) | Execute automation asynchronously |
Batch Operations
| Method | Description |
|---|---|
client.windows.batchOperate(config) | Process multiple URLs in parallel |
Batch Configuration
typescript
{
urls: ['url1', 'url2'],
maxConcurrentSessions: 5,
maxWindowsPerSession: 3,
operation: async (windowContext) => { /* ... */ }
}