def main(client):
# Initialize appropriate service.
targeting_idea_service = client.GetService(
'TargetingIdeaService', version='v201702')
# Construct selector object and retrieve related keywords.
offset = 0
selector = {
'searchParameters': [
{
'xsi_type': 'RelatedToUrlSearchParameter'
'includeSubUrls': False,
},
{
# Language setting (optional).
# The ID can be found in the documentation:
'xsi_type': 'LanguageSearchParameter',
'languages': [{'id': '1000'}]
},
{
'xsi_type': 'LocationSearchParameter',
'locations': [{'id': '2840'}]
}
,
{
# Network search parameter (optional)
'xsi_type': 'NetworkSearchParameter',
'networkSetting': {
'targetGoogleSearch': True,
'targetSearchNetwork': False,
'targetContentNetwork': False,
'targetPartnerSearchNetwork': False
}
}
],
'ideaType': 'KEYWORD',
'requestType': 'IDEAS',
'requestedAttributeTypes': ['KEYWORD_TEXT', 'SEARCH_VOLUME',
'CATEGORY_PRODUCTS_AND_SERVICES'],
'paging': {
'startIndex': str(offset),
'numberResults': str(PAGE_SIZE)
}
}
There is not even a single match between results on the web and what is returned by the api.
Can some one let me know if I am missing to enter some parameter that i need to pass to get the same result as web UI.
I understand that the results by api are for different timeline compared to web UI, but the api is returning completely different and undesirable results instead.