Scrape Everything
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 livesYour backend onlyYour public web page
Secret?Yes. Refused from browsers with SECRET_KEY_IN_BROWSERNo. Safe to publish
Who calls the APIYour serverYour visitors' browsers
ProtectionSecrecy, optional IP allowlistAllowed websites, your captcha or signed user tokens, endpoint list, per-visitor limits, credit caps
EndpointsAllOnly 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

  1. 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.
  2. 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.
  3. 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.

HTML
<!-- 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>
AttributeWhereMeaning
data-keyscriptYour browser key.
data-user-token-urlscriptOptional. A URL on your site that returns { "token": "..." } for signed-in users.
data-scrapeeverythingplaceholderEmpty: every endpoint on the key. A platform such as instagram, one endpoint such as instagram.profile, or several separated by commas.
data-titleplaceholderHeading above the tool.
data-buttonplaceholderButton text. Default: Look up.
data-themeplaceholderlight or dark. Default: follows the visitor's system.
data-accentplaceholderButton color as a hex value, for example #f97316. The --se-accent CSS variable overrides it.
data-paramsplaceholderFixed extra parameters as JSON, for example {"limit": 20}.
data-ui="basic"script or placeholderA 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.

If your site sends a Content-Security-Policy, allow 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().

CSS
[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;
}
VariableChanges
--se-accentButtons, selected tabs and highlights.
--se-accent-textText on buttons. Use #ffffff with a dark accent.
--se-backgroundThe tool's background.
--se-surfaceInputs and the result area.
--se-textMain text.
--se-mutedSecondary text.
--se-borderBorders.
--se-errorError messages.
--se-radiusCorner radius. 0 for square corners.
--se-fontFont family. The tool does not inherit your page's font.
--se-font-sizeBase 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.

PartElement
containerThe whole tool
titleHeading (data-title)
platforms, platform, platform-activePlatform buttons
actions, action, action-activeButtons for what to look up
form, input, buttonSearch bar
result, error, successResult 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]).

JavaScript
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
}

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.

JavaScript
// 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

Which domains go where

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 });
});
ClaimRequiredMeaning
subYesYour user ID (1 to 128 characters). Use an internal ID, not an email address: it appears in your usage report.
expYesExpiry as a Unix timestamp, at most 24 hours ahead. 15 minutes is a good default.
limitsNoAn object such as { "hourly": 50, "daily": 500 } that replaces the key's per-user limits for this user.
endpointsNoA 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

A captcha makes misuse expensive, not impossible: captcha-solving services and automated browsers exist, and anyone can use your free tool the way your visitors do. Your credit limits and per-visitor limits are what cap your costs, so set them to an amount you are comfortable paying.

Testing

Errors

StatusCodeMeaning
401INVALID_API_KEYThe browser key is unknown or revoked.
403ORIGIN_REQUIREDThe request did not come from a browser page.
403ORIGIN_NOT_ALLOWEDThe page's website is not on the key.
403KEY_IN_TEST_MODEThe key is not live yet.
403KEY_PAUSEDThe key was paused, by you or automatically.
403ENDPOINT_NOT_ALLOWEDThe endpoint is not allowed on the key, or not in the user token's endpoints.
401CAPTCHA_FAILEDThe captcha could not be verified. Solve it again.
503CAPTCHA_UNAVAILABLEThe captcha provider could not be reached, or the key's captcha secret was rejected.
403CAPTCHA_NOT_CONFIGUREDThe key only accepts signed user tokens.
401BROWSER_SESSION_INVALIDThe session expired, ran out of requests or was opened from another IP address.
401USER_TOKEN_EXPIREDGet a new token from your server.
401USER_TOKEN_INVALIDWrong signature, algorithm or claims.
403USER_TOKENS_DISABLEDSigned-in users are turned off on the key.
429VISITOR_LIMITThe visitor or user reached their hourly or daily limit.
429KEY_SPEND_LIMITThe key reached its daily or monthly credit limit. Nothing is charged.
403BROWSER_KEY_NOT_ALLOWEDBrowser 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.