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.
Your first connection.
- 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.
- 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.
- 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.
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 {};# 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.