Hi all,

Sometimes when i'm trying to get keywords Idea, using 
KeywordPlanIdeaServiceClient Service (Google Ads Api V1.0), I'm getting an 
error saying DeadlineExceededError.
What should I do?

You can find my code bellow.

public dynamic searchKeyword(GoogleAdsClient client, string customerId, 
> string keywordTexts, string pageUrl)
>         {
>             List<dynamic> keyword_results = new List<dynamic>();
>             KeywordPlanIdeaServiceClient keywordPlanIdeaService = 
> client.GetService(Services.V1.KeywordPlanIdeaService);
>             
>             GenerateKeywordIdeasRequest request = new 
> GenerateKeywordIdeasRequest()
>             {
>                 CustomerId = customerId
>             };
>             if (keywordTexts.Length == 0)
>             {
>                 request.UrlSeed = new UrlSeed()
>                 {
>                     Url = pageUrl
>                 };
>             }
>             else if (string.IsNullOrEmpty(pageUrl))
>             {
>                 request.KeywordSeed = new KeywordSeed();
>                 request.KeywordSeed.Keywords.Add(keywordTexts);
>             }
>             else
>             {
>                 request.KeywordAndUrlSeed = new KeywordAndUrlSeed();
>                 request.KeywordAndUrlSeed.Url = pageUrl;
>                 request.KeywordAndUrlSeed.Keywords.Add(keywordTexts);
>             }
>             request.Language = ResourceNames.LanguageConstant(1000);
>             try
>             {
>                 GenerateKeywordIdeaResponse response = 
> keywordPlanIdeaService.GenerateKeywordIdeas(request);
>                 foreach (GenerateKeywordIdeaResult result in 
> response.Results)
>                 {
>                     KeywordPlanHistoricalMetrics metrics = 
> result.KeywordIdeaMetrics;
>                     dynamic keyword_result = new ExpandoObject();
>                     keyword_result.Text = result.Text;
>                     keyword_result.AvgMonthlySearches = 
> metrics.AvgMonthlySearches ?? 0;
>                     keyword_result.Competition = metrics.Competition;
>                     keyword_results.Add(keyword_result);
>                 }
>             }
>             catch (Exception e)
>             {
>                 throw;
>             }
>             return keyword_results.OrderByDescending(K => 
> K.AvgMonthlySearches);
>         }


Thanks,
Zied 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/01456b2d-a07d-40e2-9553-721fa54854dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Get Key... Zied Chaari
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
      • ... Zied Chaari
        • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to