shopify-store-analyzer 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ApiVault Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,403 @@
1
+ Metadata-Version: 2.4
2
+ Name: shopify-store-analyzer
3
+ Version: 0.1.0
4
+ Summary: Python SDK for the Shopify Store Analyzer Apify actor — revenue, traffic, tech stack, brand age & dropshipper risk for any Shopify store.
5
+ Author: ApiVault Labs
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/apivault-labs/shopify-store-analyzer-python
8
+ Project-URL: Documentation, https://github.com/apivault-labs/shopify-store-analyzer-python#readme
9
+ Project-URL: Apify Actor, https://apify.com/apivault_labs/shopify-store-analyzer
10
+ Project-URL: Bug Tracker, https://github.com/apivault-labs/shopify-store-analyzer-python/issues
11
+ Keywords: shopify,shopify-scraper,shopify-api,shopify-analyzer,shopify-store-analyzer,shopify-revenue,ecommerce-intelligence,storeleads-alternative,commerce-inspector-alternative,web-scraping,apify,apify-actor,python-sdk,lead-generation,competitive-intelligence,dropshipping
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Internet :: WWW/HTTP
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: requests>=2.31.0
26
+ Dynamic: license-file
27
+
28
+ # Shopify Store Analyzer — Python SDK
29
+
30
+ > **Get revenue estimates, traffic data, tech stack, brand age & dropshipper risk for any Shopify store via a single API call.**
31
+
32
+ Python client for the [Shopify Store Analyzer Apify Actor](https://apify.com/apivault_labs/shopify-store-analyzer) — extract **40+ business intelligence signals** from any Shopify store using only public data sources.
33
+
34
+ [![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue?logo=apify)](https://apify.com/apivault_labs/shopify-store-analyzer)
35
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
36
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/)
37
+ [![PyPI-friendly](https://img.shields.io/badge/install-pip-success)](#installation)
38
+
39
+ ---
40
+
41
+ ## What it does
42
+
43
+ For any Shopify store URL, this actor returns a single rich JSON record combining **9 public data sources** + **40+ derived intelligence signals**.
44
+
45
+ A direct, pay-per-use alternative to:
46
+ - [StoreLeads.app](https://storeleads.app) ($29/mo)
47
+ - [Commerce Inspector](https://commerceinspector.com) ($10/mo)
48
+ - [SimilarWeb Pro](https://www.similarweb.com)
49
+ - [BuiltWith](https://builtwith.com)
50
+
51
+ **Pricing:** $0.01 per store analyzed. No monthly subscription, no credits expiring, no rate limits.
52
+
53
+ ---
54
+
55
+ ## Quick start
56
+
57
+ ```python
58
+ from shopify_analyzer import ShopifyAnalyzerClient
59
+
60
+ client = ShopifyAnalyzerClient(api_token="apify_api_xxxxxx")
61
+
62
+ result = client.analyze_one("https://allbirds.com")
63
+
64
+ print(f"Revenue: ${result['revenue_estimate']['monthly_revenue_usd_est']:,}/mo")
65
+ print(f"Traffic: {result['traffic']['monthly_visits']:,} visits/mo")
66
+ print(f"Brand age: {result['estimated_brand_age_years']} years")
67
+ print(f"Tech stack: {', '.join(result['tech_stack'])}")
68
+ print(f"Risk score: {result['dropshipper_risk_score']}/100 ({result['dropshipper_risk_bucket']})")
69
+ ```
70
+
71
+ Output:
72
+ ```
73
+ Revenue: $6,629,788/mo
74
+ Traffic: 3,608,048 visits/mo
75
+ Brand age: 10.4 years
76
+ Tech stack: Google Analytics, Shop Pay, Apple Pay
77
+ Risk score: 50/100 (high)
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Installation
83
+
84
+ ```bash
85
+ pip install shopify-store-analyzer
86
+ ```
87
+
88
+ Or clone and use directly:
89
+
90
+ ```bash
91
+ git clone https://github.com/apivault-labs/shopify-store-analyzer-python.git
92
+ cd shopify-store-analyzer-python
93
+ pip install -r requirements.txt
94
+ ```
95
+
96
+ Requires Python 3.9+ and the [`requests`](https://pypi.org/project/requests/) library.
97
+
98
+ ---
99
+
100
+ ## Get your API token (free)
101
+
102
+ 1. Sign up at [apify.com](https://apify.com) — free tier includes $5 monthly credits, no card required
103
+ 2. Go to [Account → Integrations](https://console.apify.com/account/integrations)
104
+ 3. Copy your Personal API token
105
+
106
+ ```bash
107
+ export APIFY_API_TOKEN=apify_api_xxxxxxxxxxxxxxxxxxxxxxxx
108
+ ```
109
+
110
+ Or pass it explicitly:
111
+
112
+ ```python
113
+ client = ShopifyAnalyzerClient(api_token="apify_api_xxxxxx")
114
+ ```
115
+
116
+ ---
117
+
118
+ ## What you get for $0.01 per store
119
+
120
+ ### 💰 Revenue & Traffic
121
+ - Estimated **monthly revenue** (visits × CR × AOV)
122
+ - **Annualized revenue** projection
123
+ - Monthly visits + 3-month trend (via SimilarWeb)
124
+ - Global rank, country rank, category rank
125
+ - Bounce rate, page per visit, avg time on site
126
+ - Top 5 countries by traffic share
127
+ - Top 10 keywords with search volume + CPC
128
+
129
+ ### 📊 Product Intelligence
130
+ - Product count, AOV, price range
131
+ - New products in 7 / 30 / 90 days (velocity)
132
+ - Discount aggressiveness (% on sale + avg discount %)
133
+ - Vendor concentration, product types
134
+ - Inventory health (% in stock)
135
+ - **Top 20 product tags** (niche detection)
136
+ - **Duplicate description ratio** (dropshipper signal)
137
+ - Likely best-sellers (top 5 by image count)
138
+
139
+ ### 🛠️ Tech Stack (60+ apps detected)
140
+ Klaviyo, Yotpo, Judge.me, ReCharge, Gorgias, AfterShip, PageFly, Shogun, Hotjar, Triple Whale, Northbeam, Algolia, Rebuy, Smile.io, Loox, Stamped, Okendo, Junip, Bold, Postscript, Attentive, Drift, Tidio, Re:amaze, Lucky Orange, Crazy Egg, Mouseflow, Refersion, ShipStation, ShipBob, Spocket, AutoDS, CJ Dropshipping, Oberlo, Dsers, Printful, Klarna, Afterpay, Sezzle, Affirm, Shop Pay, Apple Pay, Google Pay, PayPal — and more.
141
+
142
+ ### 🎯 Tracking IDs (unique feature)
143
+ Public advertising IDs for **brand-network mapping**:
144
+ - Google Tag Manager (`GTM-XXXXXX`)
145
+ - GA4 (`G-XXXXXXXX`), Universal Analytics (`UA-X-X`)
146
+ - Facebook Pixel ID
147
+ - TikTok Pixel ID
148
+ - Pinterest Tag, Snapchat Pixel
149
+ - Klaviyo public key
150
+ - Hotjar Site ID, Intercom App ID, Microsoft Clarity ID
151
+
152
+ > Same FB Pixel on two different stores = same operator. Detect parallel brand operations.
153
+
154
+ ### 📢 Active Promo & Announcement Bar
155
+ - Free shipping threshold (`$35`, `$50`, `$100`, or 0 for universal)
156
+ - Active promo codes (`SUMMER25`, `SAVE10`)
157
+ - Current discount % shown on the banner
158
+ - Announcement bar text
159
+
160
+ ### ⏱️ Brand Age
161
+ - Earliest Wayback Machine snapshot
162
+ - Earliest SSL certificate (via crt.sh)
163
+ - Estimated brand age in years
164
+ - Estimated founding year
165
+ - Shopify CDN store ID (sequential, lower = older)
166
+
167
+ ### 🌍 International Expansion
168
+ - All `hreflang` languages detected
169
+ - Currency switcher / country selector flags
170
+ - International expansion score (0–100)
171
+
172
+ ### 🧠 Derived Intelligence
173
+ - **Customer segment** — mass-market / mid-market / premium / luxury
174
+ - **Marketing channel mix** — search-driven / social-driven / paid-driven / brand-driven / email-driven / mixed
175
+ - **Dropshipper risk score** (0–100) with explained signals
176
+
177
+ ### 📱 Social & Contact
178
+ - Instagram, Facebook, Twitter/X, TikTok, YouTube, Pinterest, LinkedIn handles
179
+ - Public emails and phones from homepage
180
+
181
+ ### 🌐 Sitemap totals
182
+ Real product / page / collection / blog counts (not just sample).
183
+
184
+ ---
185
+
186
+ ## Examples
187
+
188
+ See the [`examples/`](examples) folder for full code:
189
+
190
+ | File | What it does |
191
+ |---|---|
192
+ | [`quickstart.py`](examples/quickstart.py) | Analyze one store, print key metrics |
193
+ | [`bulk_analyze.py`](examples/bulk_analyze.py) | Analyze 50+ stores in parallel |
194
+ | [`find_dropshippers.py`](examples/find_dropshippers.py) | Filter stores by risk score |
195
+ | [`export_to_csv.py`](examples/export_to_csv.py) | Save results to CSV / Excel |
196
+ | [`compare_competitors.py`](examples/compare_competitors.py) | Side-by-side competitor comparison |
197
+ | [`monitor_changes.py`](examples/monitor_changes.py) | Track stores over time, detect changes |
198
+
199
+ ---
200
+
201
+ ## API reference
202
+
203
+ ### `ShopifyAnalyzerClient(api_token=None, timeout=600)`
204
+
205
+ | Param | Type | Description |
206
+ |---|---|---|
207
+ | `api_token` | `str` | Apify API token. Falls back to `APIFY_API_TOKEN` env var. |
208
+ | `timeout` | `int` | Max seconds to wait for analysis. Default 600 (10 min). |
209
+
210
+ ### `client.analyze(store_urls, conversion_rate=2.5, product_sample_size=250, ...)`
211
+
212
+ Analyze multiple stores synchronously.
213
+
214
+ | Param | Type | Default | Description |
215
+ |---|---|---|---|
216
+ | `store_urls` | `list[str]` | required | Shopify store URLs (full or bare domain) |
217
+ | `conversion_rate` | `float` | 2.5 | % for revenue formula. Industry: 2.5%, fashion: 1.5–2%, electronics: 1%, impulse: 3–4% |
218
+ | `product_sample_size` | `int` | 250 | Max products to sample (0 = full catalog) |
219
+ | `max_concurrency` | `int` | 3 | Parallel stores to analyze |
220
+
221
+ Plus boolean toggles to skip data sources for speed:
222
+
223
+ | Flag | Default | Effect |
224
+ |---|---|---|
225
+ | `extract_traffic` | `True` | Pull SimilarWeb data |
226
+ | `extract_brand_age` | `True` | Wayback Machine + crt.sh lookups |
227
+ | `extract_tech_stack` | `True` | Detect 60+ apps + tracking IDs |
228
+ | `extract_promo` | `True` | Free shipping, promo codes, announcement |
229
+ | `extract_international` | `True` | hreflang + currency switcher |
230
+ | `extract_sitemap` | `True` | Sitemap totals |
231
+ | `extract_derived_signals` | `True` | Risk score, customer segment, marketing mix |
232
+
233
+ Returns: `list[dict]` — one record per store.
234
+
235
+ ### `client.analyze_one(store_url, **kwargs)`
236
+
237
+ Convenience wrapper for single-store analysis. Returns one `dict`.
238
+
239
+ ---
240
+
241
+ ## Sample output
242
+
243
+ ```json
244
+ {
245
+ "domain": "allbirds.com",
246
+ "myshopify_handle": "weareallbirds.myshopify.com",
247
+ "currency": "USD",
248
+ "cdn_store_id": "1104/4168",
249
+ "tech_stack": ["Google Analytics", "Shop Pay", "Apple Pay"],
250
+ "tracking_ids": {
251
+ "google_tag_manager": "TH8KRSBJ"
252
+ },
253
+ "announcement": {
254
+ "announcement_discount_pct": 30,
255
+ "announcement_bar_text": "30% off your order when you spend $150+. Discount automatically applied at checkout."
256
+ },
257
+ "socials": {
258
+ "instagram": "allbirds",
259
+ "tiktok": "weareallbirds"
260
+ },
261
+ "price_min": 3.0, "price_max": 99.0, "price_median": 39.0,
262
+ "avg_order_value": 58.50,
263
+ "products_on_sale_pct": 98.0,
264
+ "avg_discount_pct": 53.0,
265
+ "avg_images_per_product": 2.5,
266
+ "unique_tags_count": 285,
267
+ "top_tags": [
268
+ {"tag": "collection:apr26", "count": 100},
269
+ {"tag": "shoprunner", "count": 100}
270
+ ],
271
+ "duplicate_description_pct": 89.0,
272
+ "new_products_30d": 100,
273
+ "sitemap_products": 980,
274
+ "hreflangs_count": 85,
275
+ "international_expansion_score": 70,
276
+ "estimated_brand_age_years": 10.4,
277
+ "estimated_founded_year": 2015,
278
+ "traffic": {
279
+ "monthly_visits": 3608048,
280
+ "global_rank": 10716,
281
+ "category_rank": 127,
282
+ "top_countries": [{"country_code": "US", "share": 0.87}]
283
+ },
284
+ "revenue_estimate": {
285
+ "monthly_revenue_usd_est": 6629788,
286
+ "annualized_revenue_usd_est": 79557456,
287
+ "conversion_rate_used_pct": 2.5
288
+ },
289
+ "customer_segment": "mid-market",
290
+ "marketing_channel_mix": "search-driven (58%)",
291
+ "dropshipper_risk_score": 50,
292
+ "dropshipper_risk_bucket": "high"
293
+ }
294
+ ```
295
+
296
+ ---
297
+
298
+ ## Use cases
299
+
300
+ ### 🥇 Dropshipping competitor research
301
+ Verify a competitor's revenue **before** copying their niche. Find legit brands (`dropshipper_risk_bucket: "low"`) with `revenue > $1M/mo` and study their tech stack.
302
+
303
+ ### 🥈 B2B lead generation for Shopify apps
304
+ Find stores **without** your app (e.g. no Klaviyo → email automation pitch). Filter by revenue tier for enterprise prospects. Get founder emails and social handles in one call.
305
+
306
+ ### 🥉 Investment due diligence
307
+ Verify claimed revenue. Cross-check brand age via Wayback + SSL. Spot paid-driven marketing (high CAC) vs brand-driven (sustainable).
308
+
309
+ ### 🎯 Agency prospecting
310
+ - Old themes → pitch redesign
311
+ - Low `page_per_visit` → pitch CRO
312
+ - Low `international_expansion_score` → pitch geo-expansion
313
+ - High `dropshipper_risk_score` → skip (won't convert)
314
+
315
+ ### 📊 Market research
316
+ Track 100+ competitors weekly. Compare AOV, velocity, tech stack across a niche.
317
+
318
+ ### 🔍 Brand network detection
319
+ Use `tracking_ids` to detect domains sharing the same Facebook Pixel or GTM container — same operator behind multiple brands.
320
+
321
+ ---
322
+
323
+ ## Pricing
324
+
325
+ Pay only for what you analyze:
326
+
327
+ | Volume | Cost |
328
+ |---|---|
329
+ | 1 store | $0.01 |
330
+ | 100 stores | $1.00 |
331
+ | 1,000 stores | $10.00 |
332
+ | 10,000 stores | $100.00 |
333
+
334
+ Free Apify tier includes ~$5 monthly credit — analyze ~500 stores per month for free.
335
+
336
+ ---
337
+
338
+ ## How it works
339
+
340
+ All data sources are **public and free** — no logins, no proxies, no extra API keys:
341
+
342
+ 1. `/products.json` — Shopify's public catalog API
343
+ 2. `/collections.json` — public collections
344
+ 3. `/sitemap.xml` — recursive child sitemaps for real totals
345
+ 4. **Homepage HTML** — tech stack, socials, meta, tracking IDs, announcement bar
346
+ 5. **SimilarWeb public API** — undocumented but stable
347
+ 6. **Wayback Machine** — first snapshot date
348
+ 7. **crt.sh** — earliest SSL cert (certificate transparency logs)
349
+ 8. **hreflang scan** — international targeting
350
+ 9. **Schema.org JSON-LD** — aggregateRating
351
+
352
+ Revenue formula:
353
+ ```
354
+ revenue = monthly_visits × conversion_rate × AOV
355
+ AOV = median_price × 1.5 (industry heuristic for items per order)
356
+ ```
357
+
358
+ ---
359
+
360
+ ## FAQ
361
+
362
+ **Q: Will it work on every Shopify store?**
363
+ A: Yes — every store with `/products.json` enabled (the default). Some stores hide their catalog; for those you still get tech stack, socials, traffic, brand age.
364
+
365
+ **Q: How accurate is the revenue estimate?**
366
+ A: For stores with 100K+ monthly visits: usually within ±25% of public revenue. Smaller stores: less reliable due to SimilarWeb sampling. Treat as order-of-magnitude.
367
+
368
+ **Q: Can it detect Shopify Plus stores?**
369
+ A: Yes, via the `likely_shopify_plus` boolean.
370
+
371
+ **Q: What if SimilarWeb has no data?**
372
+ A: Traffic / revenue fields will be null, but you still get all product, tech, brand age, and signal data.
373
+
374
+ **Q: Is the dropshipper risk score reliable?**
375
+ A: It's a heuristic. Scores 50+ almost always indicate dropshippers. Under 25 = legit brands. 25–50 = manual review.
376
+
377
+ **Q: Can I run this without Apify?**
378
+ A: This package is a thin wrapper around the hosted actor. The actor handles infrastructure, retries, parallelism. Self-hosted scraping at scale is a separate undertaking.
379
+
380
+ ---
381
+
382
+ ## Related Apify actors
383
+
384
+ - [Shopify Product Scraper](https://apify.com/apivault_labs/shopify-product-scraper) — extract full catalogs
385
+ - [WooCommerce Store Analyzer](https://apify.com/apivault_labs/woocommerce-store-analyzer) — same intelligence for WooCommerce
386
+ - [Domain Intelligence Scraper](https://apify.com/apivault_labs/domain-intelligence-scraper) — WHOIS, DNS, SSL, subdomains
387
+ - [WordPress Plugin Directory Scraper](https://apify.com/apivault_labs/wordpress-plugins-scraper) — 60K+ plugins
388
+
389
+ See [all actors by apivault_labs](https://apify.com/apivault_labs).
390
+
391
+ ---
392
+
393
+ ## License
394
+
395
+ MIT — see [LICENSE](LICENSE).
396
+
397
+ This client is open source. The underlying Apify actor is a paid service ($0.01/store).
398
+
399
+ ---
400
+
401
+ ## Keywords
402
+
403
+ `shopify-scraper` `shopify-store-analyzer` `shopify-revenue-estimator` `shopify-intelligence` `shopify-api` `storeleads-alternative` `commerce-inspector-alternative` `similarweb-alternative` `ecommerce-intelligence` `dropshipper-detection` `competitive-intelligence` `web-scraping` `apify` `apify-actor` `python-sdk` `shopify-tech-stack` `shopify-tracking-ids` `shopify-revenue-api` `shopify-traffic-estimation` `lead-generation` `b2b-leads`