BingAds / BingAds-Python-SDK

Other
115 stars 162 forks source link

Issue with making a Keyword Insight request? #244

Closed seanHayes92 closed 11 months ago

seanHayes92 commented 1 year ago

Hi, I am trying to get insights for a set of keywords and as such, am trying to create a QuerySearchParameter` request.

I make the request as so, following the example in this repo:

query_search_parameter = adinsight_service.factory.create('QuerySearchParameter') print("--------------") queries = adinsight_service.factory.create('ns1:ArrayOfstring') queries.string.append([ keyword ]) query_search_parameter.Queries = queries

However, I get a response suds.TypeNotFound: Type not found: 'Type not found: 'ns1:ArrayOfstring''

This is pretty much the same as in the sample code. Has there been some backend change I am not aware of?

qitia commented 1 year ago

hi there. I am wondering which example are you referring to?

if you run below scripts

from suds.client import Client

ac=Client('https://adinsight.api.bingads.microsoft.com/Api/Advertiser/AdInsight/v13/AdInsightService.svc?singleWsdl')
print (ac)

you will see output as

            ...
        Types (179):
            ...
            ns2:ArrayOflong
            ns2:ArrayOfstring
...

So, please try queries = adinsight_service.factory.create('ns2:ArrayOfstring')