#210·open-seo

Rank tracking: pluggable SERP provider, so self-hosters can cut the per-check cost

Author: SantoferCreated Aug 9, 2026Updated Sep 23, 2026

The gap

Every SERP call goes through DataForSEO. src/server/lib/dataforseo/serp.ts is reached directly from the rank-check path, so there's no seam where a self-hoster could substitute something else.

That's the right default — DataForSEO is reliable, handles locations properly, and needs no scraping infrastructure. But it makes daily tracking of a large keyword set expensive, and cost is the main thing that stops self-hosters from tracking as often as they'd like. A 200-keyword tracker on both devices, checked daily, adds up quickly.

For comparison, SerpBear's one genuine architectural advantage over OpenSEO is that its scraper is pluggable — ScrapingRobot / ScrapingAnt / SerpApi / a custom endpoint / your own proxy — so the per-check cost can approach zero if you bring your own infrastructure.

Proposed shape

A narrow provider interface for one operation only — "given a keyword, location, language and device, return ranked URLs" — with DataForSEO as the default implementation and no behaviour change unless a self-hoster opts in.

SERP_PROVIDER=dataforseo        # default, current behaviour
SERP_PROVIDER=custom
SERP_PROVIDER_URL=https://...   # returns a normalized result

Deliberately limited to rank checking. Keyword metrics, backlinks, domain overview and local SERP stay DataForSEO-only — they're not commodity data and abstracting them would be a large interface for little gain.

Why the interface has to stay small

The temptation is a general "SERP source" abstraction. I'd argue against it:

  • Rank checking needs position + URL, nothing else. That's a tiny contract that anything can satisfy.
  • Everything else DataForSEO returns (volume, difficulty, CPC, backlink graph) has no equivalent from a scraper, so an abstraction covering it would be mostly holes.

Keeping it to one method means the default path is unchanged and the risk is contained to opt-in configurations.

Things worth deciding

  1. Credit accounting. estimateRankCheckCredits and the billing gate assume DataForSEO pricing. With a custom provider there is no OpenSEO credit cost — the estimate should presumably report zero and the paid-plan gate shouldn't apply. Worth confirming that's acceptable in hosted mode, or whether this should be self-host-only outright (which I'd understand).
  2. Trust boundary. SERP_PROVIDER_URL is operator-configured rather than user-supplied, which is a much safer position than a user-entered webhook — but it's still an outbound call to an arbitrary host, and the response needs strict schema validation before it reaches the rank pipeline.
  3. Honesty about the source. A run backed by a custom provider should record that, so a user comparing history across a provider switch can see why numbers moved.

Happy to build this behind the default, with the DataForSEO path untouched and tests covering both. Question 1 is the one I'd want settled first, since it decides whether this is a hosted feature at all.