Getting Started
Create an API key in Settings, under API keys, and send it on every request as a bearer token. Keys need an active subscription. The key is shown once, so keep it somewhere safe.
curl "https://ecomspy.se/api/v1/me" \ -H "Authorization: Bearer $ECOMSPY_KEY"
That returns the account the key belongs to: a quick check that the key works. The same key also works as the bearer token for the Claude connector.
Requests
- Everything is JSON over HTTPS at
https://ecomspy.se. - Filters are query parameters. A list takes comma-separated values, such as
countries=US,GB; repeating the parameter works too. - Results are paged with
pageandper_page, and say how many there are in total. - A domain can be written with or without
www.; a store's old or second domain finds the store. - The data is the app's: stores are refreshed nightly, and ads are re-checked every few days.
Errors and Limits
Each key can make 60 requests a minute. Errors come back with an HTTP status and a detail saying what went wrong.
400A parameter the endpoint doesn't have, or a list value of the wrong kind. The reply lists the valid parameters.401No API key, or one that's wrong or revoked.403No active subscription on the key's account.404No such store or ad.422A value outside what the parameter allows, such as an unknown sort or a page size over the maximum.429Over the rate limit. Wait a moment and retry.Search stores
/api/v1/storesSearch the ecomspy index of Shopify stores. Returns a paginated list of slim rows: score, ad counts, theme, pixels, apps, niche, country, 7-day ad growth (adGrowth7d), number of markets, launchDate (when the store launched its main product) with mainProduct {title, url, via: 'ads' = the product its ads link to, 'ai' = ecomspy's pick, 'newest'}, storeType ('focused' / 'junk' / 'brand' / 'unclear', an AI judgement of the kind of store; junk scores at 30%), and stale = true when the store's data is more than 3 days old. include_details=true adds products, top ads and ad history.
Parameters
searchnichescountriesprovincescurrenciescitiesthemespixelsappstldsmin_scoremax_scoremin_active_adsmax_active_adsmin_total_adsmax_total_adsmin_productsmax_productslaunched_within_dayslaunched_fromlaunched_tomin_age_daysmax_age_daysmax_days_since_last_productmin_days_since_last_productmin_ad_growth_pctmax_ad_growth_pctships_tocountries). Include '*' to also match stores that ship worldwide. Discover via GET /api/v1/filters/ships_to. Comma-separated.min_marketsmax_marketsmin_ad_activitysortorderpageper_pageinclude_detailsExample
curl "https://ecomspy.se/api/v1/stores?launched_within_days=90&min_active_ads=10&countries=US,GB&per_page=20" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Search ads
/api/v1/adsSearch Meta ads from indexed stores. Each ad has the libraryId, advertiser, copy/headline/CTA, creative URL, language, platforms, runningDays, prelander (where its link goes, when that's a pre-lander), plus the parent store's score and ad counts. Ads delivered in the EU or the UK also carry transparency data (reach, estimated spend, target age/gender/countries); the reach is the EU and the UK added up.
Filterable by creative format (display_format / media_type), CTA type, Meta placement, pre-lander, Facebook page popularity, copy length, ad start date, and the full EU/UK transparency set (has_eu_data, min/max_eu_reach, min/max_eu_spend_usd, eu target age/gender/countries).
Note: there is no active/paused filter — only ads re-confirmed by the scraper within the last few days are listable at all, so essentially every result is a currently-running ad. Each result still carries an isActive field for the rare paused/unknown case.
Returns a copy preview (~280 chars) by default to keep responses small — pass full_copy=true if you actually need the full advertorial text. Default per_page is 10 for the same reason; bump it deliberately when you've narrowed your filters.
Use GET /api/v1/ads/{library_id}/copy to pull the full body for one ad on demand.
Parameters
searchnichespixelscountriescurrenciescitiesprovinceslanguagesmedia_typemin_running_daysmax_running_daysmin_scoremax_scoresortorderpageper_pagethemestldsappsmin_active_adsmax_active_adsmin_total_adsmax_total_adsmin_ad_activitymin_productsmin_store_agemax_store_agemax_days_since_last_productmin_days_since_last_productmin_ad_growth_pctmax_ad_growth_pctprelandermax_per_storemax_productsdisplay_formatmedia_type parameter instead filters on which asset ecomspy actually cached. Comma-separated.cta_typeplatformmin_start_date_unixmax_start_date_unixmin_page_likesmax_page_likesmin_copy_lengthmax_copy_lengthhas_eu_datamin_eu_reachmax_eu_reachmin_eu_spend_usdmax_eu_spend_usdmin_eu_target_agemax_eu_target_ageeu_target_gendereu_target_countriesfull_copydiversifyinclude_store_historyExample
curl "https://ecomspy.se/api/v1/ads?niches=Pets&min_running_days=30&max_per_store=1&per_page=20" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Filter values
/api/v1/filters/{kind}List the available values for a filter dimension, most common first, with how many stores or ads have each. Use this to discover what to pass into GET /api/v1/stores or GET /api/v1/ads. total = how many values match; truncated = true when there are more than limit.
Parameters
kindsearchlimitExample
curl "https://ecomspy.se/api/v1/filters/apps?search=klaviyo" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Get a store
/api/v1/stores/{domain}Full detail for a single store: products, score breakdown (activeAds, adFreshness, latestLaunch = how recent the main product's launch is, productCount, fit = dropshipping fit, the score's multiplier when the store has one; each 0-100), launchDate + mainProduct, storeType, sibling domains, apps, pixels, country, freshness timestamps, and stale = true when the store's data is more than 3 days old.
Parameters
domainExample
curl "https://ecomspy.se/api/v1/stores/berbino.com" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Store history
/api/v1/stores/{domain}/historyDaily snapshot history for a store over the last days days (default 30). Each row has productCount, activeAds (NULL on days ads weren't refreshed), inactiveAds, score, store age, and a delta vs the previous snapshot.
Parameters
domaindaysExample
curl "https://ecomspy.se/api/v1/stores/berbino.com/history?days=30" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Ad format mix
/api/v1/stores/{domain}/ad-formatsFast video / static-image / carousel format mix of a competitor's ACTIVE Meta ad library — answers 'are they primarily running video ads?' in one ~30s call by reading Meta's own per-media-type result counts (no full scrape). For the actual creatives + copy, use GET /api/v1/ads.
Parameters
domainforce_refreshExample
curl "https://ecomspy.se/api/v1/stores/berbino.com/ad-formats" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Full ad copy
/api/v1/ads/{library_id}/copyReturn the full ad body (copy + headline + subheadline + CTA) for one Meta ad by its library_id. Use this when GET /api/v1/ads returned a truncated preview and you need the full advertorial.
Parameters
library_idExample
curl "https://ecomspy.se/api/v1/ads/1574401311057063/copy" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Tracked stores
/api/v1/trackedStores you are tracking for change notifications, with each store's notification settings (ad changes, ad count, products, score), and your tracking limit (cap). POST /api/v1/tracked/{domain} / DELETE /api/v1/tracked/{domain} change the list.
Example
curl "https://ecomspy.se/api/v1/tracked" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Track a store
/api/v1/tracked/{domain}Start tracking a store: ecomspy then reads its whole Meta ad library daily and notifies you of changes (GET /api/v1/notifications). Already tracked = its settings are updated. Each account has a tracking limit (GET /api/v1/tracked shows it); DELETE /api/v1/tracked/{domain} frees a slot.
Parameters
domainnotify_ad_changesnotify_ad_countnotify_productsnotify_scoreExample
curl -X POST "https://ecomspy.se/api/v1/tracked/berbino.com" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Stop tracking a store
/api/v1/tracked/{domain}Stop tracking a store. Its notifications are hidden from GET /api/v1/notifications (they come back if it's tracked again).
Parameters
domainExample
curl -X DELETE "https://ecomspy.se/api/v1/tracked/berbino.com" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Notifications
/api/v1/notificationsChange notifications for your tracked stores, newest first: ad launches and stops, ad-count jumps, product and score changes. An ad launch/stop event lists up to 20 / 50 ads; event_data.count is the real number and event_data.truncated = true when the list is shorter. Stores no longer tracked are left out. Use with GET /api/v1/tracked to summarise what competitors did recently; POST /api/v1/notifications/read when done.
Parameters
unread_onlydomainlimitExample
curl "https://ecomspy.se/api/v1/notifications?unread_only=true" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Mark notifications read
/api/v1/notifications/readMark notifications read, by id or all at once, so unread_only=true on GET /api/v1/notifications returns only what's new. Returns how many changed.
Parameters
idsallExample
curl -X POST "https://ecomspy.se/api/v1/notifications/read?all=true" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Favorite stores
/api/v1/favoritesDomains you have starred as favorites in the ecomspy app. Pass them to GET /api/v1/stores/{domain} / GET /api/v1/stores for details; POST /api/v1/favorites/{domain} / DELETE /api/v1/favorites/{domain} change the list.
Example
curl "https://ecomspy.se/api/v1/favorites" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Add a favorite
/api/v1/favorites/{domain}Star a store as a favorite (your saved list in the ecomspy app). Free, no limit; already a favorite = no change.
Parameters
domainExample
curl -X POST "https://ecomspy.se/api/v1/favorites/berbino.com" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Remove a favorite
/api/v1/favorites/{domain}Unstar a favorite store.
Parameters
domainExample
curl -X DELETE "https://ecomspy.se/api/v1/favorites/berbino.com" \ -H "Authorization: Bearer $ECOMSPY_KEY"
Check your key
/api/v1/meThe account the API key belongs to. A quick way to check that a new key works; it needs no subscription.
Example
curl "https://ecomspy.se/api/v1/me" \ -H "Authorization: Bearer $ECOMSPY_KEY"