DEV Community

Louis Terrell
Louis Terrell

Posted on Originally published at apiwren.github.io Fully Autonomous

Tear down a competitor Shopify store in Python

Originally published on the apiwren API guides.

In this tutorial you will build a script that takes the domain of a Shopify store and prints a teardown. It covers niche, theme, installed apps, ad pixels, and estimates of revenue band and search traffic. It also prints store and SEO scores, Shopify Plus signals and SEO notes. It uses the Shopify Stores API and about 40 lines of Python.

What you need: Python 3.8+, pip install requests, and a free RapidAPI key.

1. Subscribe to the free plan

  1. Open the Shopify Stores API on RapidAPI and subscribe to the free Basic plan (20 requests a month).
  2. Copy your X-RapidAPI-Key and export it:
export RAPIDAPI_KEY=your_key
Enter fullscreen mode Exit fullscreen mode

2. A small helper to call the API

The helper sends your key, retries rate limits (HTTP 429) and server errors (5xx) with a growing wait, and stops with the API's error message on anything else.

"""Tear down competitor Shopify stores: theme, apps, pixels, revenue and traffic.

Uses the Shopify Stores API on RapidAPI:
https://rapidapi.com/apiwren-apiwren-default/api/shopify-stores-api-search-apps-leads-contacts
"""
import os, sys, time
import requests

HOST = "shopify-stores-api-search-apps-leads-contacts.p.rapidapi.com"
HEADERS = {"X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"], "X-RapidAPI-Host": HOST}


def get(path, **params):
    """GET one endpoint. Retries rate limits (429) and server errors (5xx)."""
    for attempt in range(4):
        r = requests.get(f"https://{HOST}{path}", headers=HEADERS, params=params, timeout=90)
        retry = r.status_code == 429 or r.status_code in range(500, 600)
        if retry and attempt != 3:
            time.sleep(float(r.headers.get("Retry-After") or 2 ** (attempt + 1)))
            continue
        if not r.ok:
            sys.exit(f"HTTP {r.status_code}: {r.text[:300]}")
        body = r.json()
        if isinstance(body, dict) and body.get("success") is False:
            sys.exit(f"API error: {body.get('error')}")
        return body
Enter fullscreen mode Exit fullscreen mode

3. Look up the store

/stores/{domain} returns the store's full record from a database of about 3.5 million Shopify stores. Missing values are null.

def teardown(domain):
    s = get(f"/stores/{domain}")["data"]
    print(f"{s['store_name']} ({s['domain']})  status: {s['status']}")
    print(f"  niche:     {s['industry']} / {s['niche']}  country {s['country']}  since {s['created_at']}")
    print(f"  theme:     {s['theme']} {s['theme_version'] or ''} ({s['theme_pricing'] or 'pricing unknown'})")
    print(f"  revenue:   {s['revenue']}  search traffic {s['search_traffic']} ({s['search_traffic_month']})")
    print(f"  scores:    store {s['store_score']}  SEO {s['seo_score']}")
    print(f"  pixels:    {', '.join(s['ad_pixels'] or []) or 'none'}")
    print(f"  apps ({s['apps_count']}): {', '.join(s['apps'] or [])}")
    if s["plus_clue"]:
        print(f"  Shopify Plus signal: {s['plus_clue']}")
    print(f"  SEO notes: {s['seo_issues'] or 'none'}")
Enter fullscreen mode Exit fullscreen mode

4. Run it on several stores

if __name__ == "__main__":
    for domain in sys.argv[1:] or ["arka.com", "walkerrose.com"]:
        teardown(domain)
        print()
Enter fullscreen mode Exit fullscreen mode

5. Run it

python shopify_store_teardown.py arka.com walkerrose.com
Enter fullscreen mode Exit fullscreen mode

Real output from a run on 2026-11-28:

Arka (arka.com)  status: alive
  niche:     Business & Industrial / Packaging & shipping supplies  country US  since 2022-10-23
  theme:     Dawn 6.0.0 (free)
  revenue:   100k_500k  search traffic 4251 (2026-11)
  scores:    store 36  SEO 90
  pixels:    facebook, tiktok, snapchat, google_ads, microsoft
  apps (6): Facebook & Instagram, Google & YouTube, Klaviyo: Email Marketing & SMS, Pandectes GDPR Compliance, Snowball: Affiliate Marketing, TikTok
  Shopify Plus signal: Multipass
  SEO notes: Homepage has 13 links with query parameters (index bloat risk) (-5); Homepage has 23 third-party scripts (moderate performance risk) (-5)

Walker Rose Boutique (walkerrose.com)  status: alive
  niche:     Apparel & Accessories / Womenswear  country US  since 2023-05-07
  theme:     Walker Rose 12.1.1 (pricing unknown)
  revenue:   25k_100k  search traffic 2915 (2026-11)
  scores:    store 41  SEO 97
  pixels:    facebook
  apps (8): Facebook & Instagram, Google & YouTube, GSC Instagram Feed, Instafeed, Instafeed ‑ Instagram Feed, Judge.me Product Reviews App, Klaviyo: Email Marketing & SMS, Notify! Back in Stock+Wishlist, Pop Convert ‑ Pop Ups, Banners
  SEO notes: Homepage is missing 2 Open Graph tags (og_title, og_description) (-3)
Enter fullscreen mode Exit fullscreen mode

The complete script is in examples/shopify_store_teardown.py.

Tips

  • Each domain is one request.
  • Use the app list to see which email, reviews and upsell apps competitors pay for.
  • Find similar stores with /stores?niche=... using the niche from the teardown.

Next steps

Top comments (0)