I'm working on a C# application using the Adwords .NET library to determine 
search rates for potential campaigns.
All seems to work well, except that some search queries don't return a 
SEARCH_VOLUME result.

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 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 };

            var targetIdeaPage = targetIdeaService.get(targetIdeaSelector);

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

Output: 0


In my real application, there's around ~500+ queries per request to help 
prevent Rate issues. Since the api doesn't error, and simply doesn't return 
a value, I have no way of knowing what one failed and it causes my lists to 
be different lengths.
Is there something I should be aware of in-terms of things that shouldn't 
queried, or some way to handle this situation?

Thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
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/693787b4-0428-46cd-9c95-0c732d49ff1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to