How to obtain human-readable names for all audience segments (criterion) through Google Ads API v20?

34 views
Skip to first unread message

Mark Ignacio

unread,
Sep 6, 2025, 6:17:16 AM (3 days ago)  Sep 6
to Google Ads API and AdWords API Forum
Hi Google Ads API team,

Business need  
I’m building a reporting tool that lists metrics (impressions, clicks, conversions, cost, etc.) per audience segment.  
For every segment we must show the same friendly name the Google Ads UI displays.

Current workflow (API v20)

1.  Metrics per audience criterion

    ```gaql
    SELECT
      ad_group_criterion.criterion_id,
      metrics.impressions,
      metrics.clicks,
      metrics.conversions,
      metrics.cost_micros
    FROM ad_group_audience_view
    WHERE campaign.id = <CAMPAIGN_ID>
      AND segments.date BETWEEN 'YYYY-MM-DD' AND 'YYYY-MM-DD'
    ```

2.  Attempt to map each `criterion_id` to a label

    ```gaql
    SELECT
      ad_group_criterion.criterion_id,
      ad_group_criterion.user_list.user_list,
      ad_group_criterion.display_name
    FROM ad_group_criterion
    WHERE campaign.id = <CAMPAIGN_ID>
      AND ad_group_criterion.type = AUDIENCE
    ```

3.  Translate numeric topic IDs (placeholders like “Audience #123 …”)

    ```gaql
    SELECT
      vertical_constant.resource_name,
vertical_constant.name
    FROM vertical_constant
    WHERE vertical_constant.resource_name IN ('verticalConstants/123', ...)
    ```

Processing logic  
• use `display_name` when it’s non-empty  
• look up user lists by resource name to get their `.name`  
• replace “Audience #<n>” with the returned ` vertical_constant.name `  
• tidy Google’s auto-generated strings `AdGroupPersona_<hash>_<ts>`

Problem  
After all steps many criteria still show only “Audience #<ID>”.  
Those same criteria display a friendly name in the Google Ads UI.

What we tried (and failed)  
• Adding `ad_group_criterion.user_interest`, `.custom_audience`, `.combined_audience` to SELECT → GAQL error: “field may not be used in SELECT clause”.  
• Querying `user_interest`, `custom_audience`, `combined_audience` tables directly – we have only numeric `criterion_id`, no resource names.  
• Granting “Audience Manager” UI permissions is not possible for every customer.

Questions

1. Is there any supported way to convert **every** audience `criterion_id` to the same human-readable label the UI shows, especially when `display_name` is just “Audience #<ID>”?  
2. Do the orphan numeric IDs map to an internal taxonomy that isn’t exposed via `vertical_constant`? If yes, what fallback should we show?  
3. Are there other fields/services (GoogleAdsFieldService, etc.) that let us resolve names for user-interest, custom-audience, or combined-audience criteria programmatically?

Thanks for any guidance—our users need meaningful audience names and we’d like to avoid scraping or static mapping tables.

Thank you.

Google Ads API Forum Advisor

unread,
Sep 8, 2025, 11:29:12 AM (yesterday)  Sep 8
to mark.i...@kopamedia.io, adwor...@googlegroups.com

Hi,

Thank you for contacting the Google Ads API support team. 

Please note that it is not clear to us what data you are trying to retrieve using the Google Ads API. In order to assist you further, please elaborate on your concern, provide your Google Ads customer Id , uncropped UI screenshot of your Google Ads account highlighting the data which you are trying to retrieve and the complete GAQL queries including campaign Id without redacting any information and explain the meaning of the phrase “display a friendly name in the Google Ads UI.” 

You can send the details via Reply privately to the author option, or direct private reply to this email.

Thanks,
Google Logo
Google Ads API Team

Feedback
How was our support today?

rating1 rating2 rating3 rating4 rating5
[2025-09-08 15:28:27Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01u622G:ref" (ADR-00332060)



Mark Ignacio

unread,
4:24 AM (13 hours ago)  4:24 AM
to Google Ads API Forum Advisor, adwor...@googlegroups.com

Hello Google Ads API support,

Thanks for the quick reply—here are the exact details you requested.

Google Ads Account Information

  • Customer ID(MCC): 🔵 601-996-9454

  • Campaign ID (Video campaign used for testing): 🔵 22709819255

What We Want to Retrieve

For every audience segment in a campaign we need:

  • the human-readable segment name (the same label users see in the Google Ads UI); and

  • impression / click / conversion / cost metrics for a selected date range.

By “display a friendly name in the Google Ads UI” we mean the text that appears in the UI table under Audiences Segments .

Example from the UI: “TV Lovers”, “Technology”, “Lifestyle & Hobbies” etc.

GAQL Queries

Code snippet

-- (1) Metrics per audience criterion

SELECT

ad_group_criterion.criterion_id,

metrics.impressions,

metrics.clicks,

metrics.conversions,

metrics.cost_micros

FROM ad_group_audience_view

WHERE campaign.id = 22709819255

AND segments.date BETWEEN '2024-08-01' AND '2024-08-31';

Code snippet

-- (2) Attempt to translate each criterion_id into a label

SELECT

ad_group_criterion.criterion_id,

ad_group_criterion.user_list.user_list,

ad_group_criterion.display_name

FROM ad_group_criterion

WHERE campaign.id = 22709819255

AND ad_group_criterion.type = AUDIENCE;

Code snippet

-- (3) Translate numeric topic / vertical IDs when needed

SELECT

vertical_constant.resource_name,

vertical_constant.name

FROM vertical_constant

WHERE vertical_constant.resource_name IN ('verticalConstants/51668104735');

Problem We Need Help With

For criterion ID 51668104735, query #2 returns display_name = "Audience #51668104735" and query #3 returns no match.

Yet the UI shows the friendly name “TV Lovers” for that same criterion (see screenshot).

Questions

  • Is there an API method or mapping that converts all criterion_id values to the friendly names shown in the UI?

  • If certain IDs belong to an internal taxonomy that is not publicly exposed, what is the recommended workaround so our users don’t see “Audience #<ID>” placeholders?

Thank you for your assistance—let me know if any other details are needed.

Thanks,



--

Mark Ignacio

Client Success Manager

My working hours may not be your working hours. Please do not feel obliged to reply to this email outside of your normal working hours.

Audience UI 2.png

Google Ads API Forum Advisor

unread,
10:22 AM (7 hours ago)  10:22 AM
to mark.i...@kopamedia.io, adwor...@googlegroups.com
Hi,

Based on the adGroupCriterion with criterion ID 51668104735 and displayName: "uservertical::9280", you can use the user_interest  resource to fetch the audience segments you need, such as the one named "TV Lovers". You can use the following query:
SELECT user_interest.availabilities, user_interest.launched_to_all, user_interest.name 
, user_interest.resource_name, user_interest.user_interest_id, user_interest.taxonomy_type, user_interest.user_interest_parent FROM user_interest WHERE user_interest.user_interest_id = 92800
Additionally, you can utilize the  Google Ads Query Builder  and  Query Validator  to build and validate the queries for retrieving the data from the Google Ads API.

Thanks,
Google Logo
Google Ads API Team

Feedback
How was our support today?

rating1 rating2 rating3 rating4 rating5

[2025-09-09 14:21:11Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01u622G:ref" (ADR-00332060)



Reply all
Reply to author
Forward
0 new messages