Hi, I am using python sdk(https://pypi.org/project/bingads/) for fetching campaigns, adgroups and keywords. But it is tremendous slow. on the other hand google bing api is so fast. Specially Bing keywords process taking too much time. i am using GetKeywordsByAdGroupId method to fetch all keywords for each adgroup id. i am also fetching all keyword labels by calling another python function as below:
def get_labels(campaign_service, keywordId):
keyword_associated_lables = campaign_service.GetLabelAssociationsByEntityIds(
EntityIds={'long': [keywordId]}, EntityType="Keyword")
associated_label_ids = []
associated_label_names = []
for associated_label in keyword_associated_lables.LabelAssociations:
for label in associated_label[1]:
associated_label_ids.append(label.LabelId)
get_labels_by_ids_response = campaign_service.GetLabelsByIds(
LabelIds={'long': associated_label_ids}
)
for data_object in get_labels_by_ids_response.Labels['Label']:
associated_label_names.append(data_object.Name)
return ','.join(associated_label_names)
Now for fetching 12633 keywords and their lables total time taken 4hours 28 min. on the other hand using google ads api(python) fetching google keywords with labels take only 35 min. Even from console i can see the difference of fetching records. is there any way to optimise the process?
Thanks in advance
Sagar