EmailmoversMyDataHub docs
Browse the docs

Reference / MCP tool reference

Reference

Count an audience

count_audience: Counts UK contacts and companies matching an audience, inline or a saved aud_ id, and returns Total, New to you and Emailable, up to three breakdowns, quality, the compliance summary, a price estimate and a count id.

Generated from the contractsView as Markdown

Counts UK contacts and companies matching an audience, inline or a saved aud_ id, and returns Total, New to you and Emailable, up to three breakdowns, quality, the compliance summary, a price estimate and a count id. Use it whenever a filter changes, and before preview_records or quote_order, which both take the count id. Free and needs no account; anonymous and trial callers see counts under 100 and breakdown cells rounded to the nearest 5 (disclosure says which), and exact small counts need a paid plan. It returns no contact details, and over MCP a cross-tab holds at most 200 cells (truncated true; GET /v1/counts/{id} has the rest). Lawful basis is UK GDPR Article 6(1)(f) legitimate interests; email audiences include corporate subscribers only by default (PECR), so sole traders and ordinary partnerships are left out unless the toggle is changed.

PropertyValue
Tool namecount_audience
Position in tools/list8 of 22
CostFree
ScopeNone. Works without an account.
AnnotationsreadOnlyHint true, destructiveHint false, idempotentHint true, openWorldHint false
KindRead only; idempotent, not destructive, closed world
REST equivalentPOST /v1/counts

Input

The schema sets additionalProperties to false, so a member that is not listed is refused.

MemberTypeRequiredDescription
audiencestring or AudienceyesAn audience definition (mydatahub.audience/1) inline, or the aud_ id of a saved audience.
levelenum: contact, companynocontact (the default) or company. Contacts and companies come back together either way. Default contact.
breakdown_byarray of enum: company.sic_2007, company.business_class, company.employee_band, company.turnover_band, company.fleet_band, company.type, company.status, company.subscriber_class, and 11 morenoUp to three fields to break the count down by, each once, such as industry by seniority by region. Returns the top 50 cells per field plus other.

Example call

The params of a tools/call request:

{
  "name": "count_audience",
  "arguments": {
    "audience": {
      "schema": "mydatahub.audience/1",
      "dataset": "uk_contacts",
      "where": {
        "all": [
          {
            "field": "contact.title",
            "op": "matches",
            "terms": ["marketing manager"],
            "mode": "contains"
          },
          {
            "field": "contact.job_level_rank",
            "op": "in",
            "values": [1, 2, 3, 4, 5, 6, 8, 9]
          },
          {
            "field": "company.sic_2007",
            "op": "in",
            "values": ["C"]
          },
          {
            "field": "company.employee_band",
            "op": "gte",
            "value": "50-99"
          },
          {
            "field": "site.location",
            "op": "within_radius",
            "centre": {
              "place": "Leeds"
            },
            "radius_miles": 20
          },
          {
            "not": {
              "field": "email.address_sha256",
              "op": "in_list",
              "list_id": "sup_01JB4H7Q2V7XN3M9R6T1Y5W8ZA"
            }
          }
        ]
      }
    },
    "level": "contact",
    "breakdown_by": ["contact.job_level_rank"]
  }
}

Output

The result carries structuredContent that matches this schema, and one line of text that leads with the number.

MemberTypeAlways presentDescription
idstringyesFormat: a count id: cnt_ followed by 20 base32 characters (A to Z and 2 to 7), such as cnt_7K2PQ4MAXN3R6TBY5WDZ.
datasetenum: uk_contacts, ie_contacts, global_contactsyesThe dataset an audience draws from. uk_contacts is live; ie_contacts and global_contacts are listed but not yet served.
dataset_versionstringyesThe immutable weekly build a count is bound to, such as 2026-W39. The last 52 stay queryable.
engine_rules_versionstringyesThe engine rules (title expansion, defaults, geography sets) the count ran under; part of what the count id hashes, such as 2026.09.1.
as_ofstring (date)noThe date the dataset version was built, for as-of statements.
levelenum: contact, companynocontact (the default) or company. Contacts and companies come back together either way.
credits_per_recordnumber (0 or more)yesCredits, to one decimal place: whole at 1 credit a record, fractional only where a rule is (0.1 company-only, 1.8 outright, both proposed).
contactsinteger (0 or more)yesTotal: every matching contact.
companiesinteger (0 or more)yes
emailableinteger (0 or more)yesA named email scoring 70 or more at a corporate subscriber.
new_to_youinteger (0 or more) or nullyesExcludes your earlier orders and CRM overlap; null when signed out.
premiuminteger (0 or more) or nullyesPremium: the contacts of all_records that are premium records (contact.premium true). At launch, a premium record is in the premium export of a stated date. Null when the dataset version carries no premium data, or withheld when the premium records are at a single company and the caller has no account; premium_note says which.
all_recordsinteger (0 or more)yesAll records: every matching contact with the audience's top-level premium filters taken out (a premium filter inside any or not stays), so the premium figure always has the full figure beside it. The same as contacts when the audience has no premium filter.
premium_notestringyesWhat premium means on this dataset version, or why premium is null: no premium data on the version, or withheld because the premium records are at a single company.
viewsCountViewsnoContacts and companies for the three headline views, and the premium figure beside all records.
views.totalCountViewyesContacts and companies in one headline view.
views.new_to_youCountView or nullyesRemoves records from earlier orders and a connected CRM; null when signed out.
views.emailableCountViewyesA named email scoring 70 or more at a corporate subscriber.
views.premiumCountView or nullyesThe premium records of all_records (contact.premium true); null when the dataset version carries no premium data, or withheld when they are at a single company and the caller has no account.
views.all_recordsCountViewyesThe full figure: the audience with its top-level premium filters taken out (one inside any or not stays). The same as total when it has none.
qualityQualityyesQuality signals shown with every count.
quality.email_coverage_pctnumber (0 to 100)yesRecords with a named email as a share of the count.
quality.verified_90d_pctnumber (0 to 100)yesShare of emails with a provider result of ok in the last 90 days.
quality.verified_measured_atstring (date)no
quality.deliverabilityobjectnoScore distribution: good 70 to 100, risky 40 to 69, poor under 40.
quality.avg_days_since_verificationnumber (0 or more)no
quality.phone_coverage_pctnumber (0 to 100)noShare with a validated number, when phone is requested.
quality.tps_ctps_screened_atstring (date)noThe version's TPS and CTPS screen date, when phone is requested and a number in it is screened; each number carries its own status and screen date.
breakdownsarray of Breakdownyes
breakdowns[].byenum: company.sic_2007, company.business_class, company.employee_band, company.turnover_band, company.fleet_band, company.type, company.status, company.subscriber_class, and 11 moreyesA field a count can be broken down by.
breakdowns[].cellsarray of BreakdownCellyes
breakdowns[].otherOtherBucket or nullno
crosstabCrosstab or nullno
crosstab.byarray of enum: company.sic_2007, company.business_class, company.employee_band, company.turnover_band, company.fleet_band, company.type, company.status, company.subscriber_class, and 11 moreyes
crosstab.cellsarray of CrosstabCellyes
crosstab.otherOtherBucket or nullyes
crosstab.truncatedbooleanyesTrue when a cap cut the table: 5,000 cells, or fewer over MCP to keep a result under about 8,000 tokens.
compliance_summaryComplianceSummaryyesBeside every count, so a person or an agent can reason before spending. Individual subscribers and TPS and CTPS registered numbers are excluded by default, as visible toggles; numbers not screened are kept.
compliance_summary.lawful_basisenum: legitimate_interests_art6_1_fyes
compliance_summary.corporate_subscriberinteger (0 or more)yesRecords at corporate subscribers.
compliance_summary.individual_subscriber_excludedinteger (0 or more)yesSole traders and ordinary partnerships left out of an email audience.
compliance_summary.tps_ctps_excludedinteger (0 or more)yesTPS or CTPS registered numbers left out when phone is requested.
compliance_summary.article14_notifiedinteger (0 or more)yes
compliance_summary.article14_pending_within_windowinteger (0 or more)yesRecords inside the one month Article 14 window, not yet notified.
compliance_summary.suppressed_removedarray of SuppressionRemovalyes
compliance_summary.jurisdiction_excludedarray of JurisdictionExclusionnoPartner datasets only: records the jurisdiction policy table left out (Germany, Canada and California by policy), reported like suppression removals.
defaultsarray of CountDefaultyesEvery default with the number behind its toggle: dissolved and insolvent, generic emails, individual subscribers, TPS and CTPS registered.
defaults[].idenum: active_companies, named_emails, corporate_subscribers, no_registered_phonesyesactive_companies, named_emails, corporate_subscribers or no_registered_phones.
defaults[].appliedbooleanyesFalse when the audience filters the same field itself, or turned it off.
defaults[].viewsarray of enum: total, new_to_you, emailableyesThe headline views the default shapes; named emails and corporate subscribers shape Emailable only.
defaults[].removedinteger (0 or more) or under 10 or suppressedyesWhat the toggle shows: the dissolved and insolvent count, the generic (info@, sales@) count, the individual subscriber count or the TPS and CTPS registered count.
defaults[].screened_atstring (date) or nullnono_registered_phones only: the version's TPS and CTPS screen date.
estimatePriceEstimateyesWhat ordering the whole count would cost. An estimate; quote_order gives the machine quote.
estimate.creditsnumber (0 or more)yesCredits, to one decimal place: whole at 1 credit a record, fractional only where a rule is (0.1 company-only, 1.8 outright, both proposed).
estimate.gbp_ex_vatmap of number (0 or more)yesThe price in GBP excluding VAT: per_contact_scale (every credit at the scale) and cheapest (the cheapest real purchase, at the scale or with credit packs).
expanded_termsarray of ExpandedTermnoEvery title a matches filter covered, with a count per term.
expanded_terms[].termstringyesA matched title.
expanded_terms[].from_termstringyesThe input term it came from.
expanded_terms[].expansion_setenum: plural_singular, department_synonyms, ampersand_and, abbreviations, permutations or inputyesThe expansion set that produced it, or input for the term itself.
expanded_terms[].contactsinteger (0 or more) or under 10 or suppressedyesA whole number; "under 10" when disclosure control withholds a small cell; or "suppressed" when secondary suppression hides a cell of 10 or more in a cross-tab or breakdown, so totals cannot be differenced. Anonymous and trial callers see cells rounded to the nearest 5.
expanded_terms[].excludedbooleannoTrue when exclude_terms removed it from the audience.
disclosureDisclosureyesWhether these numbers are exact or protected: "under 10" cells, rounding to 5 and secondary suppression for anonymous and trial callers.
disclosure.levelenum: exact, roundedyesexact for authenticated paid callers; rounded for anonymous and trial callers, whose counts under 100 and every cell are rounded to the nearest 5.
disclosure.rounded_tointeger or nullyes5 when numbers are rounded; null when they are exact.
disclosure.secondary_suppressionbooleanyesTrue when cross-tab or breakdown cells of 10 or more were hidden as "suppressed" so totals cannot be differenced.
disclosure.notesarray of stringyes
effective_audienceAudiencenoThe definition after defaults and bundles, as hashed into the id. See Audience.
planCompiledPlannoHow the definition was run: expanded terms, resolved centres, SIC codes behind a business class and suppression checksums.
plan.engine_rules_versionstringyes
plan.defaults_appliedarray of stringyesDefaults the server filled, such as active_companies and named_emails.
plan.expanded_termsarray of ExpandedTermyes
plan.centresarray of ResolvedCentreyes
plan.sic_codesarray of stringyesSIC codes behind any business class filter.
plan.geography_setsarray of stringyes
plan.suppressionsarray of SuppressionChecksumyes
currentCurrentCount or nullnoOn a replay: the same audience on the current dataset version.
current.dataset_versionstringyesThe immutable weekly build a count is bound to, such as 2026-W39. The last 52 stay queryable.
current.contactsinteger (0 or more)yes
current.companiesinteger (0 or more)yes
removed_sinceinteger (0 or more)noOn a replay: records since removed by objections and erasure.

Showing the first 80 of 83 members. The OpenAPI document and the MCP tool list hold the full schema.

Errors

A failed call returns isError true. The text content leads with the sentence a person acts on, then the whole problem as JSON, with code, detail, next_step and did_you_mean. A 401 and a step-up 403 are answered at HTTP level so the client can start authorisation. See Errors.