Scan your whole stack
From OX Research Newsroom
Are you using @fetchbrain.com/sdk?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.8.0
@fetchbrain.com/sdk was last scanned on 24 Nov 2026 at version 0.8.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.8.0 LATEST | 24 Nov 2026 | No rules fired |
| 0.7.1 | 24 Nov 2026 | No rules fired |
| 0.7.0 | 23 Nov 2026 | No rules fired |
| 0.6.0 | 22 Nov 2026 | Not shown |
| 0.5.1 | 22 Nov 2026 | Not shown |
Findings for v0.8.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.8.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Never pay twice for the same page.
Your scraper learns a page once; within your memory depth, later runs recall it — and known pages you add with crawler.addRequests() skip the fetch.
Quick start · How it works · Docs · Examples · Changelog
Every scraping run re-fetches thousands of pages you already scraped last time — paying for proxies, browsers, retries, and CAPTCHAs to learn things you already know.
FetchBrain gives your scrapers a memory, private to your account. Before each request, a
crawler asks "do I already know this request?" — known requests come back
from memory (those you add with crawler.addRequests() skip the fetch entirely); unknown ones run
normally and are learned. Memory grows run after run, and ask() answers
plain-English questions from what you've learned — a data asset that
compounds instead of costs. Learning is never billed.
$ node scraper.js # first run — the brain learns
INFO FetchBrain: 🧠 Finished! recalled: 0/3 (0.0%), learned: 3, scraped: 3, duration: 6.4s
$ node scraper.js # every run after that
INFO FetchBrain: Recalled: https://example.com/p/1042 [default]
INFO FetchBrain: Recalled: https://example.com/p/1043 [default]
INFO FetchBrain: Recalled: https://example.com/p/1044 [default]
INFO FetchBrain: 🧠 Finished! recalled: 3/3 (100.0%), learned: 0, scraped: 0, duration: 0.3s
// scraper.mjs — run this twice and watch the second run skip the fetch
import { CheerioCrawler } from "crawlee";
import { FetchBrain } from "@fetchbrain.com/sdk";
const crawler = new CheerioCrawler({
async requestHandler({ request, $, pushData }) {
await pushData({ url: request.url, title: $("title").text() });
},
});
FetchBrain.enhance(crawler, { apiKey: process.env.FETCHBRAIN_API_KEY });
await crawler.run(["https://example.com/"]);
// Run 1: your scraper fetches the page and teaches your brain
// Run 2: recalled from memory, no HTTP request to example.com
FetchBrain wraps your existing Crawlee crawler — no rewrites, no new framework, no pipeline changes:
+ import { FetchBrain } from "@fetchbrain.com/sdk";
import { CheerioCrawler } from "crawlee";
- const crawler = new CheerioCrawler({
+ const crawler = FetchBrain.enhance(new CheerioCrawler({
requestHandler: async ({ $, pushData }) => {
await pushData({ title: $("h1").text(), price: $(".price").text() });
},
- });
+ }), { apiKey: process.env.FETCHBRAIN_API_KEY });
await crawler.run(urls);
That's it. Your handler only runs when there's something new to learn.
| Without | With FetchBrain | |
|---|---|---|
| Repeat requests | Full fetch, every run | Recalled from memory |
| Proxy & compute spend | Pay per fetch, every run | Pay only for what it knows |
| Blocks & CAPTCHAs | Every run risks them | Pre-recalled known requests skip the fetch |
| When the service is down | — | Your crawl runs normally (circuit breaker, 1.5s timeout) |
| Testing | Mock it yourself | MockFetchBrain ships in the box |
AdaptivePlaywrightCrawler is not supported yet)FetchBrain pays off wherever a scraper makes the same expensive request more than once — across runs, scheduled jobs, or the users it serves. It won't speed up a first-ever fetch of a brand-new URL, and it's not for freshness-critical monitoring where you always need the live value. Everywhere else, it compounds:
Data-service teams & aggregators — each scraper fetches an expensive
request once and recalls it on later runs within your memory depth, so per-run proxy and compute
cost falls as coverage grows — and ask() turns what they've collected into
memory you can ask questions of, with no warehouse to run.
Product teams & AI agents — apps and browsing agents that re-hit the same
requests get them back straight from memory: known pages you add with
crawler.addRequests() skip the fetch, so they cost no proxy traffic. The more often a scraper revisits the same requests, the more
its memory pays off.
Recurring crawls of stable data — catalogs, specs, listings, company and
reference data barely change between runs, so recall skips the fetch and each
scheduled run costs less. Keep volatile fields on memory: "fresh" so you
never trade accuracy for speed.
Solo scraper developers — start free: learning is never billed, and the requests you've already made come back from memory instead of getting blocked or throttled. One line to add, one brain that grows with everything you scrape.
npm install @fetchbrain.com/sdk
import { FetchBrain } from "@fetchbrain.com/sdk";
import { CheerioCrawler } from "crawlee";
const crawler = FetchBrain.enhance(
new CheerioCrawler({
requestHandler: async ({ $, pushData }) => {
// Runs only when the brain needs to learn (new request)
await pushData({
title: $("h1").text(),
price: $(".price").text(),
});
},
}),
{
apiKey: process.env.FETCHBRAIN_API_KEY,
memory: "recent", // how far back the brain recalls (see below)
},
);
await crawler.run(urls);
Your crawler ──▶ FetchBrain ──▶ knows this request? ──▶ YES ──▶ data from memory (pre-recalled requests skip the fetch)
│
└──▶ NO ──▶ your handler runs ──▶ brain learns, free
Memory is always private to your account. Within it, scoping depends on where the scraper runs (details): on Apify each actor has its own memory; everywhere else, scrapers share one default memory unless you name them.
How old is too old? You decide, per crawler:
| Depth | Window | Use for |
|---|---|---|
fresh |
1 hour | prices, stock, anything volatile |
recent |
24 hours | default — daily crawl cycles |
standard |
7 days | listings, catalogs |
deep |
30 days | slow-changing reference data |
With the default alwaysRun: false, known requests skip your handler
entirely. Set alwaysRun (see below) and
context.brain puts the recall decision in your hands:
import { FetchBrain, type FetchBrainContext } from "@fetchbrain.com/sdk";
import { CheerioCrawler } from "crawlee";
const crawler = FetchBrain.enhance(
new CheerioCrawler({
requestHandler: async (context) => {
const { $, pushData } = context;
// Crawlee's context types don't declare `brain`; FetchBrainContext describes it
const brain = (context as { brain?: FetchBrainContext }).brain;
if (brain?.known) {
// Option 1: push the remembered data and skip scraping
await brain.use();
return;
}
await pushData({ title: $("h1").text() }); // scrape + learn
},
}),
{ apiKey: process.env.FETCHBRAIN_API_KEY, alwaysRun: true },
);
Or compare what the brain remembers with what the page says now:
requestHandler: async (context) => {
const { $, pushData } = context;
const brain = (context as { brain?: FetchBrainContext }).brain;
const scraped = { title: $("h1").text() };
if (brain?.known) {
console.log("Remembered:", brain.data, "Scraped:", scraped);
}
await pushData(scraped); // learned only if the request was unknown
},
context.brain properties| Property | Type | Description |
|---|---|---|
known |
boolean |
whether the brain knows this request |
data |
object |
the remembered data (if known) |
use() |
function |
push the remembered data and skip scraping |
interface FetchBrainConfig {
// Required
apiKey: string;
// Optional
scraper?: string; // Name this scraper so it gets its own memory (or set FETCHBRAIN_SCRAPER_ID)
baseUrl?: string; // API URL (default: https://api.fetchbrain.com)
memory?: MemoryDepth; // How far back the brain recalls (default: "recent")
learning?: boolean; // Teach the brain from scraped data (default: true)
alwaysRun?: boolean | string | string[]; // Handlers that still run when a request is known (default: false)
skipLabels?: string[]; // Labels that bypass FetchBrain entirely (default: none)
preRecall?: boolean; // Recall requests in bulk as they're enqueued (default: true)
onRecalled?: (event: RecalledEvent) => void | Promise<void>; // Per-record hook when recalled data is delivered
extractForLearning?: (data: unknown) => Record<string, unknown>; // Transform each record before it is learned
refreshOnRebuild?: boolean; // Scope learn, recall and ask to the current build (*_BUILD_ID env var) (default: false)
timeout?: number; // Handler-time recall, stats and telemetry timeout in ms (default: 1500)
batch?: { maxSize?: number; maxWait?: number }; // Request batching (default: 50 items / 50ms)
circuitBreaker?: {
failureThreshold?: number; // Failures before the circuit opens (default: 3)
resetTimeout?: number; // ms before a retry is allowed (default: 30000)
successThreshold?: number; // Successes to close it again (default: 1)
};
telemetry?: TelemetryConfig; // Opt-in telemetry (default: { enabled: false })
changeDetection?: { enabled?: boolean; ignoreFields?: string[] }; // Relearn known alwaysRun pages and report changes (default: off)
reportRuns?: boolean; // Send the end-of-run report: run id, timestamps, counts per label (default: true)
learnUrlField?: string; // Accepted but not currently applied
debug?: boolean; // Enable debug logging (default: false)
}
scraper)Memory is private to your account. Outside Apify, every scraper on the account shares one default memory unless you name it:
FetchBrain.enhance(crawler, { apiKey, scraper: "shop-a" });
// or, with no code change: FETCHBRAIN_SCRAPER_ID=shop-a node crawl.js
shop-a and
shop-b never see each other's pages.., _ and -, up to 64 characters,
and must start with a letter or digit. Uppercase is lowercased. An invalid
name is ignored with a warning: an invalid scraper option falls back to
FETCHBRAIN_SCRAPER_ID if that is valid, otherwise the scraper keeps using
the default memory.scraper option wins over the environment variable; an empty one
doesn't hide it. SDK 0.3.0 and later
also forward FETCHBRAIN_SCRAPER_ID, but before this release only on a
best-effort basis: many other *_ID variables can push it out of the
header. Upgrade to guarantee delivery.preRecall)In HttpCrawler/CheerioCrawler, Crawlee performs the HTTP request before
your request handler runs — so a recall inside the handler is too late to
save the fetch. With preRecall (on by default), the SDK checks the brain
the moment requests enter the queue: each crawler.addRequests() array
becomes a single bulk recall, known requests are enqueued with Crawlee's
skipNavigation so they're skipped before they're fetched, and unknown requests carry
their recall result with them so the handler doesn't ask twice. Enqueue in
batches (one addRequests call per page of discovered items) to get the
most out of it. If the brain is unreachable, requests are enqueued unchanged
and your crawl proceeds at native speed — same graceful degradation as
everywhere else.
Things to know:
Scope — pre-recall applies to arrays passed to crawler.addRequests()
or crawler.run(requests). Crawlee's context-level enqueueLinks() and
context addRequests() reach the queue by other paths and are not
pre-recalled (they still get handler-time recall, but the fetch has
already happened). Inside a handler, enqueue follow-ups through the
crawler to keep the benefit:
requestHandler: async ({ $, request, crawler }) => {
const urls = $("a.product")
.map((_, a) => new URL($(a).attr("href") ?? "", request.url).href)
.get();
await crawler.addRequests(urls.map((url) => ({ url, label: "product" })));
},
Metering — known recalls are counted at enqueue time, so a known duplicate that the queue later drops still counts.
Snapshot semantics — the recall result is as of enqueue time. Anything learned between enqueue and execution isn't picked up; the request is simply scraped and re-learned.
Expired memory — if a request skipped its fetch at enqueue but its
remembered data genuinely expired before it executed (e.g. across a process
restart), it fails once without retries and lands in your
failedRequestHandler, so the missing record is visible to your error
tooling. It will be re-scraped on a future run. (If the data merely couldn't
be restored because the API was briefly unreachable, the request fails
retryable and the next attempt restores it.)
retryOnBlocked crawlers — Crawlee's blocked-request detection needs a
fetched response, so on these crawlers known requests keep their fetch;
recalled data still replaces the handler (no second recall, no re-scrape).
onRecalled)Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.