POST /v2/interact · goal
Give the browser a goal, get JSON that fits your schema
Describe what you need — "find the cheapest Poetry book, return its title and price" — and a live browser works towards it step by step: it reads the page as a numbered semantic snapshot, decides, acts, checks that the action did something, and returns a result validated against your JSON Schema. Or keep the session and drive it yourself, in plain words or JavaScript.
- Endpoint
POST /v2/interact · goal- Mode
- Goal run (synchronous, or async with a stream of events) · or an open session
- Credits
- 2 per browser minute + 1 per 1,000 LLM tokens of a goal
- Also
POST /v2/interact/{id}/execute(more goals, prompts or code in the same session) ·GET /v2/interact/{id}/goal·GET /v2/runs/{id}/events(SSE) ·DELETE /v2/interact/{id}· MCP toolengine_interact(goal)
What it's for
Checks you would do by hand
Is the product in stock in size M? Which plan includes SSO? The goal is the question, the schema is the answer's shape.
Content behind clicks
Cookie banners, tabs, filters and "load more" buttons — act first, then read what the page shows.
Several steps, one session
Open once, run several prompts or scripts against the same page state, then close.
Your own in-page script
Run JavaScript in the page and get the value of the last expression back — for the cases where you know exactly what to read.
Watch it live
liveView: true returns a single-use, read-only link to watch the browser while it works; every step also lands in the run log.
Step by step with your own model
Your agent decides, the browser executes: click, type, select, press, scroll and wait by ref, selector or coordinates. Each call returns what happened and a fresh numbered snapshot — no LLM cost on our side.
How it works
- Open
POST /v2/interact with a url opens the page in an isolated incognito browser context. The session lives up to ttl seconds (default 300, at most 1800) and closes after activityTtl seconds without activity (at most 300).
- Act in plain words
execute with a prompt: a model plans click, type, press, scroll, wait and navigate steps from a numbered snapshot of the page (up to 8 rounds) and answers in output. It never runs JavaScript — page text is data, not instructions.
- Or script it
execute with code runs in-page JavaScript only (no Node or Python Playwright code); the value of the last expression comes back in result.
- Close
DELETE ends the session and bills the browser minutes. Up to 2 sessions per key run at the same time; there is no raw CDP access to the shared browser.
- Goal mode
Send goal and outputSchema instead of a prompt: each step is a numbered snapshot of the live page → a strict-JSON decision (click, type, select, scroll, navigate, extract, done or fail) → the action → a check that it changed something. The result is validated against outputSchema; a mismatch gets one repair round, otherwise the run fails openly. Step, time, USD and credit caps end a run with a named reason, never an invented answer.
- Logins without secrets
Write
{{vault:ref}}in a goal or prompt; the value is typed by the browser but never shown to the model, the log or the response. - Step-by-step with your own model
execute with
actions: [{type, ref | selector | x,y, text?}]runs the steps with real mouse and keyboard input and answers with every step's result and a fresh snapshot whose [n] refs your next call can use;actions: []returns only the snapshot. The ladder for your model: ref or selector → coordinates → screenshot → read-only JavaScript. - Click diagnostics (what covers the element)
A step that cannot land says why — no match, several matches, hidden, disabled — or what covers the element (a cookie banner's tag, id, class and text), with the next move: close the banner first. Typing reports what the field kept: full, truncated, reformatted, emptied or focus moved.
- Trusted input only — no silent JS fallback
Clicks, typing, clearing and selecting go through the real mouse and keyboard, and a covered element is never clicked through. When a script fallback is unavoidable (an element without a clickable box) the response says so:
untrusted_click_fallback.
Two ways to drive it
| Mode | Request | What comes back |
|---|---|---|
| Goal | POST /v2/interact with url, goal, outputSchema — or goal in execute | result validated against your schema, numSteps, usage; the session closes unless keepSession |
| Session | POST /v2/interact with url, then POST /v2/interact/{id}/execute with {"prompt": "…"} or {"code": "…", "language": "javascript"}, then DELETE | the answer in output (prompt) or the value in result (code), step by step |
Both modes bill 2 credits per browser minute; a goal adds 1 credit per 1,000 LLM tokens.
Request parameters
Full docs →| Field | Type | Default | Description |
|---|---|---|---|
url | string | — | Open this page right away (or pass it to execute later). |
ttl | integer (s) | 300 | Session lifetime, 30–1800. |
activityTtl | integer (s) | 300 | Close after this long without activity, 10–300. |
mobile | boolean | false | Mobile viewport and user agent. |
location | object | — | {"country": "DE", "languages": ["de"]}. |
execute · prompt | string | — | A task in plain words (POST /v2/interact/{id}/execute); the answer is in output, the steps in steps. |
execute · code | string | — | In-page JavaScript with "language": "javascript"; the value of the last expression is in result. |
goal | string | — | What to achieve, in plain words (needs url). Also accepted by execute in an open session. |
outputSchema | object | — | JSON Schema subset for result (top-level object, ≤ 64 KB, depth ≤ 10). |
maxSteps | integer | 20 | Decision steps (up to 50). |
maxUsd | number | 0.25 | LLM cost cap for the run (up to 1). |
strict | boolean | false | Stop at the first failed step. |
stream / async | boolean | false | Server-Sent Events of the run, or return at once and poll GET /v2/interact/{id}/goal. |
keepSession | boolean | false | Keep the session open after the goal (otherwise it closes). |
liveView | boolean | false | Return a single-use, read-only live-view link (liveViewUrl, expires in 10 minutes). |
execute · query | string | — | A query on the current page state, e.g. { results[] { title url } } — the data comes back in query in exactly that shape (Query). |
execute · actions | array | — | Step mode: [{type: click | type | select | press | scroll | wait, ref | selector | x,y, text?, value?, key?}], up to 20 per call; the answer has steps[] (ok, error, why, next, kept) and a fresh snapshot. |
Unknown fields do not fail the request — they are listed in the response warning, as are values that were clamped to the engine's limits.
Example request
curl -X POST https://crawl.echolotnews.com/v2/interact \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://books.toscrape.com/",
"goal": "Find the cheapest book in the Poetry category. Return its title and price.",
"outputSchema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"price": {
"type": "number"
}
},
"required": [
"title",
"price"
]
},
"maxSteps": 12
}'import requests
API = "https://crawl.echolotnews.com"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
resp = requests.post(f"{API}/v2/interact", headers=HEADERS, json={
"url": "https://books.toscrape.com/",
"goal": "Find the cheapest book in the Poetry category. Return its title and price.",
"outputSchema": {
"type": "object",
"properties": {
"title": {
"type": "string",
},
"price": {
"type": "number",
},
},
"required": ["title", "price"],
},
"maxSteps": 12,
}, timeout=300)
resp.raise_for_status()
print(resp.json()["result"])const API = "https://crawl.echolotnews.com";
const headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" };
const res = await fetch(`${API}/v2/interact`, {
method: "POST",
headers,
body: JSON.stringify({
"url": "https://books.toscrape.com/",
"goal": "Find the cheapest book in the Poetry category. Return its title and price.",
"outputSchema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"price": {
"type": "number"
}
},
"required": [
"title",
"price"
]
},
"maxSteps": 12
}),
});
const json = await res.json();
console.log(json.result);# 1. Connect once (Claude Code)
claude mcp add --transport http echolot https://crawl.echolotnews.com/mcp \
--header "Authorization: Bearer YOUR_API_KEY"
# 2. Ask in plain words — the agent calls engine_interact, e.g.
# "On books.toscrape.com, find the cheapest Poetry book and its price"
# Tool call it makes:
{
"name": "engine_interact",
"arguments": {
"action": "open",
"url": "https://books.toscrape.com/",
"goal": "Find the cheapest Poetry book; return its title and price"
}
}Example response
{
"success": true,
"id": "5458917f-1264-4607-b8d0-d5cb34eff21d",
"status": "completed",
"result": { "title": "Poems That Make Grown Women Cry", "price": 14.19 },
"numSteps": 2,
"url": "https://books.toscrape.com/catalogue/category/books/poetry_23/index.html",
"usage": { "llmCalls": 2, "tokens": 7388, "costUsd": 0.002319 },
"credits": { "browser": 2.0, "llm": 7 },
"eventsUrl": "/v2/runs/5458917f-1264-4607-b8d0-d5cb34eff21d/events"
}Credits
Pricing →| What | Credits |
|---|---|
| Browser time (from opening to closing) | 2 / minute, at least 1 minute |
| Plain-words steps (prompt) | 0 extra |
| A session created without a url and closed unused | 0 |
| Goal decisions and extraction | 1 / 1,000 LLM tokens |
| Step mode (your own model) | 0 extra — browser minutes only |
Start with 500 free credits
No card required. Every endpoint, REST and MCP.