I am using ads API for getting the spends based on state names of USA.

The below query gives segments.geo_target_state will be returned as an ID 
instead of name How can I combine this query with SELECT 
geo_target_constant.name, geo_target_constant.canonical_name FROM 
geo_target_constant WHERE geo_target_constant.id = <<OBTAINED ID FROM THE 
BELOW QUERY>>
curl 
"https://googleads.googleapis.com/v10/customers/${CUSTOMER_ID}/googleAds:searchStream";
 
\ --header "Content-Type: application/json" \ --header "developer-token: 
${DEVELOPER_TOKEN}" \ --header "login-customer-id: ${MANAGER_CUSTOMER_ID}" 
\ --header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}" \ --data '{ 
"query": " SELECT campaign.name, segments.geo_target_state, 
metrics.cost_micros FROM geographic_view WHERE 
geographic_view.location_type = LOCATION_OF_PRESENCE AND segments.date 
BETWEEN 20220101 AND 20220430 " }'

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4b8c432f-c957-467b-8d0f-e8c72908cfc8n%40googlegroups.com.
  • Go... Darren D'Mello
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Darren D'Mello

Reply via email to