Query Task People
query_task_peopleEach row: id (the person id query_people uses), display_name, spine (title, company,
location, headline), linkedin_url, linkedin_provider_id, email, and:
degree: the user's LinkedIn degree to the person, '1', '2', '3' or 'out_of_network'; null when unknown. A person the user is connected to reads '1'.intro: the warm-intro check.stateis one of not_checked, checking, queued, found, cold, connected, unresolved.connectorslists the user's 1st-degree connections who know the person (name, headline, identifier, provider_id).mutual_connections_truncatedtrue meansconnectorsis a sample of a longer list.shared_connections_countis LinkedIn's total.result_idis the search row the check read, null when the person has none.outreach_stage: the person's lead-funnel bucket on this agent, '' when not in outreach here.prospect_id,email_stageandlinkedin_stageare their prospect row on this agent, null when not enrolled.removal_reasonsays why they were removed from the campaign, '' when they weren't or no reason was recorded.listsandsources: the search lists and discovery tools that surfaced the person.columnsholds the researched [label, value] pairs.verdict,verdict_reasonandrejected_on: the curation recorded on the person's search rows, as the Verdict column shows it. 'rejected' when every row is rejected, 'qualified' when any row is qualified, else null, with the reason from the latest row carrying it; on agroup_by='list'bucket page, the verdict on that list's row.rejected_onis {lists, reason}: the lists whose own verdict is 'rejected' while the person'sverdictisn't, with the latest rejected row's reason; itslistsis empty otherwise and on agroup_by='list'bucket page. A person rejected on every row is left out unless a "verdict" filter asks for 'rejected' orinclude_rejectedis set — the same as the user's default view — though a tracked prospect always shows.criteria, only withinclude_criteria: why the person matched, as their opened row shows it. Per list they're in, {list_name, evaluations}; each evaluation is acriterionwith thereasoning, a verdict (satisfied'yes', 'no' or 'unclear', or a numericscorewhere 7 and up is met) and http(s)references. Criteria run about 2KB per person, so ask for them on a narrow read (aq, one bucket, or a smalllimit) or from run_code. A list where all of the person's rows are rejected is left out unless the read includes rejected people.
To count people per group, pass group_by alone. To list one group's people, pass group_by
plus a bucket key taken from those counts. Otherwise you get everyone, sorted by name. Page
until next_cursor is null by passing it back as cursor. A direct call returns 25 rows by
default; for a wide pull, call this from run_code with limit up to 200 (nothing truncates
there) and print only the fields you need.
A dict. A group_by without a bucket returns only group_counts, a list of
{key, count} with the largest group first and the '' group last ("degree" keeps
closest-first order; "connector" entries add label). Every other call returns results
(rows shaped as above) and next_cursor, plus total (every matching person) when
group_by is omitted. Every call also returns filtered_out_count, the number of rows a
read filtered on verdict 'rejected' alone returns across the whole agent, whatever q and
filters: people, or with group_by="list" person-list pairs, so a person rejected on two
lists counts twice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | A substring matched against name, title, headline and company. | |
| limit | No | Rows per page (default 25, max 200). | |
| bucket | No | One key from `group_counts` for the same `group_by`; returns that group's people. Needs `group_by`. | |
| cursor | No | The `next_cursor` from the previous page; omit for the first page. | |
| filters | No | Clauses that must all match. For "degree", "outreach_stage", "list" or "source", use {"column_key": <dimension>, "operator": "is_any_of", "values": [keys]} with keys as group_counts returns them ('' matches no value). For "segment", use the same shape with the segment keys above. For "verdict", use the same shape with 'rejected' (the people the user's default view filters out) and/or 'qualified'; it matches each person's `verdict`, or with group_by="list" their verdict on each list, and 'rejected' brings the rejected people in without `include_rejected`. For "name", "title", "headline", "company" or "location", use {"column_key": <column>, "operator": "contains", "text": <substring>}. | |
| agent_id | Yes | The agent whose People tab to read. | |
| group_by | No | The dimension to count or to pick a bucket from. "degree" keys are '1', '2', '3', 'out_of_network'; "connector" keys are a connector's provider_id (else their identifier or name) and carry the connector's name as `label`; "outreach_stage" keys are funnel buckets; "list" and "source" keys are list names and discovery tools; "segment" keys are tag names in `segment_group_id`'s group, plus 'No match' for people the classifier couldn't place; "title", "company" and "location" key on the person's own value. A '' key is the group with no value (for "segment", people the group hasn't classified). A person with several lists, sources, connectors or tags counts in each. | |
| include_criteria | No | Also return each row's `criteria`. Default False. | |
| include_rejected | No | Also return (and count) the people left out as rejected. Default False. | |
| segment_group_id | No | The segment group (from list_segment_groups or get_segment_funnel) a "segment" filter or group_by reads. With it, each row also carries `segment`, its tag names in that group. |