API key Authenticates your requests to the Surfsky API. Keep it secret.
Regenerate the API key? The current key stops working within a minute. Stop your running browsers first.
Host Your API base URL. Browsers run in this region. One change per 24 hours.
Usage
Blocked by a site?
Get started
Give your agent a browser
Add the hosted server to your agent and sign in when the browser opens. Nothing to install.
claude mcp add --transport http surfsky https://mcp.surfsky.io/mcp
claude mcp login surfskyOr add this to Cursor's mcp.json.
{
"mcpServers": {
"surfsky": {
"url": "https://mcp.surfsky.io/mcp"
}
}
}codex mcp add surfsky --url https://mcp.surfsky.io/mcp
codex mcp login surfskygrok mcp add --transport http surfsky https://mcp.surfsky.io/mcp --header "Authorization: Bearer YOUR_API_TOKEN"Scripts and CI can send the API token in a header instead.See the docs
Or build Surfsky into your project
Paste this prompt into your coding agent. It sets up the SDK and runs one browser session.
Read and follow https://surfsky.io/SKILL.mdExample prompts
What your agent can do once the server is connected.
Use Surfsky to collect the first 50 companies listed on https://www.ycombinator.com/companies and reply with a CSV of company, batch and one-line description.Use Surfsky to read https://www.indeed.com/jobs?q=python+developer&l=Remote and list the first ten jobs with company and salary.Use Surfsky to open https://www.booking.com, type Lisbon into the destination box, pick next weekend in the calendar, click Search and tell me the first three hotels with their prices.Use Surfsky to read https://www.similarweb.com/website/github.com/, a page behind a captcha check, and tell me github.com's monthly visits, global rank and top countries.Use Surfsky to compare the price of the Sony WH-1000XM6 on amazon.com, bestbuy.com and walmart.com, and give me a table with links.One request returns the page as markdown. No browser to start or stop.
curl -X POST 'https://YOUR_API_HOST/scrape' \
-H 'X-Cloud-Api-Token: YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com", "formats": ["markdown"]}'Needs Python 3.12 or newer.
pip install surfskyfrom surfsky import Surfsky
client = Surfsky(api_token="YOUR_API_TOKEN", base_url="https://YOUR_API_HOST")
result = client.scrape("https://example.com", formats=["markdown"])
print(result.markdown)Save as scrape.mts and run with node scrape.mts.
npm install surfskyimport { Surfsky } from "surfsky";
const client = new Surfsky({ apiToken: "YOUR_API_TOKEN", baseUrl: "https://YOUR_API_HOST" });
const result = await client.scrape("https://example.com", { formats: ["markdown"] });
console.log(result.markdown);Start a browser, drive it with Playwright, stop it. The script uses rebrowser-playwright, a Playwright build without the automation leaks. A browser bills until it is stopped.
Needs Python 3.12 or newer.
pip install surfsky rebrowser-playwrightimport asyncio
from rebrowser_playwright.async_api import async_playwright
from surfsky import AsyncSurfsky
async def main():
async with (
AsyncSurfsky(api_token="YOUR_API_TOKEN", base_url="https://YOUR_API_HOST") as client,
client.session() as session, # stops the browser on exit
async_playwright() as playwright,
):
browser = await playwright.chromium.connect_over_cdp(session.connect_url)
context = browser.contexts[0]
page = context.pages[0] if context.pages else await context.new_page()
await page.goto("https://example.com")
print(await page.title())
asyncio.run(main())Save as automation.mts and run with node automation.mts.
npm install surfsky rebrowser-playwright-coreimport { chromium } from "rebrowser-playwright-core";
import { Surfsky } from "surfsky";
const client = new Surfsky({ apiToken: "YOUR_API_TOKEN", baseUrl: "https://YOUR_API_HOST" });
const session = await client.session();
try {
const browser = await chromium.connectOverCDP(session.ws_url);
const context = browser.contexts()[0];
const page = context.pages()[0] ?? (await context.newPage());
await page.goto("https://example.com");
console.log(await page.title());
await browser.close();
} finally {
await session.stop(); // stops the browser
}Tutorials
MCP server
A cloud browser for Claude Code, Cursor and other agents.
CLI
Scrape pages and control browsers from a shell.
Scraping API
A page as markdown or HTML in one request.
rebrowser
Playwright and Puppeteer without the automation leaks.
Patchright
Another patched Playwright, for Python and Node.
Playwright
Connect Playwright over CDP.
Puppeteer
Connect Puppeteer over CDP.
Selenium
Control the browser through ChromeDriver.
Scrapy
Render Scrapy requests in a cloud browser.
chromedp
Control the browser from Go.
Connected apps
Apps you allowed to use Surfsky.
No apps connected yet. Connect your AI agent and it appears here.