Skip to main content
Change Tracking Change tracking compares the current content of a page against the last time you scraped it. Add changeTracking to your formats array to detect whether a page is new, unchanged, or modified, and optionally get a structured diff of what changed.
  • Works with /scrape, /crawl, and /batch/scrape
  • Two diff modes: git-diff for line-level changes, json for field-level comparison
  • Scoped to your team, and optionally scoped to a tag that you pass in

How it works

Every scrape with changeTracking enabled stores a snapshot and compares it against the previous snapshot for that URL. Snapshots are stored persistently and do not expire, so comparisons remain accurate regardless of how much time has passed between scrapes. The response includes these fields in the changeTracking object:

Basic usage

Include both markdown and changeTracking in the formats array. The markdown format is required because change tracking compares pages via their markdown content.

Response

On the first scrape, changeStatus is "new" and previousScrapeAt is null:
On subsequent scrapes, changeStatus reflects whether content changed:

Git-diff mode

The git-diff mode returns line-by-line changes in a format similar to git diff. Pass an object in the formats array with modes: ["git-diff"]:

Response

The diff object contains both a plain-text diff and a structured JSON representation:
The structured diff.json object contains:
  • files: array of changed files (typically one for web pages)
  • chunks: sections of changes within a file
  • changes: individual line changes with type ("add", "del", or "normal"), line number (ln), and content

JSON mode

The json mode extracts specific fields from both the current and previous version of the page using a schema you define. This is useful for tracking changes in structured data like prices, stock levels, or metadata without parsing a full diff. Pass modes: ["json"] with a schema defining the fields to extract:

Response

Each field in the schema is returned with previous and current values:
You can also pass an optional prompt to guide the LLM extraction alongside the schema.
JSON mode uses LLM extraction and costs 5 credits per page. Basic change tracking and git-diff mode have no additional cost.

Using tags

By default, change tracking compares against the most recent scrape of the same URL scraped by your team. Tags let you maintain separate tracking histories for the same URL, which is useful when you monitor the same page at different intervals or in different contexts.

Crawl with change tracking

Add change tracking to crawl operations to monitor an entire site for changes. Pass the changeTracking format inside scrapeOptions:

Batch scrape with change tracking

Use batch scrape to monitor a specific set of URLs:

Scheduling change tracking

Change tracking is most useful when you scrape on a regular schedule. You can automate this with cron, cloud schedulers, or workflow tools.

Cron job

Create a script that scrapes a URL and alerts on changes:
check-pricing.sh
Schedule it with crontab -e:

Cloud and serverless schedulers

  • AWS: EventBridge rule triggering a Lambda function
  • GCP: Cloud Scheduler triggering a Cloud Function
  • Vercel / Netlify: Cron-triggered serverless functions
  • GitHub Actions: Scheduled workflows with schedule and cron trigger

Workflow automation

No-code platforms like n8n, Zapier, and Make can call the Firecrawl API on a schedule and route results to Slack, email, or databases. See the workflow automation guides.

Webhooks

For async operations like crawl and batch scrape, use webhooks to receive change tracking results as they arrive instead of polling.
The crawl.page event payload includes the changeTracking object for each page:
For webhook configuration details (headers, metadata, events, retries, signature verification), see the Webhooks documentation.

Configuration reference

The full set of options available when passing a changeTracking format object:

Data models

Important details

The markdown format must always be included alongside changeTracking. Change tracking compares pages via their markdown content.
  • Snapshot retention: Snapshots are stored persistently and do not expire. A scrape performed months after the previous one will still compare correctly against the earlier snapshot.
  • Scoping: Comparisons are scoped to your team. Your first scrape of any URL returns "new", even if other users have scraped it.
  • URL matching: Previous scrapes are matched on exact source URL, team ID, markdown format, and tag. Keep URLs consistent between scrapes.
  • Parameter consistency: Using different includeTags, excludeTags, or onlyMainContent settings across scrapes of the same URL produces unreliable comparisons.
  • Comparison algorithm: The algorithm is resistant to whitespace and content order changes. Iframe source URLs are ignored to handle captcha/antibot randomization.
  • Caching: Requests with changeTracking bypass the index cache. The maxAge parameter is ignored.
  • Error handling: Monitor the warning field in responses and handle the changeTracking object potentially being absent (this can occur if the database lookup for the previous scrape times out).

Billing

Are you an AI agent that needs a Firecrawl API key? See firecrawl.dev/agent-onboarding/SKILL.md for automated onboarding instructions.