SerpBear

Self-hosted keyword rank tracker with Google Search Console integration, multi-provider SERP scraping, and a built-in REST API.

1.8Kstars
248forks
MIT License
TypeScript

SerpBear is an open-source search engine position tracker built for SEO professionals, marketers, and website owners who want accurate keyword ranking data without paying for expensive SaaS subscriptions. It combines direct scraping of Google Search results with official integrations for Google Search Console and Google Ads, giving you real visit counts, impressions, and search volume alongside SERP positions in a single self-hosted dashboard.

The application runs as a Next.js full-stack app with SQLite, deployed via Docker or directly from source on platforms like Fly.io or mogenius.com at no cost. It supports over ten SERP scraping providers including serper.dev, SerpAPI, SearchApi.io, HasData, and CrazySerp, plus raw HTTP proxy configurations, so you can control the cost and reliability of your scraping pipeline independently of the tracker itself.

SerpBear ships with a built-in REST API that exposes all tracked keyword data, enabling integration with marketing dashboards, BI tools, or custom automation pipelines. Daily, weekly, and monthly email alerts notify you of position changes via any SMTP provider. A Progressive Web App interface makes monitoring accessible from mobile devices.

With v3.0 the project addressed Google’s 2025 deprecation of the num=100 SERP parameter by introducing dynamic scraping strategies that adapt to 10-results-per-page pagination, maintaining tracking accuracy without requiring manual reconfiguration.

What You Get

  • Unlimited Domain and Keyword Tracking - Add as many domains and keywords as you need with no artificial caps, storing all historical position data locally in your own SQLite database.
  • Pluggable Multi-Provider SERP Scraping - Switch between eleven scraping backends (serper.dev, SerpAPI, SearchApi.io, HasData, CrazySerp, ValueSerp, ScrapingRobot, and others) or route through your own proxy IPs without changing any application code.
  • Google Search Console Integration - Connect your GSC account to overlay real visit counts, impressions, and click-through rates on each tracked keyword, bridging the gap between rank position and actual organic traffic.
  • Google Ads Keyword Research - Link a Google Ads test account to auto-generate keyword ideas from your tracked domains and fetch monthly search volume data directly in the SerpBear interface.
  • Smart Scraping Strategies - Choose Basic (page 1 only), Custom (fixed pages), or Smart mode, which adaptively fetches SERP pages around each keyword’s last known position to handle Google’s 10-results-per-page limit efficiently.
  • Built-in REST API - Expose all keyword ranking data through a built-in API endpoint for feeding marketing dashboards, Power BI reports, custom scripts, or third-party automation tools.
  • Email Notifications - Receive configurable daily, weekly, or monthly alerts on keyword position changes via any SMTP provider, with built-in support for free tiers of ElasticEmail and Sendpulse.
  • CSV Export and PWA Mobile App - Export all tracked keyword data including positions, impressions, and volume to CSV, and install SerpBear as a Progressive Web App on mobile for on-the-go monitoring.

Common Use Cases

  • Running an SEO agency - An agency self-hosts SerpBear to track hundreds of keywords across dozens of client domains, uses the REST API to pipe ranking data into client-facing dashboards, and exports CSVs for monthly reports—all without per-seat or per-keyword SaaS fees.
  • E-commerce product page optimization - A store owner tracks product and category keywords, integrates Google Search Console to see which pages drive actual clicks, and identifies underperforming high-impression keywords to prioritize for on-page optimization.
  • Content marketing team keyword planning - A content team connects Google Ads to discover keyword ideas and search volumes from their existing tracked domains, then prioritizes new blog topics based on real data rather than third-party estimates.
  • Building a custom SEO reporting pipeline - A marketing engineer queries SerpBear’s REST API to pull daily rank snapshots into a data warehouse, combining position history with conversion data from analytics for executive-level SEO reporting.

Under The Hood

Architecture SerpBear uses a hybrid Next.js architecture where API routes handle both CRUD operations and act as a gateway to background tasks, while a separate cron.js Node.js process drives scheduled keyword refreshes by making HTTP calls back to those same API routes. This self-calling pattern ties the background job to the running HTTP server rather than isolating it as an independent worker, which means the cron and server must always co-run. Database access happens directly from API handlers via Sequelize models without an intermediate repository layer, creating tight coupling between HTTP request handling and data persistence. The scraper layer is the cleanest abstraction — each provider implements a common interface in a dedicated file, enabling pluggable swapping — but business logic otherwise bleeds between API handlers, utility functions, and React hooks without clear domain boundaries.

Tech Stack SerpBear is built on Next.js 12 with TypeScript and React 18, persisting data in SQLite through Sequelize ORM with sequelize-typescript decorators. Background scheduling runs via croner inside a separate Node.js process, with both processes started together using concurrently. Google integrations use the official @googleapis/searchconsole SDK and the Google Ads API. SERP scraping uses axios with axios-retry for HTTP requests and cheerio for HTML parsing, with proxy routing via https-proxy-agent. The frontend uses React Query v3 for data fetching, Chart.js with react-chartjs-2 for SERP position trend charts, and Tailwind CSS v3 for styling. Secrets including scraping API keys are encrypted at rest using cryptr. Docker deployment uses a multi-stage Alpine build producing a slim production image.

Code Quality The test suite uses Jest with React Testing Library, MSW for API mocking, jest-fetch-mock, and next-router-mock, covering key UI components, hooks, and page-level interactions with realistic prop fixtures. TypeScript is used throughout the application code with explicit types centralized in a global declaration file. ESLint is configured with airbnb-base rules alongside Next.js defaults, and Prettier handles formatting. Error handling is inconsistent — API handlers in some routes have explicit try/catch blocks with console logging, while others lack structured error boundaries and the cron.js remains in CommonJS without TypeScript coverage. A Docker publish workflow exists in CI but there is no automated test pipeline, meaning tests must be run manually.

What Makes It Unique SerpBear’s most practical technical innovation is its pluggable multi-provider scraper architecture, where each of the eleven supported SERP data sources implements a shared interface, letting users switch providers via settings without code changes. The Smart scraping strategy — which adaptively fetches SERP pages centered around each keyword’s last known position — is a domain-specific optimization that directly addresses Google’s 10-results-per-page pagination constraint introduced after the num=100 parameter was deprecated. The integration of Google Search Console impressions and click data alongside scraped SERP positions into a unified keyword view is a practical differentiation from tools that rely solely on scraping, giving self-hosters access to ground-truth traffic data that commercial trackers charge a premium to combine.

Self-Hosting

SerpBear is released under the MIT License, which is a permissive open-source license. You can use it commercially, modify the source, redistribute it, and incorporate it into proprietary systems without any copyleft obligations. There are no usage restrictions, no open-core provisions, and no license keys required to run any feature — the entire codebase is available under the same terms.

Running SerpBear yourself means taking on the full operational responsibility: deploying and maintaining the Docker container, managing the SQLite database file and its backups, keeping the Node.js runtime and dependencies updated, and monitoring for scraping provider outages or API key expiration. The application has no built-in high-availability or clustering support — it is designed as a single-instance deployment. Because it depends on third-party SERP scraping services or proxy IPs for data collection, you also need to manage those provider accounts, billing, and rate limits independently.

There is no hosted or cloud version of SerpBear, so there is no managed upgrade path, SLA, or vendor support channel. Community support happens through GitHub Issues. If a scraping provider stops working (as has happened with ScrapingRobot, ScrapingAnt, and SpaceSerp), you need to reconfigure to a working provider yourself. For teams that need multi-user access, role-based permissions, audit logs, or guaranteed uptime, SerpBear would require additional infrastructure work — it is single-user by design and built for the technically comfortable self-hoster who prefers control over convenience.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search