I set up a project using the .NET Adwords API.
I'm querying a large number (100s of thousands) of potential search terms 
for their SEARCH_VOLUME to decide which to target.
The api works as expected except for occasionally the API returns fewer 
results than the number of queries I sent it.
After narrowing it down, one of the problem search terms turned out to be 
simply 'amherst properties'
In this example, the API returns 0 results for the one search term.
This results in my lists being of different lengths, and I don't know which 
term failed to return a value so I've been unable to identify a proper fix 
for it this far. 
Are there search term constraints that I don't know about, or some other 
method to handle this?
I can't request one term at a time due to the sheer number of queries I'm 
testing.

using System;
using Google.Api.Ads.AdWords.Lib;
using Google.Api.Ads.AdWords.v201710;

namespace WpfApp1
{
    internal class MyClass
    {
        public MyClass()
        {
            AdWordsUser user = new AdWordsUser();
            TargetingIdeaService targetIdeaService = 
(TargetingIdeaService)user.GetService(AdWordsService.v201710.TargetingIdeaService);
            TargetingIdeaSelector targetIdeaSelector = new 
TargetingIdeaSelector();
            targetIdeaSelector.ideaType = IdeaType.KEYWORD;
            targetIdeaSelector.requestType = RequestType.STATS;
            targetIdeaSelector.requestedAttributeTypes = new 
AttributeType[] { AttributeType.SEARCH_VOLUME };

            var adultContentSearchParameter = new 
IncludeAdultContentSearchParameter();
            var locationSearchParam = new LocationSearchParameter();
            var searchLocation = new Location();
            searchLocation.id = 2840; //United States
            locationSearchParam.locations = new Location[] { searchLocation 
};

            targetIdeaSelector.paging = new Paging();
            targetIdeaSelector.paging.numberResults = 600;
            targetIdeaSelector.paging.startIndex = 0;

            var relatedQuerySearchParam = new 
RelatedToQuerySearchParameter();
            relatedQuerySearchParam.queries = new string[] { "amherst 
properties" };

            targetIdeaSelector.searchParameters = new SearchParameter[] { 
locationSearchParam, relatedQuerySearchParam, adultContentSearchParameter };

            var targetIdeaPage = targetIdeaService.get(targetIdeaSelector);

            Console.WriteLine(targetIdeaPage.totalNumEntries);
        }
    }
}

Thanks,
Brett

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6defaf2f-be26-4897-a346-a8217a1e4ac5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to