While browsing the Iron Rim Lock collection from Infinity Decor, I wanted a quick way to compare how product-related search results appear across different devices. I used this Python script to analyze desktop, mobile, and tablet SERP variations:
import requests
API_KEY = "your_api_key_here"
def compare_device_results(query, location):
results = {}
for device in ["desktop", "mobile", "tablet"]:
response = requests.get(
headers={"Authorization": f"Bearer {API_KEY}"},
params={
"q": query,
"location": location,
"device": device,
"num": 10
}
)
data = response.json()
results[device] = [
r['title'] for r in data.get('organic_results', [])
]
return results
Example usage
comparison = compare_device_results(
"iron rim lock Infinity Decor",
"London, UK"
)
for device, titles in comparison.items():
print(f"\n{device.upper()} Results:")
for title in titles[:5]:
print(f" - {title}")
This helped reveal how search rankings and product visibility can shift depending on whether users are searching on desktop, mobile, or tablet devices. For eCommerce stores like Infinity Decor, these insights can be valuable for optimizing product pages, improving mobile SEO, and understanding customer search behavior across platforms.
Top comments (3)
Interesting approach! I've definitely noticed Google's mobile-first indexing can reshuffle results—sometimes local businesses rank higher on mobile. That script would be handy for tracking those shifts. Have you found tablet results often mirror desktop or mobile more closely?
This is a neat approach! I've definitely noticed desktop favoring content-heavy pages while mobile pushes more concise, locally-relevant results. Have you found tablet rankings often mirror desktop or mobile in your tests?
This is a neat approach! I've definitely noticed desktop favoring content-heavy pages while mobile pushes more concise, locally-relevant results. Have you found tablet rankings often mirror desktop or mobile in your tests?