AUTOMATION • Click · Type · Scroll

Drive a browser with JSON steps.

Send a URL and a list of page actions — click, type, scroll — and get the page back after they run, as markdown, HTML, or the result of your own JavaScript. Every call is a fresh browser and nothing is kept between calls. Scale it with batch and async jobs, without a single line of Playwright.

For single-page extraction see the scraping API; for rendering and screenshots see the browser API.

CORE CAPABILITIES

Explicit actions, fresh browsers, zero browser ops.

DETERMINISTIC

Explicit page actions

Describe the steps as JSON: click a selector, type into a field, scroll to the bottom. Up to 50 actions run in order on the loaded page before it is captured, so the same request runs the same steps every time. No browser code to write.

STATELESS

A fresh browser every call

Each request gets a clean headless browser that is discarded when the call ends. No cookies, storage, or logged-in state carry from one call to the next — nothing to keep alive, nothing to reap, no state leaking between jobs.

JS EVAL

Read the page with your own JS

Pass js_eval with any JavaScript expression and its value comes back in eval_result. Wrap it in JSON.stringify to pull a list of names, prices, or links out of the rendered DOM and parse it on your side.

SERVERLESS

No Playwright fleet to run

There is no headless Chrome to deploy, no browser pool to scale, no stealth tuning — scrape calls run in stealth mode by default. Run the same actions over many URLs with batch requests, or queue async jobs that post results to your webhook.

EXECUTION MODES

Drive it five ways.

Page actions, JavaScript evaluation, element screenshots, batch runs, and async jobs with a webhook.

Click, type, scroll
# Click, type, and scroll on the loaded page, then capture it. One call, one fresh browser.
curl -X POST https://api.ollagraph.com/v1/scrape \
  -H "Authorization: Bearer $OLLAGRAPH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/catalog",
    "format": "markdown",
    "wait_until": "networkidle0",
    "actions": [
      {"action": "click", "selector": "button.load-more"},
      {"action": "click", "selector": "button.load-more"},
      {"action": "scroll_to_bottom"}
    ]
  }'
# => { "status": "success", "url": "...", "format": "markdown",
#      "content": "...", "time_ms": 3120, "fallback": false }
Act, then evaluate JS
# Act on the page, then read it with your own JavaScript.
curl -X POST https://api.ollagraph.com/v1/scrape \
  -H "Authorization: Bearer $OLLAGRAPH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/catalog",
    "actions": [
      {"action": "type", "selector": "input[name=filter]", "text": "wireless headphones"},
      {"action": "scroll_to_bottom"}
    ],
    "js_eval": "JSON.stringify([...document.querySelectorAll(\".product h2\")].map(e => e.textContent.trim()))"
  }'
# eval_result comes back as a string — parse it in your code:
# -> { "status": "success", ..., "eval_result": "[\"Model A\",\"Model B\"]" }
Element screenshot
# Wait for an element to appear, then screenshot just that element.
curl -X POST https://api.ollagraph.com/v1/screenshot \
  -H "Authorization: Bearer $OLLAGRAPH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/pricing",
    "wait_for_selector": "#pricing-table",
    "selector": "#pricing-table",
    "format": "png",
    "output": "json"
  }'
# -> { "status": "success", "url": "...", "final_url": "...",
#      "content_type": "image/png", "bytes": 48213, "image_base64": "..." }
Batch across URLs
# Run the same actions across many URLs in one request.
curl -X POST https://api.ollagraph.com/v1/scrape/batch \
  -H "Authorization: Bearer $OLLAGRAPH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://example.com/catalog?page=1",
      "https://example.com/catalog?page=2",
      "https://example.com/catalog?page=3"
    ],
    "concurrency": 3,
    "format": "markdown",
    "actions": [
      {"action": "click", "selector": "button.load-more"},
      {"action": "scroll_to_bottom"}
    ]
  }'
Async with a webhook
# Queue a scrape and get the result posted to your webhook.
curl -X POST https://api.ollagraph.com/v1/scrape/async \
  -H "Authorization: Bearer $OLLAGRAPH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/catalog",
    "webhook_url": "https://your-app.example/hooks/ollagraph",
    "format": "markdown",
    "actions": [{"action": "scroll_to_bottom"}]
  }'
# -> { "status": "queued", "job_id": "..." }
PRODUCTION PATTERNS

Flows that ship today.

Common patterns — each is one or two readable calls.

01

Load everything, then read it

Click the load-more button a few times, scroll_to_bottom, and get the fully expanded page back as markdown. One scrape call, one fresh browser.

02

Pull structured data with JS

Add a js_eval expression that JSON.stringify-s the product cards on the rendered page, then parse eval_result in your code into name, price, and URL fields.

03

Filter a client-side list

Type into an in-page filter box and click apply before capture. Works for interactions that update the page in place — actions don't wait for a navigation to a new page.

04

Same steps across many URLs

Send a list of URLs to /v1/scrape/batch with one actions array and a concurrency limit. Each URL runs in its own fresh browser.

05

Fire and forget with a webhook

Queue a scrape with /v1/scrape/async and a webhook_url. You get a job_id immediately and the result is posted to your endpoint when it finishes.

06

Visual check of the result

Use /v1/screenshot with wait_for_selector and selector to capture just the element you care about, as PNG or JPEG, for visual diffs or reports.

Browse all recipes, or wire results to your stack with webhooks.

FREQUENTLY ASKED QUESTIONS

Automation questions

1

What is the difference between this, the scraping API, and the browser API?

They all run on the same stateless headless browser. This automation page is about driving a page with explicit actions — click, type, scroll — and running those steps at scale with batch and async jobs. The scraping API is the single-page call that carries those actions. The browser API page covers rendering to hydrated HTML and screenshots. Every call, on every page, is a fresh browser.
2

Do I need to write CSS selectors?

Yes. Click and type actions target elements by CSS selector, for example {"action": "click", "selector": "button.load-more"}. There is no natural-language element matching, so if the target site changes its markup you update the selector.
3

Is there a natural-language or AI agent mode?

No. There is no model in the loop: you send explicit JSON steps and they run exactly as written. If you want an LLM to decide the steps, run that logic in your own code and send the resulting actions array to /v1/scrape.
4

Are sessions persistent across calls?

No. Every call starts a fresh browser and discards it when the call ends — cookies, storage, and any logged-in state are not kept. That also means logging in is not supported: actions cannot complete a login, and you cannot pass your own cookies. Use the API for publicly reachable pages.
5

What happens if an action navigates to a new page?

Actions don't wait for a navigation, so they are meant for in-page interactions: opening a panel, typing into a filter, clicking load more, scrolling. To get a different page, call /v1/scrape with that page's URL directly.
6

Which actions are supported?

Three: {"action": "click", "selector": ...}, {"action": "type", "selector": ..., "text": ...}, and {"action": "scroll_to_bottom"}. The key is action. You can send up to 50 per call. There is no wait action — set wait_until on /v1/scrape to control when the page counts as loaded.
7

How do I get structured data out?

Pass a js_eval expression. Its value comes back as a string in eval_result, so wrap structured results in JSON.stringify and parse them on your side. You can combine js_eval with actions in the same call.
8

Can I run the same actions on many pages?

Yes. /v1/scrape/batch takes a list of URLs plus one actions array and a concurrency limit. /v1/scrape/batch/async does the same as a background job with an optional webhook_url, and /v1/scrape/async queues a single URL and posts the result to your webhook_url.
9

How is this billed?

A scrape call costs 1 credit, and JavaScript rendering and the actions in that call add nothing. Screenshots cost 3 credits. Opting into a residential proxy adds 3 credits. Failed calls are refunded, so a timeout or a missed element never costs you. You get 1,000 free credits on signup — see pricing for the current credit packs.
1,000 free credits • Failed calls refunded

Skip the headless-browser fleet.

1,000 free credits, one bearer token, failed calls auto-refund. A scrape call costs 1 credit, with JavaScript rendering and page actions included.

No credit card required Pay per call 123 endpoints live