DEV Community

Gurpreet Singh
Gurpreet Singh

Posted on

Using APIs to Automate Keyword Tracking for White Label SEO Clients

Using APIs to Automate Keyword Tracking for White Label SEO Clients
In the world of white label SEO, keyword tracking isn’t optional—it’s everything. Whether you're a developer supporting an agency or a technical SEO building scalable systems, manually checking rankings for dozens of clients just doesn’t cut it anymore.
That’s where API-powered keyword tracking automation steps in.
In this post, I’ll show you how to:

  • Automate keyword tracking using APIs
  • Pull rankings via Python using a real-time SERP API
  • Organize results per client
  • Create white-labeled reports that update automatically

Why Keyword Tracking Is Essential in White-Label SEO

White label SEO agencies need to track keyword performance to:

  • Prove ROI to clients
  • Optimize content and link-building strategies
  • Keep reports accurate and timely
  • Reduce repetitive tasks

When you’re managing SEO for 50+ clients, doing this manually becomes a nightmare. Keyword automation lets you spend less time on grunt work—and more time on actual strategy.

Meet the APIs That Make This Easy

Here are 3 reliable APIs for tracking keyword rankings in the USA:

    1. API: Google Search Console API SERP API DataForSEO API
  • Pros
    Free, great for branded terms
    Real-time Google rankings, super easy
    Very flexible and supports bulk tracking

  • Notes
    Delayed data, limited keyword variety
    Paid, scalable
    Great for agencies

We'll use SERP API for this tutorial—it’s fast, clean, and well-documented.

  • Step-by-Step: Automate Keyword Tracking with SERP API Step 1: Get Your API Key Sign up at serpapi.com, create a project, and grab your API key.

Step 2: Prepare Your Parameters
We’ll track the keyword: white label seo services in the United States, on desktop.
params = {
"api_key": "your_api_key_here",
"engine": "google",
"q": "white label seo services",
"location": "United States",
"device": "desktop"
}

Step 3: Make the API Call in Python

import requests

response = requests.get("https://serpapi.com/search", params=params)
data = response.json()

Extract the rank position

rank_position = data['organic_results'][0]['position']
print("Current Rank:", rank_position)

This gives you real-time ranking data for the keyword.

Step 4: Save It to CSV (Or Your DB)
You can store this for daily logs, monthly reports, or visualize it later.
import csv

with open('keyword_rankings.csv', mode='a') as file:
writer = csv.writer(file)
writer.writerow(["Keyword", "Position"])
writer.writerow(["white label seo services", rank_position])

Build White Label SEO Reports
Use this data to generate automated reports via:
Google Data Studio (connect your CSV or DB)

Notion dashboards (via Make.com or Zapier)

Branded PDFs using Python's reportlab or Google Slides API

Each client gets a custom report with their logo, rank changes, and weekly snapshots.
Add Slack or Email Notifications
Bonus! Set up alerts for keyword drops:
if rank_position > 5:
# Send a webhook or trigger Zapier
print("Alert: Keyword dropped below Top 5!")

This helps your team respond before the client even notices.
Scale It for 10, 50, or 500 Clients
Store each client's keyword list and target region in a .json or database.

Loop through each client, hitting the API and logging results.

Schedule a daily or weekly cron job or use AWS Lambda for serverless tracking.

This creates a scalable rank-monitoring system with minimal effort after setup.

Cost Control Tips
Most APIs are usage-based, so here’s how to save:
Track only priority keywords (exclude low-traffic terms)

Use Google Search Console for branded terms (free)

Run updates daily or weekly, not every hour

**

Final Thoughts

**
Automating keyword tracking with APIs is a game-changer for agencies and developers building SEO infrastructure. It improves:
Accuracy of client reporting

Your Turn
Have you built a keyword tracker or SEO report system before? Share your favorite tools, tech stack, or ask your questions in the comments!

Top comments (0)