Track indexed-vs-not over time with -report and -diff
Abhay khant
Jan 1, 1970 • 2 min read
Want to know whether your pages are actually getting indexed as time goes on?
Use -report to snapshot a run and -diff to compare against a previous one.
Snapshot a run with -report
-report <dir> writes three files into the directory you name:
./gsc-indexer -creds sa.json -batch urls.txt -report ./report
indexed.txt. URLs Google has indexed.not-indexed.txt. everything else (not indexed, or errored).summary.json. counts + the full URL lists, in machine-readable form.
The run also prints a summary to your terminal:
SUMMARY: 87 indexed, 13 not indexed of 100 URLs
→ ./report/indexed.txt
→ ./report/not-indexed.txt
Compare runs with -diff
Later, re-run and point -diff at the saved summary.json:
./gsc-indexer -creds sa.json -batch urls.txt -diff ./report/summary.json
This prints what changed since the baseline:
▲ newly indexed: https://www.toolsura.com/post-new/
▼ dropped (was indexed, now not): https://www.toolsura.com/post-stale/
...
DIFF vs ./report/summary.json
indexed: 87 → 90 (+3)
not index: 13 → 10 (-3)
newly indexed: 3 | dropped: 1 | unchanged: 96
▲ newly indexed. URLs that moved from not-indexed to indexed.▼ dropped. URLs that were indexed before but aren't now.
Update and compare in one pass
You can write a fresh report and diff against the previous one at the same time:
./gsc-indexer -creds sa.json -batch urls.txt -report ./report -diff ./report/summary.json
The diff uses the previous summary.json (read before it's overwritten), so
this is safe to run on a schedule.
Next
- Large runs timing out? Throttling and quiet mode.
- Broken run? Troubleshooting.
Sources
- Google Search Console
- URL Inspection API documentation
- Google Search APIs overview
- Service account OAuth (Google Identity)
- About service accounts (Google Cloud IAM)
- Verify site ownership
- Property types: URL-prefix vs Domain
- URL Inspection tool help
- Indexing API (JobPosting/BroadcastEvent only)
- Request indexing / inspect a URL