Emails

Query emails

Returns the advanced public emails discovery surface. This endpoint is the canonical public route for richer email filters while keeping the response aligned with the stable public EmailSummary contract. The API does not expose opens, clicks, conversions, or revenue metrics; sorting is discovery-oriented metadata ordering, not best-performance scoring.

post/v1/emails/query

Request

  • Base URL: https://api.trendtrack.io (the document declares no server; this is the origin it was published from)
  • URL: https://api.trendtrack.io/v1/emails/query
  • Auth: HTTP bearer

Request body

searchstring[]
searchType'domain' | 'email' | 'shopKeywords'

Search mode for this request. Allowed values: domain, email, shopKeywords.

keywordMode'any' | 'all'

How multiple search keywords are combined. Allowed values: any, all.

sortBy'newest' | 'oldest' | 'relevance' | 'monthlyVisits' | 'bodyLength' | 'shopEmailFrequency' | 'event' | 'promotionType'

Sort key for this request. Allowed values: newest, oldest, relevance, monthlyVisits, bodyLength, shopEmailFrequency, event, promotionType. These are discovery/indexing sorts, not opens/clicks/conversions performance rankings.

order'asc' | 'desc'

Sort direction for this request. Allowed values: asc, desc.

pagenumber
limitnumber
sentAfterstring date-time
sentBeforestring date-time
campaignTypesstring[]
languagesstring[]
promotionTypesstring[]

Stored promotion type names, matched case-insensitively (Discount %, Discount % With Threshold, Free Delivery, BOGO, Bundle Deal, No Promotion, …).

promotionTypeIdsnumber[]
categoriesstring[]

Stored email category names, matched case-insensitively (Promotional Campaign, Product Campaign, Launch Campaign, Relational Campaign, Event Campaign, Win-back Campaign, Survey).

emailCategoryIdsnumber[]
eventNamesstring[]
eventIdsnumber[]
eventCategoriesstring[]
minBodyLengthnumber
maxBodyLengthnumber
shopIdsstring[]

Stable public shop identifiers.

minMonthlyVisitsnumber
maxMonthlyVisitsnumber
trafficGrowthstring

Traffic growth filter DSL using public rolling windows. Valid periods: last30d, last90d, last180d.

minProductsCountnumber
maxProductsCountnumber
creationCountriesstring[]
excludeCreationCountriesstring[]
currenciesstring[]
shopDefaultLanguagesstring[]
mainMarketCountriesstring[]
amongMarketCountriesstring[]
excludeMarketCountriesstring[]
visitorCountriesstring[]

Alias of amongMarketCountries: matches shops with any of these countries among their markets. No separate visitor-country data is indexed.

shopCreatedAfterstring date
shopCreatedBeforestring date
technologiesstring[]

Main e-commerce platform slugs or ids (shopify, woocommerce, wordpress, magento, wix, …). Only the shop's main platform is indexed for emails; other technologies are rejected with unsupported_filter.

shopifyPlan'all' | 'plus' | 'nonPlus'

Enum value accepted by this request. Allowed values: all, plus, nonPlus.

categoryIdsnumber[]
minShopEmails90dnumber
maxShopEmails90dnumber
minAvgEmailsPerWeeknumber
maxAvgEmailsPerWeeknumber
minActiveAdsnumber
maxActiveAdsnumber
adsGrowthstring

Ads growth filter DSL using public rolling windows. Valid periods: last7d, last30d, last90d.

minTrustpilotRatingnumber
maxTrustpilotRatingnumber
minTrustpilotReviewCountnumber
maxTrustpilotReviewCountnumber

Example request

{
  "search": [
    "welcome flow",
    "discount"
  ],
  "page": 1,
  "limit": 50,
  "sentAfter": "2026-01-01T00:00:00.000Z",
  "sentBefore": "2026-01-31T23:59:59.999Z",
  "campaignTypes": [
    "Newsletter",
    "Welcome"
  ],
  "languages": [
    "english",
    "french"
  ],
  "promotionTypes": [
    "Discount %",
    "Free Delivery"
  ],
  "promotionTypeIds": [
    4,
    7
  ],
  "categories": [
    "Promotional Campaign"
  ],
  "emailCategoryIds": [
    4,
    1
  ],
  "eventNames": [
    "Black Friday"
  ],
  "eventIds": [
    2,
    9
  ],
  "eventCategories": [
    "Seasonal"
  ],
  "minBodyLength": 200,
  "maxBodyLength": 1500,
  "shopIds": [
    "3f8aa146-6f96-46e8-9781-64db5166f9a8"
  ],
  "minMonthlyVisits": 10000,
  "maxMonthlyVisits": 500000,
  "trafficGrowth": "last30d=50=greater;AND;last90d=20=lower",
  "minProductsCount": 10,
  "maxProductsCount": 500,
  "creationCountries": [
    "US",
    "FR"
  ],
  "excludeCreationCountries": [
    "CN"
  ],
  "currencies": [
    "USD",
    "EUR"
  ],
  "shopDefaultLanguages": [
    "en",
    "fr"
  ],
  "mainMarketCountries": [
    "US"
  ],
  "amongMarketCountries": [
    "CA",
    "GB"
  ],
  "excludeMarketCountries": [
    "RU"
  ],
  "visitorCountries": [
    "US",
    "GB"
  ],
  "shopCreatedAfter": "2024-01-01",
  "shopCreatedBefore": "2024-12-31",
  "technologies": [
    "shopify",
    "woocommerce"
  ],
  "categoryIds": [
    166,
    204
  ],
  "minShopEmails90d": 10,
  "maxShopEmails90d": 80,
  "minAvgEmailsPerWeek": 1.5,
  "maxAvgEmailsPerWeek": 5.2,
  "minActiveAds": 5,
  "maxActiveAds": 150,
  "adsGrowth": "last7d=40=greater",
  "minTrustpilotRating": 3.5,
  "maxTrustpilotRating": 5,
  "minTrustpilotReviewCount": 100,
  "maxTrustpilotReviewCount": 5000
}

Response

Paginated advanced emails query response. The response also includes the X-Request-Id header.

requestIdstring required

Request identifier mirrored in the X-Request-Id response header.

Example response

{
  "requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
  "data": [
    {
      "id": 123456,
      "sentAt": "2026-04-18T12:30:00.000Z",
      "campaignType": "Newsletter",
      "classification": {
        "promotionType": "Discount %",
        "promotionTypeId": 1,
        "category": "Promotional Campaign",
        "categoryId": 4,
        "event": {
          "name": "Black Friday",
          "id": 1,
          "category": "Commercial Events"
        }
      },
      "content": {
        "subject": "Up to 30% off this weekend",
        "preheader": "Limited-time offers picked for you.",
        "bodyPreview": "Shop limited-time offers picked for you before they are gone.",
        "bodyLength": 428,
        "screenshotUrl": "https://cdn.example.com/emails/123.png"
      },
      "shop": {
        "id": "3f8aa146-6f96-46e8-9781-64db5166f9a8",
        "domain": "example.com",
        "name": "Example Shop"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 235,
    "totalPages": 10
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.