Usar Trendtrack con n8n
Conecta la API pública de Trendtrack al nodo HTTP Request de n8n: configuración, recetario de endpoints y diez flujos listos para importar.
n8n's HTTP Request node is enough to drive the entire Trendtrack public API. There is no custom node — you authenticate with a Bearer header, hit https://api.trendtrack.io/v1/..., and pipe the JSON into Slack, Discord, Notion, Sheets, Airtable, HubSpot, or any other n8n destination.
This guide gives you:
- A working setup: API key, n8n credential, first authenticated call, credit-budget visibility.
- An endpoint cookbook: one mini-recipe per resource family, with the exact HTTP node configuration.
- A gallery of ten importable workflows covering daily creative monitoring, scaling alerts, shop discovery, email watch, and on-demand brand 360 reports.
Setup
Enable Public API access on the workspace and create a workspace-scoped API key. The button lives in workspace settings — see Authentication for the full key-issuance and rotation policy.
Add an HTTP Request node to your n8n canvas. From the node search, type "HTTP" and pick HTTP Request.
For one-off HTTP Request nodes, create a Header Auth credential in n8n: name it Trendtrack public API, set the header to Authorization and the value to Bearer YOUR_API_KEY. The downloadable workflows below instead use TRENDTRACK_API_KEY as an environment variable so they can be imported without bundled credentials.
Verify the credential with a zero-credit call to GET /v1/me. If the response contains your workspace, you're wired up.
Inspect the response Headers tab to confirm X-Request-Id is returned. Metered endpoints additionally surface X-Credits-Used, X-Credits-Remaining, and X-Credits-Source. Use these values to monitor budget and to quote a request ID when you contact support.
Optional but recommended: store the key as the n8n environment variable TRENDTRACK_API_KEY and reference it with ={{ $env.TRENDTRACK_API_KEY }} in the credential. The downloadable workflows below all assume this variable exists.
What a healthy first call looks like
curl -s "https://api.trendtrack.io/v1/me" \
-H "Authorization: Bearer $TRENDTRACK_API_KEY"{
"data": {
"credential": {
"id": "cred_01HZ…",
"name": "n8n production",
"accessLevel": "workspace",
"createdAt": "2026-04-12T10:22:31.000Z"
},
"workspace": {
"id": "ws_01HZX0W3YJABCDEF",
"slug": "acme-growth",
"name": "Acme Growth"
}
},
"requestId": "req_01HZ…"
}Shell endpoints (/v1/me, /v1/workspace, /v1/usage, /v1/health) are unmetered — they're the safest way to validate authentication and resolve workspace context before running metered loops. See Getting Started for the full bootstrap sequence and Errors for the error envelope you'll match against in n8n's IF nodes.
Endpoint cookbook
Every recipe below is a single HTTP Request node. They are intentionally minimal — combine them with n8n's Set, Function, Split In Batches, and IF nodes to build the complete workflows in the gallery.
1. Discovery — POST /v1/ads/query
Advanced ad search. Use it for niche-keyword scouting, reach thresholds, and date-bounded queries.
- Method: POST
- URL:
https://api.trendtrack.io/v1/ads/query - Body Content Type: JSON
- Pagination:
page+limit(max 100); 1 credit per returned row.
{
"search": ["serum"],
"searchType": "adCopy",
"sortBy": "reach",
"order": "desc",
"status": "active",
"minReach": 50000,
"reachPeriod": "last7d",
"adsTimePeriod": "last30d",
"limit": 25,
"page": 1
}The response carries { data, pagination, requestId }. pagination.totalPages tells you when to stop a Split In Batches loop.
2. Brand resolution — GET /v1/lookup
Zero-credit identifier resolution. Always call this first when you have a user-supplied brand name, domain, Instagram handle, or Facebook page id and need a stable Trendtrack identifier.
- Method: GET
- URL:
https://api.trendtrack.io/v1/lookup - Query parameters:
q(required, 2–200 chars),type(auto|brandtracker|advertiser|shop),limit(1–10).
curl -s "https://api.trendtrack.io/v1/lookup?q=allbirds.com&type=auto" \
-H "Authorization: Bearer $TRENDTRACK_API_KEY"The response gives you brandtracker.id, advertiser.id, and shop.id for the matched brand. Carry those identifiers downstream.
3. Brandtracker folders — GET /v1/workspace/folders
Folders group the brandtrackers you track. Several aggregate endpoints accept folderIds to scope a query to a folder (e.g. "skincare clients" vs "supplements clients"). Resolve folder ids once, cache them in n8n, then pass them as repeated query params or a comma-separated list.
- Method: GET
- URL:
https://api.trendtrack.io/v1/workspace/folders - Cost: unmetered.
folderIds is currently honored on /v1/workspace/hooks, /v1/workspace/ad-copies, /v1/workspace/landing-pages, /v1/workspace/media-mix, and /v1/brandtrackers. It is not accepted on the canonical /v1/workspace/top-ads ranking endpoint today — for folder-scoped rankings or rank movers, the recommended pattern is to call /v1/workspace/top-ads and filter the response client-side on brandtracker.folderId. (/v1/workspace/scaling-ads is a legacy compatibility endpoint that still accepts folderIds; new integrations should prefer /v1/workspace/top-ads?sortBy=rankDelta7d + client-side filtering.)
4. Workspace top creatives — GET /v1/workspace/top-ads
Canonical current-ranking endpoint across every active brandtracker in the workspace, in a single metered call. Use it as the spine of any "what's working right now" dashboard.
- Method: GET
- URL:
https://api.trendtrack.io/v1/workspace/top-ads - Query parameters:
page,limit(max 100),sortBy,euOnly,includeInactive. sortByvalues:currentRank— current Facebook page rank.reach,reachDelta1d,reachDelta7d,reachDelta30d— reach rankings (impressionsis an accepted alias forreach).rankDelta7d,rankDelta14d,rankDelta30d— rank movers (use these for scaling alerts).
curl -s "https://api.trendtrack.io/v1/workspace/top-ads?sortBy=reachDelta1d&limit=10" \
-H "Authorization: Bearer $TRENDTRACK_API_KEY"period and snapshotDate are deprecated on this endpoint and ignored — drive everything from sortBy. See Time windows for the full picture.
5. Hooks, ad copies, landing pages — /v1/workspace/{hooks,ad-copies,landing-pages}
Aggregated creative analytics across the workspace. Same query-param shape on all three.
- Query parameters:
page,limit,folderIds(optional, comma-separated or repeated), and endpoint-specific time controls. - Cost: 1 credit per returned row.
curl -s "https://api.trendtrack.io/v1/workspace/hooks?folderIds=fold_skincare,fold_supplements&limit=20" \
-H "Authorization: Bearer $TRENDTRACK_API_KEY"6. Shops discovery — POST /v1/shops/query
Find Shopify-style shops by category, technology, market, traffic, and ad activity. This is the broader cousin of /v1/ads/query — instead of returning ads, it returns the shops that run them.
- Method: POST
- URL:
https://api.trendtrack.io/v1/shops/query - Pagination:
offset+limit(offset-based, not page-based).
{
"search": "skincare",
"searchType": "productName",
"sortBy": "activeAds",
"order": "desc",
"adsTimePeriod": "last30d",
"minActiveAds": 10,
"mainMarketCountries": ["FR"],
"technologies": ["shopify"],
"limit": 25,
"offset": 0
}Resolve filter values (categories, technologies, pixels, Shopify apps) ahead of time via /v1/facets/* (see recipe 10).
7. Shop intelligence — GET /v1/shops/{shopId}/...
Once you have a shopId (from /v1/lookup or /v1/shops/query), the per-shop endpoints unlock product, social, advertiser, and email history.
GET /v1/shops/{shopId}/products?sortBy=popularity&limit=10— best-sellers.GET /v1/shops/{shopId}/socials/history?period=day&days=90— Facebook/Instagram follower time-series.GET /v1/shops/{shopId}/similar— adjacent shops to expand prospecting.GET /v1/shops/{shopId}/advertisers— Facebook pages running ads for this shop.GET /v1/shops/{shopId}/emails?sentAfter=2026-04-01— recent email campaigns from this shop.
Each endpoint is metered per returned row.
8. Email campaigns — POST /v1/emails/query
Workspace-wide promotional email discovery. Useful for tracking competitor campaigns, sale calendars, and launch cadence.
{
"search": ["sale", "black friday"],
"searchType": "subject",
"keywordMode": "any",
"shopifyPlan": "plus",
"minMonthlyVisits": 50000,
"limit": 25,
"page": 1
}9. Advertiser-level discovery — POST /v1/advertisers/query
Rank Facebook pages directly — useful when you want a "most active in my vertical" leaderboard rather than ad-by-ad analytics.
- Sort options:
relevance,newest,activeAds,newAds,euAdsShare,reach,reach14d,followers.
10. Facets — GET /v1/facets/{categories,technologies,pixels,shopify-apps}
Zero-credit lookups that resolve human-readable filter inputs to the stable ids that /shops/query, /ads/query, etc. expect.
- Pagination:
offset+limit(defaults to 100, max 500). - Use the optional
searchquery parameter to narrow results before pulling them.
curl -s "https://api.trendtrack.io/v1/facets/categories?search=skin&limit=10" \
-H "Authorization: Bearer $TRENDTRACK_API_KEY"Workflow gallery
Each workflow ships as a single n8n JSON file at /integrations/n8n/workflows/<file>.json. Import via Workflows → Import from File in n8n, set the TRENDTRACK_API_KEY environment variable, then connect any destination credentials required by the workflow (Slack, Discord, Notion, Google Sheets, Gmail, etc.) before activating.
The downloadable files are sanitized examples: they are inactive by default, do not include local n8n workflow ids, do not include pin data, and use placeholder destination ids such as C0123456789, YOUR_GOOGLE_SHEET_ID, or YOUR_NOTION_DB_ID that you must replace.
TRENDTRACK_API_KEY=tt_live_...If you cannot use n8n environment variables, open each Trendtrack HTTP Request node and replace the Authorization header expression with Bearer YOUR_API_KEY.
Folder param contract
Several gallery workflows start from a tracked brandtracker folder. In those workflows, edit the first Set Parameters node and replace folderName = Demo with the folder name you use in Trendtrack.
- n/a — the workflow is per-brand or utility-only; folder scoping doesn't apply.
- Optional folder — defaults to the whole workspace unless you add filtering.
- Mandatory folder — the workflow loops over a Trendtrack folder; set
folderNamebefore the first run.
1 — Daily top viral ads → Slack
Posts the biggest daily reach movers from your workspace into a Slack channel.
- Trigger: Cron, daily.
- Endpoint:
GET /v1/workspace/top-adswithsortBy=reachDelta1dand configurablelimit. - Folder param: n/a in the exported workflow.
- Setup: Slack credential,
slackChannelId, optionallimitandsortByin Set Parameters. - Cost: about 1 credit per returned ad.
- Download:
01-daily-viral-ads.json.
2 — Brand lookup → Webhook
Utility workflow exposed as an n8n webhook. POST a brand name, domain, Instagram handle, or page id and get back the resolved Trendtrack identifiers.
- Trigger: Webhook,
POST /webhook/trendtrack-brand-lookup. - Endpoint:
GET /v1/lookup?q={query}&type=auto. - Folder param: n/a.
- Setup: call the webhook with
{ "q": "allbirds.com" },{ "query": "Cosrx" }, or{ "brand": "Cosrx" }. - Cost: 0 credits.
- Download:
02-brand-lookup.json.
3 — New ads of brandtracker folder → Discord
Polls the brandtrackers in a folder, fetches recent ads for each brand, filters by reach, and posts matching ads to Discord.
- Trigger: Cron, every 6 hours in the export.
- Endpoints:
GET /v1/brandtrackers?folderName=..., thenGET /v1/brandtrackers/{id}/ads. - Folder param: mandatory. Replace
folderName = Demoin Set Parameters. - Setup: Discord credential,
discordGuildId,discordChannelId,reachThreshold,lookbackHours, and max-run guards. - Cost: 1 credit per returned ad before filtering.
- Download:
03-new-ads-folder.json.
4 — Weekly creative brief → Notion
Builds a weekly markdown digest from the workspace's top ads, hooks, and ad copies, then creates a Notion page.
- Trigger: Cron, weekly.
- Endpoints:
GET /v1/workspace/top-ads,GET /v1/workspace/hooks,GET /v1/workspace/ad-copies. - Folder param: n/a in the exported workflow.
- Setup: Notion credential,
notionDatabaseId, andlimitin Set Parameters. - Cost: roughly
limit × 3credits per run. - Download:
04-weekly-creative-brief.json.
5 — Scaling ads alert → Slack
Alerts you on Slack when an ad climbs in rank — the canonical "something is taking off" signal.
- Trigger: Cron, daily.
- Endpoint:
GET /v1/workspace/top-adswithsortBy=rankDelta7d. - Folder param: n/a in the exported workflow.
- Setup: Slack credential,
slackChannelId,minRankDelta,topRankThreshold, andlimit. - Cost: about 1 credit per returned ad.
- Download:
05-scaling-alert.json.
6 — Daily top hooks library → Notion
Maintains a Notion database of top-performing hooks across the workspace.
- Trigger: Cron, daily in the export.
- Endpoint:
GET /v1/workspace/hookswith configurablelimit. - Folder param: n/a in the exported workflow.
- Setup: Notion credential,
notionDatabaseId, and target database properties matching the exported mapping. - Cost: 1 credit per returned hook.
- Download:
06-top-hooks.json.
7 — Shop discovery → Notion candidates
Fresh prospecting workflow: resolve a category, query matching shops, filter candidates, and save them to Notion.
- Trigger: Manual trigger in the export.
- Endpoints:
GET /v1/facets/categories?search=..., thenPOST /v1/shops/query. - Folder param: n/a.
- Setup: Notion credential,
categorySearch,country,minActiveAds,limit, andnotionDatabaseId. - Cost: 1 credit per returned shop.
- Download:
07-shop-discovery.json.
8 — Competitor email watch → Slack
For every brandtracker in a folder, resolves the primary shop, fetches recent emails since the last run, and posts new campaigns to Slack.
- Trigger: Cron, daily.
- Endpoints:
GET /v1/brandtrackers?folderName=...,GET /v1/lookup/facebook-shop, thenGET /v1/shops/{shopId}/emails. - Folder param: mandatory. Replace
folderName = Demoin Set Parameters. - Setup: Slack credential,
slackChannelId,maxBrandsPerRun,maxEmailsPerBrand. The workflow uses n8n static data to persistlastEmailCheckAt. - Cost: 1 credit per returned email.
- Download:
08-competitor-email-watch.json.
9 — IG follower tracker → Google Sheets
Daily follower tracking for each brandtracker in a folder, appended to Google Sheets, with an optional Slack spike alert.
- Trigger: Cron, daily.
- Endpoints:
GET /v1/brandtrackers?folderName=...,GET /v1/lookup/facebook-shop, thenGET /v1/shops/{shopId}/socials/history. - Folder param: mandatory. Replace
folderName = Demoin Set Parameters. - Setup: Google Sheets credential,
googleSheetId,googleSheetTab, optional Slack credential andslackChannelId,deltaAlertPct, andmaxBrandsPerRun. - Cost: about 2 credits per brand per run at the default history window.
- Download:
09-ig-follower-tracker.json.
10 — Brand 360 report → Notion + Email
On-demand brand report. Fire a webhook with a brand name; the workflow fans out across lookup, overview, top ads, scaling ads, hooks, landing pages, and media mix, then creates a Notion report and emails the link back.
- Trigger: Webhook,
POST /webhook/trendtrack-brand-report. - Endpoints:
GET /v1/lookup,/v1/brandtrackers/{id}/overview,/top-ads,/scaling-ads,/hooks,/landing-pages,/media-mix. - Folder param: n/a.
- Setup: Notion credential, Gmail credential,
notionDatabaseId, and webhook body fields such as{ "brandName": "Cosrx", "recipientEmail": "team@example.com" }. - Cost: depends on the configured limits across each report section.
- Download:
10-brand-360.json.
Cost & rate limits
Every metered endpoint consumes one credit per returned row. The relevant headers on every metered response:
X-Credits-Used— credits consumed by this request.X-Credits-Remaining— balance after the call.X-Credits-Source—recurring,topup, orhybrid.X-Request-Id— quote when contacting support.
A few practical guards while iterating in n8n:
- Start every recipe with
limit: 5–10and only raise it once the workflow shape is stable. A loop bug atlimit: 100burns the workspace. - Pin a daily budget by reading
X-Credits-Remainingin anIFnode and breaking the loop below a threshold. - Pagination is page-based (
page+limit) on most endpoints, offset-based (offset+limit) onPOST /v1/shops/queryand the/v1/facets/*endpoints. Stop paginating when the response returns fewer rows thanlimit.
See Credits & Billing for the full consumption model and Rate Limits for 429/Retry-After handling.
Going further
The same patterns apply to Make.com and Zapier — both have a generic HTTP module with Bearer auth, identical body shapes, and similar pagination handling.
For agentic workflows (LLM calls that browse the API live), point your agent at the Trendtrack Agent Guide — it carries machine-friendly summaries of every public endpoint, the enum cheatsheet, and the canonical agent traps to avoid.
FAQ
My calls return 401 missing_api_key from n8n but curl works.
Double-check that the Header Auth credential header name is Authorization (not X-API-Key or Authorization-Bearer) and that the value is Bearer <key> with a space, not just the key. n8n trims newlines but not extra prefixes.
How do I paginate cleanly?
Use a Split In Batches loop with the page index, increment until pagination.totalPages is reached, and break early when the returned data.length < limit. For /v1/shops/query and /v1/facets/*, increment offset by limit instead.
I'm hitting 429 rate_limited.
Read the Retry-After response header and feed it into a Wait node. Public endpoints are tiered (heavier endpoints have lower per-credential rate caps); see Rate Limits for the exact tiers.
What's the difference between /v1/brandtrackers/{id}/... and /v1/workspace/...?
Brandtracker endpoints scope to a single tracked brand. Workspace endpoints aggregate across every active brandtracker in the workspace in a single metered call — preferred whenever you'd otherwise loop over brandtrackers and concatenate the results.
Can I filter /v1/workspace/top-ads by folder?
Not natively today. The recommended pattern is to call /v1/workspace/top-ads and filter the response client-side on brandtracker.folderId — applies to current rankings (sortBy=currentRank/reach) and to rank movers (sortBy=rankDelta7d/14d/30d) alike. The legacy /v1/workspace/scaling-ads endpoint still accepts folderIds if you need server-side filtering today, but new integrations should standardize on /v1/workspace/top-ads.
Next steps
The full bootstrap sequence with response samples and credit-tracking patterns.
Header format, key rotation, and what Trendtrack validates on every request.
Metered behavior, monthly refill, carry-over, and response headers.
Throttling behavior and Retry-After handling.
Current ranking sort keys vs historical analytics windows.
Resource-by-resource operation reference with request and response samples.
Solución de problemas
Diagnostica rápidamente errores comunes de autenticación, facturación, límite de tasa y forma de la solicitud.
Usar Trendtrack con Claude
Conecta Claude a la API pública de Trendtrack mediante el endpoint MCP remoto de Trendtrack para analizar en vivo marcas, anuncios, tiendas y datos del espacio de trabajo.