Browser keys (free tools)Menu
Browser keys
Offer a free tool on your website. Visitors call the API from the page, and you pay for what they use, within limits you set.
Server keys and browser keys
| Server key (ssk_live_) | Browser key (spk_live_) | |
|---|---|---|
| Where it lives | Your backend only | Your public web page |
| Secret? | Yes. Refused from browsers with SECRET_KEY_IN_BROWSER | No. Safe to publish |
| Who calls the API | Your server | Your visitors' browsers |
| Protection | Secrecy, optional IP allowlist | Allowed websites, your captcha or signed user tokens, endpoint list, per-visitor limits, credit caps |
| Endpoints | All | Only the ones you allow |
If you have a backend and your users only use the tool through it, a server key behind your own endpoint is still the simplest and strongest option. Browser keys are for pages without a backend call in between, such as free tools, widgets and landing pages.
How it works
- You create a browser key on the API keys page: allowed websites, how visitors are verified, which endpoints the key may call, and your limits. When you paste your captcha keys, we check them with your captcha provider and your own website's domain.
- A visitor is verified in one of two ways. Anonymous visitors pass your captcha (Cloudflare Turnstile or Google reCAPTCHA, with your own site key) and get a short-lived session. Signed-in users of your site get a short-lived token signed by your server, with no captcha.
- Each request is checked against the allowed websites, the endpoint list, the visitor or user limits and the key's daily and monthly credit caps, then runs and is charged to your credits.
New keys start in test mode: verification and GET /v1/browser/ping work, data requests return KEY_IN_TEST_MODE and nothing is charged. After one successful check from an allowed website, click Go live.
Ready-made tool (no code)
Add the script once and a placeholder where the tool should appear. One placeholder shows every endpoint on the key: visitors pick the platform and what to look up with buttons, and see the result the way the playground shows it, with profiles, feeds, photos and playable videos. The tool loads your captcha and calls the API for them.
While the key is in test mode, the tool runs the full check (captcha and connection) and shows It works! with example data instead of a result, so you can test on your real page without spending credits.
<!-- Once per page -->
<script src="https://api.scrapeeverything.com/embed/v1.js" data-key="spk_live_YOUR_BROWSER_KEY" async></script>
<!-- Where the tool should appear: every endpoint on the key, chosen with buttons -->
<div data-scrapeeverything></div>| Attribute | Where | Meaning |
|---|---|---|
data-key | script | Your browser key. |
data-user-token-url | script | Optional. A URL on your site that returns { "token": "..." } for signed-in users. |
data-scrapeeverything | placeholder | Empty: every endpoint on the key. A platform such as instagram, one endpoint such as instagram.profile, or several separated by commas. |
data-title | placeholder | Heading above the tool. |
data-button | placeholder | Button text. Default: Look up. |
data-theme | placeholder | light or dark. Default: follows the visitor's system. |
data-accent | placeholder | Button color as a hex value, for example #f97316. The --se-accent CSS variable overrides it. |
data-params | placeholder | Fixed extra parameters as JSON, for example {"limit": 20}. |
data-ui="basic" | script or placeholder | A plain form with one endpoint instead of the full tool. It is also the fallback when the tool cannot load. |
The tool fires scrapeeverything:result, scrapeeverything:error and, in test mode, scrapeeverything:test events on its element.
api.scrapeeverything.com in script-src, connect-src, img-src and media-src, scrapeeverything.com in script-src (the tool's interface), plus your captcha provider (challenges.cloudflare.com, or www.google.com and www.gstatic.com).Match your site's look
The tool keeps its own styles apart from your page, so your CSS cannot break it. To change its look, set these CSS variables on the placeholder (or on any parent, such as :root), and style single parts with ::part().
[data-scrapeeverything] {
max-width: 760px;
--se-accent: #2563eb;
--se-accent-text: #ffffff;
--se-radius: 8px;
--se-font: Inter, sans-serif;
}
[data-scrapeeverything]::part(button) {
text-transform: uppercase;
}| Variable | Changes |
|---|---|
--se-accent | Buttons, selected tabs and highlights. |
--se-accent-text | Text on buttons. Use #ffffff with a dark accent. |
--se-background | The tool's background. |
--se-surface | Inputs and the result area. |
--se-text | Main text. |
--se-muted | Secondary text. |
--se-border | Borders. |
--se-error | Error messages. |
--se-radius | Corner radius. 0 for square corners. |
--se-font | Font family. The tool does not inherit your page's font. |
--se-font-size | Base text size (default 14px). Everything scales with it. |
Colors you set apply in light and dark mode alike. To keep the tool in one mode, add data-theme="light" or data-theme="dark" to the placeholder.
| Part | Element |
|---|---|
container | The whole tool |
title | Heading (data-title) |
platforms, platform, platform-active | Platform buttons |
actions, action, action-active | Buttons for what to look up |
form, input, button | Search bar |
result, error, success | Result area, error message, test mode message |
Your own design (SDK)
The same script exposes ScrapeEverything.init(). It handles the captcha, sessions and user tokens, and returns the API's JSON, so you can build the form and the results in your own design. The API's answer includes a media object: platforms block their photo and video links on other sites and the links expire, so show them through client.mediaUrl(url, result.media[url]).
const client = ScrapeEverything.init({
key: "spk_live_YOUR_BROWSER_KEY",
captchaContainer: document.getElementById("captcha"), // anonymous visitors
userTokenUrl: "/api/scrapeeverything-token", // signed-in users (optional)
});
const result = await client.scrape("instagram.profile", { username: "nasa" });
if (result.success) {
// Text: textContent, never innerHTML. Photos and videos: through the media links.
name.textContent = result.data.full_name;
avatar.src = client.mediaUrl(result.data.profile_pic_url, result.media[result.data.profile_pic_url]);
} else {
showError(result.code, result.message); // KEY_IN_TEST_MODE until you go live
}- Put text on the page with
textContent, neverinnerHTML: the data comes from other websites. - Media links work only on your allowed websites, for a few hours. Each visitor and each key has a daily transfer limit;
GET /v1/browser/mediaanswersMEDIA_LINK_EXPIREDfor old links. - Please keep a small "Provided by scrapeeverything.com" link under your tool. It is optional, but it helps us a lot.
Anonymous visitors: captcha sessions
Exchange the captcha token for a session with POST /v1/browser/session, then send the session in X-Browser-Session with the key in X-Api-Key. A session is bound to the visitor's IP address, lasts 10 minutes and carries the number of requests you set per captcha.
// 1. Your captcha widget gives you a token (Turnstile shown here)
// <div class="cf-turnstile" data-sitekey="YOUR_SITE_KEY" data-callback="onCaptcha"></div>
async function onCaptcha(token) {
const res = await fetch("https://api.scrapeeverything.com/v1/browser/session", {
method: "POST",
headers: { "Content-Type": "application/json", "X-Api-Key": KEY },
body: JSON.stringify({ token }),
});
const json = await res.json();
if (json.success) session = json.data.session_token; // + expires_in, max_requests
else turnstile.reset();
}
// 2. Call an endpoint with the session
const res = await fetch("https://api.scrapeeverything.com/v1/instagram/profile", {
method: "POST",
headers: { "Content-Type": "application/json", "X-Api-Key": KEY, "X-Browser-Session": session },
body: JSON.stringify({ username: "nasa" }),
});
// BROWSER_SESSION_INVALID: the session expired or ran out of requests; solve the captcha again- We verify the token with your captcha secret and check that it was solved on one of your allowed websites. For reCAPTCHA v3, the action must be
scrapeand the score must meet your minimum. - Limits for anonymous visitors apply per IP address (IPv6 per /56).
Which domains go where
- In your captcha (Cloudflare Turnstile or Google reCAPTCHA): your own website's domain, such as
example.com. It also coverswww.example.comand other subdomains. You do not need to add any of our domains. - On the browser key: every address your page opens on, exactly.
https://example.comandhttps://www.example.comare two different websites here. - Google can take up to 30 minutes to apply domain changes.
Signed-in users: signed tokens
Turn on signed-in users on the key to get a signing secret (sig_live_, shown once). Your server signs a short-lived token for each signed-in user, and the page sends it in X-User-Token. No captcha is needed, and limits apply per user.
// npm install jsonwebtoken — on YOUR server, never in the page
import jwt from "jsonwebtoken";
app.get("/api/scrapeeverything-token", requireLogin, (req, res) => {
const token = jwt.sign(
{ sub: String(req.user.id) },
process.env.SCRAPEEVERYTHING_SIGNING_SECRET,
{ algorithm: "HS256", expiresIn: "15m" }
);
res.json({ token });
});| Claim | Required | Meaning |
|---|---|---|
sub | Yes | Your user ID (1 to 128 characters). Use an internal ID, not an email address: it appears in your usage report. |
exp | Yes | Expiry as a Unix timestamp, at most 24 hours ahead. 15 minutes is a good default. |
limits | No | An object such as { "hourly": 50, "daily": 500 } that replaces the key's per-user limits for this user. |
endpoints | No | A list of endpoint keys this user may call, within the key's allowed endpoints. |
Tokens must be signed with HS256. Rotating the signing secret makes every token signed with the old one invalid at once.
Limits and spending
- Daily credit limit (required) and an optional monthly credit limit: checked in the same step that reserves credits, so they cannot be exceeded. Refunded requests do not count. We email you at 80% and 100%.
- Per-visitor (IP) and per-user hourly and daily request limits.
- Requests per captcha: how many requests one solved captcha allows (1 to 50).
- Cache (optional): serve results up to 1 to 14 days old for 0 credits. Off by default.
- All browser keys together use at most half of your account's rate limit and concurrency, so visitors can never block your own server integration.
- Unusual activity: we email you about spending spikes, surges of failed checks and single visitors making most requests. With automatic pause on, a spending spike also pauses the key.
Testing
GET /v1/browser/pingwith a session or user token checks the whole setup without spending credits. It works in test mode.GET /v1/browser/configreturns the key's public settings (captcha provider and site key, allowed endpoints and their parameters). The SDK uses it.- The key's page in the dashboard lists recent checks with the reason each one failed. Visitors only see a generic error.
Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | INVALID_API_KEY | The browser key is unknown or revoked. |
| 403 | ORIGIN_REQUIRED | The request did not come from a browser page. |
| 403 | ORIGIN_NOT_ALLOWED | The page's website is not on the key. |
| 403 | KEY_IN_TEST_MODE | The key is not live yet. |
| 403 | KEY_PAUSED | The key was paused, by you or automatically. |
| 403 | ENDPOINT_NOT_ALLOWED | The endpoint is not allowed on the key, or not in the user token's endpoints. |
| 401 | CAPTCHA_FAILED | The captcha could not be verified. Solve it again. |
| 503 | CAPTCHA_UNAVAILABLE | The captcha provider could not be reached, or the key's captcha secret was rejected. |
| 403 | CAPTCHA_NOT_CONFIGURED | The key only accepts signed user tokens. |
| 401 | BROWSER_SESSION_INVALID | The session expired, ran out of requests or was opened from another IP address. |
| 401 | USER_TOKEN_EXPIRED | Get a new token from your server. |
| 401 | USER_TOKEN_INVALID | Wrong signature, algorithm or claims. |
| 403 | USER_TOKENS_DISABLED | Signed-in users are turned off on the key. |
| 429 | VISITOR_LIMIT | The visitor or user reached their hourly or daily limit. |
| 429 | KEY_SPEND_LIMIT | The key reached its daily or monthly credit limit. Nothing is charged. |
| 403 | BROWSER_KEY_NOT_ALLOWED | Browser keys cannot call account endpoints such as /v1/account. |
Responses to browser keys never include your credit balance. Other errors are the same as with server keys: see Errors.