Read Yandex Audience: segments and reach
direct_audienceLists Yandex Audience segments and returns reach and affinity for a segment. Verifies which segments are processed to avoid counting incomplete data.
Instructions
The Yandex Audience API, reading only. Two actions: 'segments' lists the segments of the token's login ā each with its owner and status (is_processed while counting, processed when ready); 'stat' answers one segment's reach and affinity ā totals lives HERE, not in the segment object, and no_data=true means the segment is still counting, so its zero measures nothing.
š“ Direct sees ONLY processed segments, and under a DIFFERENT number than the Audience id ā a retargeting condition is verified by reading retargetinglists, never by computing (knowledge://audience).
Needs its own credential ā a token of your own application with the two Audience checkboxes; no access request exists for this API: python -m shturman_direct login audience. Creating segments is a write and lives in direct_audience_segments.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | segments: what the login holds; stat: one segment's reach (totals) and affinity | |
| segment_id | No | numeric Audience segment id. Required for stat |