Menu

Post image 1
Post image 2
1 / 2
0

Automating location-based SERP checks with Python

DEV Community: webdev·Sebastian Cole·4 months ago
#u1aGtTo3
#dev#city#local#cities#rankings#params
Reading 0:00
15s threshold

I’ve been working on local SEO reporting for a client with multiple service areas, and manually checking rankings city by city was becoming painfully time-consuming. To speed things up, I started automating location-based SERP checks with Python so I could compare rankings across multiple cities in one run. Simplified example: import requests cities = ['London', 'Manchester', 'Birmingham'] for city in cities: params = { 'keyword': 'plumber', 'country': 'GB', 'city': city, 'language': 'en' } response = requests.get( 'https://example-api.com/search', params=params ) print(f'{city}: {response.json()}') Enter fullscreen mode Exit fullscreen mode This made it much easier to: compare visibility between locations spot weak local markets monitor ranking inconsistencies prioritize local SEO improvements One interesting thing I found was that rankings varied much more between cities than expected. A site performing well in one area could be nearly invisible in another, even with similar competition levels.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More