Docs

Build with Wayfern

Real browsers over CDP, web pages as Markdown or JSON, live search and captcha solving. One account, one token model, one credit balance.

wss://api.wayfern.com/ws

Quickstart

From sign-in to your first page

Three steps. You need an account with a plan or a credit pack.

  1. Step 1:Sign in and get your tokens

    Sign in with your email and a 6-digit code. Create an API token under Tokens: it starts with wf_ and is shown once, so store it. For browsers, open a project and create a browser link; its token goes in the WebSocket URL.

    Shell

    # API token (Web Data, Search, Captcha, MCP): Dashboard > Tokens
    export WF_TOKEN="wf_..."
    
    # Browser link token: Dashboard > Projects > your project > Browser links
    export LINK_TOKEN="..."
    # Connect to: wss://api.wayfern.com/ws?token=$LINK_TOKEN
  2. Step 2:Connect a browser

    Point Playwright or Puppeteer at the gateway. Opening the socket starts the session; there is no "create session" call. A cold start takes about 45 to 50 seconds, longer with a residential exit.

    import { chromium } from "playwright";
    
    // Connect to a Wayfern browser by opening the CDP WebSocket with a link token.
    // Sessions are created implicitly when this connection opens; there is no REST
    // endpoint to "create" a session.
    const browser = await chromium.connectOverCDP(
      "wss://api.wayfern.com/ws?token=<LINK_TOKEN>",
    );
    const context = browser.contexts()[0];
    const page = await context.newPage();
    await page.goto("https://example.com");
    console.log(await page.title());
    await browser.close();
  3. Step 3:Scrape your first page

    Or skip the browser code: send a URL to the Web Data API and get clean Markdown back. A page costs 1 credit, and the response tells you what it charged.

    curl -X POST https://api.wayfern.com/api/v1/scrape \
      -H "Authorization: Bearer $WF_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{ "url": "https://example.com" }'

Reference

What you can call

Every endpoint, parameter, status code and response shape, with the credits it costs.

For LLMs

The docs as plain Markdown

Give your coding agent the whole reference in one file. These are built from the same data as these pages.