Discovery

Calculate record overlap between two criteria sets

Computes the number and percentage of records that appear in both of two criteria sets, plus side-by-side demographic deltas. Requires 'discovery' scope. Each side (a and b) independently accepts exactly one discovery input shape (filters, filter_groups, segment_id, audience_id, or segment_ids + set_logic) — the legacy flat audience_id_a / audience_id_b fields are also still accepted. A side that provides more than one shape, or combines the structured object with its legacy field, returns 400 AMBIGUOUS_INPUT. A side that provides nothing returns 400 NO_INPUT_SPECIFIED. When one side is a raw filters/filter_groups input and the other resolves to a segment the fast path cannot express (a non-filter segment, or a filter segment with a record_limit), the raw side is validated against the live Field Catalog and composed server-side; invalid criteria return 400 INVALID_FILTER. Each side preserves full group/combinator structure independently: if a side is a segment, audience, or filter groups, each segment's own AND/OR groups are evaluated intact, multiple composed segments are combined by set_logic, and an audience's excluded segments are always subtracted (AND NOT), regardless of set_logic — before the two sides are joined for the overlap count.

post/v1/discovery/overlap

Request

  • Base URL: https://api.infiniteaudience.ai
  • URL: https://api.infiniteaudience.ai/v1/discovery/overlap
  • Auth: HTTP bearer

Request body

audience_id_astring

(Legacy) First audience ID. Mutually exclusive with a.

audience_id_bstring

(Legacy) Second audience ID. Mutually exclusive with b.

Response

Overlap result with demographic deltas.

a_namestring required
b_namestring required
a_countinteger required
b_countinteger required
overlap_countinteger required
overlap_pctnumber required

Overlap as a percentage of the smaller side.

distribution_fieldstring

Attribute the paired distributions are bucketed on.

distribution_labelstring

Human-readable label for the distribution attribute.

warningsstring[]

Present only when at least one side resolves to a non-filter or mixed-subtype composition. Two cases: "One or both sides had no composable segments" when a side's composition is empty (counts are all 0); or "Demographic breakdowns are not yet available for non-filter or mixed-subtype compositions" when counts/ overlap were computed directly but demographic_deltas could not be (returned as an empty array in that case).

Changes

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