competitivetracker.intelligence.brand

class competitivetracker.intelligence.Brand(base_uri, api_key, transport_class=<class 'competitivetracker.base.RequestsTransport'>)
get_top_domains(brandId, **kwargs)

Find sending volumes (commercial and non-commercial) within the past 30 days, for a given Brand.

Parameters

brandId (int) – (Required) The Brand ID to get top sending domains for

Returns

A list of object dict containing top domains and volume details.

competitivetracker.intelligence.campaign

class competitivetracker.intelligence.Campaign(base_uri, api_key, transport_class=<class 'competitivetracker.base.RequestsTransport'>)
get_campaign(campaignId, **kwargs)

Gets a campaign by id if found. Detected sending or forwarding IPs are accessible via the sendingIps embed option.

Parameters
  • campaignId (int) – (Required) The id of the campaign you wish to evaluate

  • embed (str) –

    The objects within the return model you wish to embed in the form of ‘customer, customer.name, etc’

    Accepts: sendingIps, rawEmail, ispPlacements, links, headers (headers is only available for ESP-owned accounts).

Returns

A dict object containing campaign details.

get_target_country(campaignId, **kwargs)

Returns (or evaluates from scratch, for historical campaigns) the likely target country in the form of an ISO 3166-1 alpha-2 String. (Examples: US, CA, MX).

Parameters

campaignId (int) – (Required) The id of the campaign you wish to evaluate.

Returns

A dict object containing likely target country.

competitivetracker.intelligence.domain

class competitivetracker.intelligence.Domain(base_uri, api_key, transport_class=<class 'competitivetracker.base.RequestsTransport'>)
get_average_volume_per_campaign(domain, **kwargs)

Find the average campaign volume for a domain over a given time period

Parameters
  • domain (str) – (Required) The domain to use in the request

  • qd (str) –

    A date range query parameter.

    Accepts: since:YYYYMMDD, between:YYYYMMDDhhmmss,YYYYMMDDhhmmss, and daysBack:N.

    Examples: since:20190601, between:20191001000000,20191002060000, daysBack:30

    Defaults to daysBack:28

Returns

A str of average campaign volume

get_campaigns(domain, **kwargs)

Search for campaigns from a certain sending domain. Detected sending or forwarding IPs are accessible via the sendingIps embed option.

Parameters
  • domain (str) – (Required) The domain to use in the request

  • qd (str) –

    (Required) A date range query parameter.

    Accepts: since:YYYYMMDD, between:YYYYMMDDhhmmss,YYYYMMDDhhmmss, and daysBack:N.

    Examples: since:20190601, between:20191001000000,20191002060000, daysBack:30

  • campaignLengthFilter (str) –

    Length filter in days for the campaign

    Examples: >,2, <,5, =,1

  • page (int) – The page to query for in pagination

  • per_page (int) – The amount of records per page you wish to query for (max 100)

  • order (str) –

    The property to sort by (‘property’ for descending, ‘-property’ for ascending)

    Accepts: firstSeen, -firstSeen, lastSeen, -lastSeen, inbox, -inbox, spam, -spam

  • embed (str) –

    The objects within the return model you wish to embed in the form of ‘customer,customer.name,etc’

    Accepts: sendingIps, rawEmail, ispPlacements, links, headers (headers is only available for ESP-owned accounts).

Returns

A list of object dict containing campaign details.

get_campaigns_per_week(domain, **kwargs)

Find the campaign average per week for given domain

Parameters
  • domain (str) – (Required) The domain to use in the request

  • startDate (str) –

    Start date for the query. Formatted as YYYYMMDD

    Defaults to now.

  • weeksBack (int) –

    How many weeks to look back prior to startDate or now

    Defaults to 4

Returns

A str of average campaigns

get_dow_avg_volume(domain, **kwargs)

Find average sending volumes (commercial and non-commercial) broken down by day of week within a date for a given domain.

Parameters
  • domain (str) – (Required) The domain to use in the request

  • qd (str) –

    A date range query parameter.

    Accepts: since:YYYYMMDD, between:YYYYMMDDhhmmss,YYYYMMDDhhmmss, and daysBack:N.

    Examples: since:20190601, between:20191001000000,20191002060000, daysBack:30

    Defaults to daysBack:30

  • embed (str) –

    The objects within the return model you wish to embed in the form of ‘customer, customer.name, etc’

    Accepts: ispPlacements

Returns

A list of object dict containing volume details.

get_isp_placements(domain, **kwargs)

Find ISP placements statistics within a date for a given domain

Parameters
  • domain (str) – (Required) The domain to use in the request

  • qd (str) –

    (Required) A date range query parameter.

    Accepts: since:YYYYMMDD, between:YYYYMMDDhhmmss,YYYYMMDDhhmmss, and daysBack:N.

    Examples: since:20190601, between:20191001000000,20191002060000, daysBack:30

Returns

A list of object dict containing ISP deliverability metrics.

get_total_volume(domain, **kwargs)

Find the total sending volume (commercial and non-commercial) within a date for a given domain.

Parameters
  • domain (str) – (Required) The domain to use in the request

  • qd (str) –

    A date range query parameter.

    Accepts: since:YYYYMMDD, between:YYYYMMDDhhmmss,YYYYMMDDhhmmss, and daysBack:N.

    Examples: since:20190601, between:20191001000000,20191002060000, daysBack:30

    Defaults to daysBack:30

  • embed (str) –

    The objects within the return model you wish to embed in the form of ‘customer, customer.name, etc’

    Accepts: ispPlacements

Returns

A dict containing volume details

get_volumes(domain, **kwargs)

Find sending volumes (commercial and non-commercial) within a period, for a given domain. Collected into date groups based on days in date range: “DAY” for 31 days and less, “WEEK” for 182 days and less, “MONTH” for greater than 182 days.

Parameters
  • domain (str) – (Required) The domain to use in the request

  • qd (str) –

    (Required) A date range query parameter.

    Accepts: since:YYYYMMDD, between:YYYYMMDDhhmmss,YYYYMMDDhhmmss, and daysBack:N.

    Examples: since:20190601, between:20191001000000,20191002060000, daysBack:30

  • embed (str) –

    The objects within the return model you wish to embed in the form of ‘customer, customer.name, etc’

    Accepts: ispPlacements

Returns

A list of object dict containing sending volume details

competitivetracker.intelligence.ipdeliverability

class competitivetracker.intelligence.IpDeliverability(base_uri, api_key, transport_class=<class 'competitivetracker.base.RequestsTransport'>)
get_agg_stats_for_range(startingIpAddress, **kwargs)

Get the aggregate deliverability statistics (only commercial) for a range of sending IP addresses, and the specified filters.

Parameters
  • startingIpAddress (str) – (Required) The starting ip address to view results for

  • qd (str) –

    (Required) A date range query parameter.

    Accepts: since:YYYYMMDD, between:YYYYMMDDhhmmss,YYYYMMDDhhmmss, and daysBack:N.

    Examples: since:20190601, between:20191001000000,20191002060000, daysBack:30

  • lastBlock (str) – The last block of the range to request (last octet for IPv4 or last hextet in IPv6, max 256 return IPs)

  • embed (str) –

    The objects within the return model you wish to embed in the form of ‘customer, customer.name, etc’

    Accepts: ispPlacements

Returns

A dict object containing deliverability and volume details.

get_deliverability_stats(sendingIpAddress, **kwargs)

Get the IP deliverability statistics (only commercial) for a sending IP address, and the specified filters

Parameters
  • sendingIpAddress (str) – (Required) The ip address to view results for.

  • qd (str) –

    (Required) A date range query parameter.

    Accepts: since:YYYYMMDD, between:YYYYMMDDhhmmss,YYYYMMDDhhmmss, and daysBack:N.

    Examples: since:20190601, between:20191001000000,20191002060000, daysBack:30

Returns

A dict object containing deliverability stats.

get_deliverability_stats_for_range(startingIpAddress, **kwargs)

Get the per-IP deliverability statistics (only commercial) for a range of sending IP addresses, and the specified filters

Parameters
  • startingIpAddress (str) – (Required) The starting ip address to view results for

  • qd (str) –

    (Required) A date range query parameter.

    Accepts: since:YYYYMMDD, between:YYYYMMDDhhmmss,YYYYMMDDhhmmss, and daysBack:N.

    Examples: since:20190601, between:20191001000000,20191002060000, daysBack:30

  • lastBlock (str) – The last block of the range to request (last octet for IPv4 or last hextet in IPv6, max 256 return IPs)

Returns

A list of object dict containing deliverability and reputation stats.