Skip to main content

Web Scraping for SEO: Keyword Research, Competitor Analysis, and SERP Tracking (2026)

· 8 min read
Yassine El Haddad
Software Developer & Automation Specialist

I build production AI agents, web scrapers, and automation pipelines. Most of what I publish here comes from the actual problems they run into: proxies that get banned, anti-bot stacks that fingerprint your client, RAG that drifts when the underlying data moves. Stack: Python, TypeScript, Go, FastAPI, LangChain, Crawlee, Playwright, deployed on AWS, GCP, and Cloudflare.

SEO in 2026 demands data: SERP positions, competitor content inventories, backlink profiles, structured data health, and content gaps. Manual tracking doesn't scale. Web scraping automates it — run Apify Actors on schedule, store in a time-series database, export to Google Sheets or Looker Studio for stakeholder reporting. This guide covers five core SEO use cases and the tools to implement them.

Five SEO Use Cases for Web Scraping

Use CaseWhat You ScrapeOutputFrequency
SERP rank trackingGoogle SERPs for target keywordsPosition, URL, title, snippet per keywordDaily
Competitor content inventoryCompetitor domain, all indexable pagesURL, title, meta, word count, H1Weekly
Backlink discoveryBacklink tools + custom scrapingReferring domains, anchor text, DAWeekly
Structured data auditYour site, all pagesJSON-LD presence, schema validityMonthly
Content gap analysisSERPs + competitor contentKeywords you don't rank for, competitor doesWeekly

For an overview of Apify's SEO capabilities, see Apify for SEO.

SERP Rank Tracking

Track target keywords daily. Store positions in a time-series database (PostgreSQL, BigQuery). Visualize trends in Grafana, Metabase, or Looker Studio.

Implementation:

  • Use Google Search Scraper from the Apify Store.
  • Input: list of keywords, target country, language, max results per query.
  • Output: position, URL, title, snippet for each organic result.
  • Store schema: (keyword, url, position, title, scraped_at).
  • Run on schedule (e.g., daily at 9 AM). Compare to yesterday for rank change alerts.

Export to Sheets: Apify has built-in Google Sheets integration. Map dataset columns to sheet columns. Stakeholders get auto-refreshing rank reports without code.

Competitor Content Inventory

Crawl a competitor's site to extract all indexable URLs, titles, meta descriptions, and word counts. Use this for content gap analysis and structural benchmarking.

Implementation:

  • Website Content Crawler: passes start URL, follows links, extracts text and metadata.
  • Output: URL, title, meta description, H1, word count, links.
  • Store in competitor_pages(competitor_id, url, title, meta, word_count, scraped_at).
  • Compare to your site: which pages do they have that you don't? Which keywords are they targeting in titles?

Run weekly. Large sites may need maxRequestsPerCrawl tuning to stay within budget.

Combine third-party backlink exports (Moz, Ahrefs) with custom scraping for link discovery.

Implementation:

  • Export supplement: Moz and Ahrefs offer CSV exports. Scrape the export UI if no API, or use their APIs if subscribed.
  • Custom link discovery: Use a crawler that follows outbound links from competitor pages. Or scrape SERP results for "keyword" + "link:competitor.com" style queries (limited by Google's cap).
  • Store: referring URL, anchor text, target URL, domain authority (if available).
  • Build report: top referring domains, anchor text distribution, new vs lost links.

Structured Data Audit

Crawl your own site. Extract all JSON-LD blocks. Validate against schema.org. Flag missing or invalid markup.

Implementation:

  • Custom Cheerio Actor: crawl site, on each page extract <script type="application/ld+json"> content.
  • Parse JSON. Check @type (Product, Article, Organization, etc.). Validate required fields per type.
  • Store: (url, schema_type, valid, errors, scraped_at).
  • Dashboard: % of pages with valid schema, pages missing Organization, Product pages without price.

Content Gap Analysis

Compare your keyword rankings vs a competitor's. Identify terms they rank for (position 1–20) where you don't rank in top 50. These are content opportunities.

Implementation:

  1. Run SERP tracking for a broad keyword set (500–2000 terms).
  2. For each keyword, record: your position, competitor positions (if any).
  3. Filter: keywords where competitor is top 10, you are unranked or >50.
  4. Score by search volume and difficulty (from keyword tools or estimated).
  5. Output: prioritized list of content ideas.

Use Apify for SEO workflows: Google Search Scraper → dataset → dbt or Python script for gap logic.

Technical SEO Crawl

Technical SEO issues (missing meta, broken links, duplicate content) hurt rankings and CTR. Automated crawls surface these problems before they accumulate. Detect missing meta descriptions, duplicate titles, broken links, and slow pages. Use a crawler that collects:

  • Meta description (length, missing)
  • Title tag (length, duplicates)
  • Status codes (4xx, 5xx)
  • Internal links (broken check)
  • Core Web Vitals (if available via API or Lighthouse)

Implementation:

  • Website Content Crawler with custom extraction, or build a Cheerio Actor that fetches each URL and validates.
  • Store issues in a table. Dashboard: count of broken links, pages with missing meta, duplicate titles.

Tools Comparison

ToolBest ForProsCons
Apify Google Search ScraperSERP rank trackingManaged, scheduled, Sheets exportPer-run cost, proxy needed for some regions
Apify Website Content CrawlerCompetitor crawl, site auditFull crawl, metadata extractionCan be slow on large sites
Custom Cheerio ActorTechnical audit, JSON-LDFull control, lightweightRequires dev work
Third-party rank trackersTurnkey rank trackingNo scraping, stable dataExpensive, limited customization

Recommendation: Use Apify for flexibility and automation. See web scraping architecture patterns for production design.

Exporting to Sheets and Looker Studio

Google Sheets: Apify Integrations → Google Sheets. Map dataset columns. Choose append or replace. Runs refresh when Actor runs. Useful for weekly rank reports to stakeholders who prefer spreadsheets. Add simple charts (line graphs for rank over time) for quick wins.

Looker Studio: Connect to a data source (e.g., BigQuery) that you populate via webhook. Or use Apify → Make.com → BigQuery → Looker Studio for a full pipeline. Looker Studio handles large datasets and cross-source joins (e.g., SERP data + Google Analytics) better than Sheets. Set up scheduled refresh to match your scraping cadence.

Apify webhooks can trigger Make.com or n8n when a run completes. Your flow fetches the dataset, transforms, and writes to Sheets or a data warehouse. Add error handling: retry on 5xx, alert if run fails.

Apify Affiliate Banner 728x90Apify Affiliate Banner 728x90Apify Affiliate Banner 300x50Apify Affiliate Banner 300x50
Start with SERP tracking

SERP rank tracking delivers immediate ROI. Pick 20–50 target keywords, run Google Search Scraper daily for two weeks, then add a simple chart. Expand to competitor content and content gap once the pipeline is stable.



Try Apify for SEO | Google Search Scraper

Frequently Asked Questions

Scraped SERPs reflect the proxy location and time. Personalization, A/B tests, and geo vary. Use consistent proxy location and run time. Average over multiple runs for stability. For enterprise-grade accuracy, consider official rank tracking APIs.

Google actively blocks scrapers. Use residential proxies, low concurrency, and request throttling. Apify's Google Search Scraper handles many of these concerns. Some regions require geo-specific residential IPs.

Apify's Website Content Crawler crawls full sites and extracts URLs, titles, meta, and content. For very large sites, use maxRequestsPerCrawl to limit scope. Export to Sheets or DB for analysis.

Schedule Apify Actors (daily/weekly). Use webhooks to trigger downstream flows. Push data to Google Sheets, BigQuery, or Metabase. Build dashboards that refresh on schedule. See Apify webhooks guide for payload handling.

Scraping publicly accessible SERP data and competitor pages for internal analysis is widely practiced. ToS of Google and target sites often prohibit it; enforcement targets commercial redistribution. Consult legal counsel for your use case and jurisdiction.

Common mistakes and fixes

SERP scraper returns empty or blocked results

Use residential proxies. Set location and language. Some regions require geo-specific IPs. Verify search terms.

Competitor crawl misses pages

Check robots.txt. Increase maxDepth and maxRequestsPerCrawl. Use sitemap if available.

Rank tracking shows inconsistent positions

Personalization and geo vary. Use consistent proxy location. Run at same time daily. Average over 3–5 runs for stability.