INTEGRATIONS / BROWSER RECIPE

Vera, meet Playwright.

Offload JavaScript rendering, selector waits and bounded browser actions (click, fill, scroll) to Vera's sandboxed headless browser, or use Vera search and fast Markdown reads to trim your own Playwright workload.

← All integrations

Your first connection.

  1. 01

    Store your workspace key as VERA_API_KEY on the server. For most dynamic pages, call POST /api/vera/v1/scrape with render: true or mode: "auto" before spinning up a local browser.

  2. 02

    When a public page needs bounded interaction before reading (such as expanding a tab or scrolling lazy content), pass wait_for or an actions list to Vera's sandboxed renderer.

  3. 03

    When running your own Playwright suite in Python or TypeScript, discover target URLs via /api/vera/v1/search first and reserve full Playwright sessions for pages that genuinely need custom scripting.

Tool reference: Playwright documentation ↗

Build the request.

Set the environment variables in your terminal for these code examples. In automation tools, enter the URL and credentials in the tool’s own fields.

vera-browser-actions.tsTypeScript · Vera sandboxed browser
const apiKey = process.env.VERA_API_KEY;
if (!apiKey) throw new Error("Set VERA_API_KEY");

// Run JavaScript, scroll and wait for content inside Vera's browser sandbox
const response = await fetch("https://vera.waggle.ae/api/vera/v1/scrape", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://example.com",
    render: true,
    response_format: "markdown",
    wait_for: "main",
    actions: [
      { type: "scroll", direction: "down", pixels: 800 },
      { type: "wait", ms: 500 },
    ],
  }),
  signal: AbortSignal.timeout(45000),
});
const result: unknown = await response.json();
if (!response.ok) {
  throw new Error(`Vera HTTP ${response.status}: ${JSON.stringify(result)}`);
}
console.log(result);
export {};
playwright_with_vera.pyPython · Playwright + Vera search
# pip install playwright httpx && playwright install chromium
import asyncio, os, httpx
from playwright.async_api import async_playwright

API_KEY = os.environ["VERA_API_KEY"]
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

async def main() -> None:
    async with httpx.AsyncClient(timeout=30) as http:
        serp = await http.post(
            "https://vera.waggle.ae/api/vera/v1/search",
            headers=HEADERS,
            json={"query": "software documentation example", "country": "ae", "limit": 3},
        )
        serp.raise_for_status()
        urls = [row["url"] for row in serp.json()["data"]["results"]]

    async with async_playwright() as pw:
        browser = await pw.chromium.launch(headless=True)
        page = await browser.new_page()
        for target in urls[:1]:
            await page.goto(target, wait_until="domcontentloaded", timeout=30000)
            print(target, "->", await page.title())
        await browser.close()

asyncio.run(main())

Reading or copying this example does not send a request or use credits.

YOUR PRIVACY

Choose what works for you. You can reopen these settings from the footer at any time.

Essential

Always active

Sign-in, security and preferences you ask us to remember. These keep the service working.

Analytics

Optional Vera visitor reporting counts visits and active browsers; Google Analytics may also measure selected clicks. We don’t send form contents, requested URLs, search queries, passwords, API keys or account emails. Turn it off here at any time.

Advertising

Not in use

No advertising cookies or remarketing tags.

Your choice is stored on this browser for 180 days. Read the cookie policy ↗