Skip to main content
Glama

Search advertised products

search_products
Read-only

Search e-commerce PRODUCTS that ads lead to — the data behind the website's /shops/products page. One row = ONE product page (domain/products/handle) of ONE shop, with that product's OWN ad counters: ads = ads leading to this product among the ads Spytrend first saw in the last 180 days; ads_active = how many of them are active now; creatives, reuploads and geos; days_in_ads = days from the product's first launch to today (if something is active) or to its last launch; fb_launch_date / last_launch_date = first and last Facebook launch of the product's ads (YYYY-MM-DD); win_badge = testing (active, under 14 days in ads) | heating (active, 14-29 days) | proven (active, 30+ days and 10+ ads) | ran30 (30+ days, not proven); no badge = not active and under 30 days. price/currency come from the shop catalog (0 = no catalog). shop = the store (domain, platform, top_country, monthly visits estimate, categories). product_url is the product page on spytrend.com (link it); ads_url lists the product's ads. COUNTS ARE PER PRODUCT: never use a shop's active_ads/total_ads from search_shops/get_shop as a product's numbers — they count the WHOLE domain. Filters: q = substring of the product handle, i.e. the URL slug (lower-case words joined by dashes: 'weighted blanket' matches weighted-blanket-queen) — NOT the product title: a product sold as 'CloudAlign Pillow' may live at cloud-alignment-pillow, so when a named product is missing from the rows, retry with a shorter fragment or the compound word split by a dash ('cloudalign' -> 'cloud-align'), or domain= when the shop is known; country = ISO-2 codes (comma separated) of the SHOP's main visitor country, not of the ads — never present it as the country the ads run in; ai_category = Spytrend AD category slugs (comma separated); site_category = estimated site category slug; platform = commerce platform of the shop (comma separated, e.g. Shopify); domain = exact shop domains (comma separated) — use it for 'products of this shop'; active_only=true = only products with an active ad now; win_badge = comma separated badges; date_from/date_to (YYYY-MM-DD) = window of Facebook launches ('launched/advertised during a period'): a product matches when one of its ads launched inside the window, and ads_in_period is the number of such launches — this includes old products that relaunched an ad in the window. first_seen_from (YYYY-MM-DD) = only products whose FIRST Facebook launch (fb_launch_date) is on or after that date: for 'first seen / new products / started advertising in the last N days and still active' pass first_seen_from= + active_only=true (do not rely on date_from alone); total then counts only such products (if the result has filter_note, the tool filtered the API pages itself and total is just the number of returned rows). win_badge=testing is the site's badge for 'active, under 14 days in ads'. min_price/max_price filter the catalog price; min_ads/max_ads filter the product's own ads count. sort_by: ads (default), ads_active, ads_in_period (needs a date window), price, visits (shop traffic), score (Winning Products: days x creatives x geos x reuploads). Returns total (the number of matching products — quote it as the number found; the rows are only the first limit of them), has_more, offset and data_through (last day the data is computed for; a date window is cut at it). Rows with access=teaser have their ad counters blanked by the plan. FREE PLAN COUNTS: when the plan's archive window narrows a request, pagination.total_status is "restricted" and meta.plan_window_cutoff names the boundary — the count then describes the window actually searched, NOT the one requested, so a zero means "nothing in the archive window" and never "nothing exists". QUOTA: 1 token per DELIVERED result from your plan balance (free starter: 500 tokens lifetime; paid plans: 40,000/month; short pages auto-refund — you pay only for results you receive). Default page is 20 results = 20 tokens; pass limit (1–200) to size it. get_usage is free. Autonomous agents must be linked to a spytrend account to access data — an unlinked agent gets an actionable connect-your-account refusal (create agent credentials at spytrend.com/settings?tab=ai, or a human claims it by client_id), NOT a server error. Calls are rate-limited per authenticated user (deployment defaults: 60/minute and 1000/hour); a rate-limit refusal is an MCP tool error with structured error.code=rate_limit_exceeded, scope, window and retry_after_seconds. CONCURRENCY: heavy analytical calls (get_trends, search_ads, search_creatives) are admitted ONE AT A TIME per account — fanning out 5-10 of them in parallel does not go faster, it returns admission refusals for all but one. Issue heavy calls sequentially; light lookups (get_ad, get_advertiser, get_usage) are not gated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNosubstring of the product handle (URL slug): words in lower case joined by dashes, e.g. 'weighted blanket' matches weighted-blanket-queen. Not a shop name and not a free-text search of ad copy.
limitNomax results (default 20; each delivered result costs 1 token).
domainNoexact shop domains, comma separated — products of these shops only (e.g. 'mellowsleep.com')
offsetNopagination offset (0-based)
countryNoISO-2 codes, comma separated: keep products of shops whose MAIN visitor country is one of them (not the countries the ads ran in)
date_toNowindow of Facebook launches, end YYYY-MM-DD
max_adsNomaximum number of ads of the product itself (180 days)
min_adsNominimum number of ads of the product itself (180 days)
sort_byNoorder by: ads (default, descending), ads_active, ads_in_period (needs date_from/date_to), price, visits (shop traffic) or score (Winning Products)
platformNocommerce platform of the shop, comma separated: Shopify, WooCommerce, WordPress, Wix, Squarespace, Magento, PrestaShop or BigCommerce
date_fromNowindow of Facebook launches, start YYYY-MM-DD: products with an ad launched inside the window (old products that relaunched included); rows then carry ads_in_period. For 'first seen in the last N days' use first_seen_from instead
max_priceNomaximum catalog price (shop currency)
min_priceNominimum catalog price (shop currency); products without a catalog price drop out
win_badgeNocomma separated Winning Products badges: testing (active, under 14 days in ads), heating (active, 14-29 days), proven (active, 30+ days and 10+ ads), ran30 (30+ days, not proven)
active_onlyNotrue = only products with at least one active ad now
ai_categoryNoSpytrend AD category slugs, comma separated (e.g. ecommerce_and_retail,beauty_and_cosmetics)
site_categoryNoestimated site category slug of the shop (comma separated); may be missing or wrong, ai_category is better for ad-market discovery
first_seen_fromNoYYYY-MM-DD: only products whose FIRST Facebook launch (fb_launch_date) is on or after this date — use it for 'first seen / started advertising in the last N days' (date_from alone also returns old products that merely launched another ad in the window). total counts only such products.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorNoPresent only when isError is true: machine-readable failure. The human explanation stays in content.
totalNo
offsetNo
paramsNoRequest parameter echo: applied = parameters that shaped this result; normalized = parameters rewritten before applying (alias, type coercion, resolved id); ignored = parameters that were accepted but NOT applied, with the reason.
has_moreNo
filter_noteNo
period_axisNo
data_throughNo
scanned_rowsNo
country_basisNo
first_seen_fromNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Far exceeds the readOnly/openWorld annotations: it discloses quota mechanics (1 token per delivered result, 500 lifetime free / 40,000 monthly paid), rate limits (60/min, 1000/hr with structured error.code), the concurrency admission gate, teaser-row blanking, and the free-plan archive window that makes a zero mean 'nothing in window'. These are exactly the operational traits an agent cannot infer from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and row semantics before filters, and nearly every sentence carries decision-relevant information. However, the block is extremely dense and long, packing quota, concurrency and plan-window details into one paragraph, which costs some scannability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter, open-world search tool it covers the critical gaps: count semantics per product, pagination behavior, the restricted-total edge case, and the filtering caveat when filter_note is present. An output schema exists, yet the description still clarifies the meaning of total/has_more/data_through where it affects interpretation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description adds genuine semantics beyond the schema: the q slug-matching retry strategy ('cloudalign' -> 'cloud-align'), the warning that country is the SHOP's visitor country not the ads' country, the date_from vs first_seen_from distinction with the relaunch caveat, and the composition of sort_by=score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb+resource ('Search e-commerce PRODUCTS that ads lead to') and anchors it to a concrete data model ('one row = ONE product page of ONE shop'). It explicitly differentiates from siblings by warning not to use a shop's counts from search_shops/get_shop as product numbers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use routing: first_seen_from + active_only for 'new products', domain= for 'products of this shop', and a retry heuristic when a named product is missing from q results. It names the alternative tools (search_shops, get_shop) and states the condition that selects them.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.