Scwrap is one place to write, deploy and operate scrapers. Every Scraper has the same shape, so adding one is cheap. Every Scraper runs under the same checks and storage, so operating many is cheap. People and AI agents write them the same way.
The shape of a Scraper
A Definition says what a Scraper takes, what it returns and how it can fail. An Implementation is ordinary Effect code, and its requirement type is the list of Capabilities it needs. A Release provides those Capabilities. The instance checks every item against the Definition before storing it.
One Definition can have several Implementations, such as an official API and a browser scrape. A Release uses one. A consumer that wants a second source when the first fails composes Scrapers itself.
Principles
- Native Effect first. Use
effect/rpc,effect/persistence,effect/ai,effect/cli, Workflow,ScheduleandSchema.TaggedErrorbefore writing an abstraction. Scwrap builds only what Effect and its ecosystem lack: theProxiedHttpClient,BrowserandTextCaptchaSolverports, their providers, and the instance runtime. - Everything is pluggable. Storage and execution stay out of Scraper packages. The domain SDK is platform-neutral, so a Scraper runs the same in a test, a script or an instance.
- Everything is declared. An instance's infrastructure is the
ScwrapInstanceStack. Its Scrapers are the Releases of the catalogs deployed to it, one catalog module per repository. - Failures are typed. Each Scraper declares its errors. Shared errors are the ones a caller can react to: retry on
RateLimited, stop onBlocked, repair onSchemaDrift.
Non-goals
These are decisions, not gaps. Scwrap will not grow them.
- No scheduling. Scwrap never starts a Run by itself: it has no cron, timetables or triggers, and never will. A Run starts only when a caller starts it. To run a Scraper on a timetable, start its Runs from a scheduler outside Scwrap, such as a GitHub Actions cron or a Cloudflare Cron Trigger; Scheduling Runs shows both.
- No completion webhooks. An instance never calls back when a Run ends. Starting a Run answers with its
resultIdat once; the caller reads the record until it is no longerrunningwithGET /results/<resultId>, or lists a Scraper's Runs withGET /scrapers/<id>/runs. The scheduler that starts your Runs can check them (Scheduling Runs). - Not hosted. Scwrap is software you deploy, not a service: every instance runs in its owner's Cloudflare account, and the owner decides which repositories deploy to it.
- No pricing and no fallback. Scrapers are the whole model. Nothing sells, meters or silently swaps one source for another.
Next
- Close the instance's known gaps, starting with those under Security.
- Operations on top of Runs: Canaries that detect breakage before callers do, Incidents from failure patterns, and Repair tasks handed to agents.