INTEGRATIONS / TYPED HTTP RECIPE

Vera, meet TypeScript.

Add Vera to a TypeScript service or script. The response starts as unknown so you can validate the fields your application actually uses.

← All integrations

Your first connection.

  1. 01

    Create an API key in Dashboard → API keys. Store it as VERA_API_KEY in your server environment.

  2. 02

    Save the TypeScript example as vera.ts. In an existing TypeScript project, run it with your normal runner; for a standalone script, install tsx as a development dependency and run npx tsx vera.ts.

  3. 03

    Check the HTTP status and validate the response before using it. Never put your key in a browser bundle or a NEXT_PUBLIC_ variable.

Tool reference: TypeScript 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.

// Server-side TypeScript (Node.js 22+). Never ship the key to a browser.
const apiKey = process.env.VERA_API_KEY;
if (!apiKey) throw new Error("Set VERA_API_KEY");
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"
}),
  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 {};

This edits a code example. It does not send a request or use credits.

Run a request in your workspace
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 ↗