Get Segment Criteria
get_segment_criteriaRead one saved Insights segment by id or name: its criteria, status, and how many accounts it matches. Pass lookback_window to count inside the window an audience would use.
RETURNS {found: true, id, name, status, last_updated_date, lookback_window, accounts, criteria}, or {found: false, available_segments: [...]} when nothing matches: pick from that list or create_segment, never invent an id.
STATUS: READY (usable), PENDING (a CRM field is still being extracted: wait and re-check), FAILED.
accounts is the number of companies matching right now (all time when lookback_window is omitted). 0 with the window you plan to use means create_audience_from_segment would build an empty audience: loosen the criteria (a new create_segment) or widen the window first.
Pass the returned criteria object (not the id) to get_insights_report to list the accounts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| segment_id | No | Segment ID (fastest lookup). | |
| segment_name | No | Segment name (fuzzy matching, case-insensitive). | |
| lookback_window | No | Days to evaluate the segment over when counting accounts; use the window the audience will be created with. |