Hi,

Since your processing loop is ignoring any ad group whose status is not 
*ENABLED*, I'd recommend adding a predicate on *Status 
<https://developers.google.com/adwords/api/docs/reference/v201601/AdGroupService.AdGroup#status>
 
= ENABLED* when building your *Selector*. If you have a large number of 
*PAUSED* or *REMOVED* ad groups, the addition of that predicate will 
greatly reduce the total number of entries for your request.

Thanks,
Josh, AdWords API Team

On Tuesday, March 1, 2016 at 8:39:14 AM UTC-5, Karim Benna wrote:
>
> I have the same problem but i wish to have a nicer solution than to change 
> everything by using reports not services could anyone please help me ? 
>
> int offset = 0;
> SelectorBuilder builder = new SelectorBuilder();
> Selector selector = builder
> .fields(AdGroupAdField.CreativeFinalUrls, AdGroupAdField.AdGroupId)
> .orderAscBy(AdGroupAdField.AdGroupId)
> .offset(offset)
> .limit(PAGE_SIZE)
> .build();
> do {
> // Get all campaigns.
> page = adService.get(selector);
> int i = 0;
> if (page.getEntries() != null) {
> for (AdGroupAd campaign : page.getEntries()) {
> try {
> if (campaign.getStatus().getValue() == "ENABLED") {
> ArrayList<String> inner = new ArrayList<String>();
> inner.add(campaign.getAd().getFinalUrls()[0]);
> inner.add(Long.toString(campaign.getAdGroupId()));
> urls.add(inner);
> i++;
> }
> } catch (NullPointerException e) {
> System.out.println("A campaign of this GroupAd: " + 
> campaign.getAdGroupId() + " is :"
> + campaign.getStatus());
> }
> }
> } else {
> System.out.println("No campaigns were found.");
> }
> offset += PAGE_SIZE;
> selector = builder.increaseOffsetBy(PAGE_SIZE).build();
> System.out.println("there is found: " + i + " Urls");
> } while (offset < page.getTotalNumEntries());
>
> Am Mittwoch, 30. Juli 2014 19:06:37 UTC+2 schrieb nakisa mohammadifard:
>>
>> Hi,
>>
>> I am trying to get all the keywords in an account and I am using paging 
>> for that. According to the limits of google, there can be 3 million 
>> keywords in an account though while I am trying to get them I get an error 
>> SelectorError.START_INDEX_IS_TOO_HIGH for start index of paging set to 
>> 110000. Is there any explanation and what should I do to get the remaining 
>> millions of keywords?
>>
>> Thanks,
>> Nakisa 
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/dc686c79-c8c2-4d03-8499-83f6182d27fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Re: SelectorError... Karim Benna
    • Re: Selector... 'Josh Radcliff (AdWords API Team)' via AdWords API Forum
      • Re: Sele... Karim Benna
        • Re: ... 'Josh Radcliff (AdWords API Team)' via AdWords API Forum
          • ... Karim Benna
            • ... 'Josh Radcliff (AdWords API Team)' via AdWords API Forum

Reply via email to