If you are building a keyword rank tracker, collecting SERP data is only the first step.
The useful part is detecting what changed between two search result snapshots.
For example:
- Did a page move from position 8 to position 3?
- Did a competitor enter the top 10?
- Did a URL disappear from page one?
- Did the same domain rank with a different page?
What to store in a snapshot
A SERP snapshot should include both the results and the search context.
{
"query": "search api",
"engine": "google",
"device": "desktop",
"country": "us",
"checked_at": "2026-05-18T08:00:00Z",
"results": [
{
"position": 1,
"title": "Example result",
"url": "https://example.com/page",
"domain": "example.com"
}
]
}
Do not compare two snapshots unless the context matches:
query
engine
device
country or location
Otherwise, the ranking change may be caused by a different search context, not by SEO movement.
Compare by URL and domain
You usually need two views.
URL-level comparison answers:
Did this exact page move?
Domain-level comparison answers:
Is this website still visible, even if a different page ranks?
Example:
Yesterday: example.com/old-page at position 5
Today: example.com/new-page at position 6
At URL level:
old-page dropped
new-page is new
At domain level:
example.com moved from 5 to 6
Both are useful.
Basic change types
For each URL or domain, classify the change as:
new
dropped
moved_up
moved_down
unchanged
Use this delta formula:
delta = previous_position - current_position
So:
8 -> 3 = +5
3 -> 8 = -5
Positive means the result improved.
Example change report
{
"query": "search api",
"engine": "google",
"device": "desktop",
"country": "us",
"changes": [
{
"type": "moved_up",
"url": "https://example.com/page",
"domain": "example.com",
"previous_position": 8,
"current_position": 3,
"delta": 5
},
{
"type": "new",
"url": "https://competitor.com/page",
"domain": "competitor.com",
"previous_position": null,
"current_position": 7,
"delta": null
}
]
}
Store snapshots, not only diffs
Do not store only the ranking changes.
Store the full snapshots first, then calculate diffs from them.
That makes it easier to:
reprocess old data
fix comparison bugs
change URL normalization rules
audit strange ranking changes
generate new reports later
A simple data model is:
serp_snapshots
serp_results
serp_changes
The serp_changes table can always be regenerated.
Common mistakes
The most common mistakes are:
comparing different devices
comparing different countries
not normalizing URLs
tracking only one domain
mixing URL-level and domain-level changes
using confusing delta direction
storing only diffs
Takeaway
A reliable SERP change detector needs more than yesterday’s position minus today’s position.
You need consistent search context, URL normalization, URL-level comparison, domain-level comparison, and full snapshot storage.
Once those are in place, ranking changes become much easier to explain.
Top comments (0)