My function receives as parameter an array (named: keyword) filled with n
keywords. I want to extract the average monthly search volume of each one.
When I make the request like this, everything is ok
selector['searchParameters'] = [{
'xsi_type': 'RelatedToQuerySearchParameter',
'queries': ['kw1', 'kw2', 'kw3']
}]
But when I assign to 'queries' my array, the API returns this error: *The
String type doesn't accept collections as value*
selector['searchParameters'] = [{
'xsi_type': 'RelatedToQuerySearchParameter',
'queries': [keywords]
}]
So I converted my array to string
data = str(keywords).strip('[]')
So data = 'kw1', 'kw2', 'kw3'...
And then:
selector['searchParameters'] = [{
'xsi_type': 'RelatedToQuerySearchParameter',
'queries': [data]
}]
It fixes the problem but the API doesn't send any info because 'data' is
considered as a unique string and not like a collection of strings.
Any help?
Thanks!
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"AdWords API and Google Ads 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/fbc93bb9-73ae-40a2-b082-632e134b9651%40googlegroups.com.