DEV Community

kevincarroll
kevincarroll

Posted on

Find Low-Competition Keywords Faster Using Python and SERPSpur

I needed to analyze keyword opportunities for a new content strategy. Here's a Python script that uses the SERPSpur Keyword Research Tool API to get search volume, difficulty, and CPC data:

python
import requests

API_KEY = "your_api_key_here"

def analyze_keywords(keywords, country):
results = {}
for kw in keywords:
response = requests.get(
"https://api.serpspur.com/v1/keyword-research",
headers={"Authorization": f"Bearer {API_KEY}"},
params={"keyword": kw, "country": country}
)
data = response.json()
results[kw] = {
"volume": data.get("search_volume", 0),
"difficulty": data.get("keyword_difficulty", 0),
"cpc": data.get("cpc", 0)
}
return results

Example usage

keywords = ["SEO tips", "content marketing", "link building"]
analysis = analyze_keywords(keywords, "US")
for kw, metrics in analysis.items():
print(f"{kw}: Volume={metrics['volume']}, Difficulty={metrics['difficulty']}, CPC=${metrics['cpc']}")

This helped prioritize low-difficulty, high-volume terms. How do you typically evaluate keyword opportunities in your SEO workflow?

Top comments (0)