Need to check if your site is ranking for a specific keyword in different countries? I wrote a quick Python script that uses the SERPSpur API to check rankings across multiple locations:
python
import requests
API_KEY = "your_api_key_here"
def check_rankings(domain, keyword, locations):
results = {}
for location in locations:
response = requests.get(
"https://api.serspur.com/v1/search",
headers={"Authorization": f"Bearer {API_KEY}"},
params={"q": keyword, "location": location, "num": 100}
)
data = response.json()
for i, result in enumerate(data['organic_results'], 1):
if domain in result['link']:
results[location] = i
break
else:
results[location] = "Not in top 100"
return results
Example usage
locations = ["United States", "United Kingdom", "Canada"]
ranks = check_rankings("example.com", "SEO tools", locations)
for loc, rank in ranks.items():
print(f"{loc}: Position {rank}")

This helps me quickly identify international SEO issues without manually searching each region. How do you handle multi-location ranking checks?
Top comments (0)