I thought about this solution but maybe it's nessessary that you know what 
i'm doing:

I'm writing a programm that is getting all the FinalUrls of all ads of 
different accounts (from different Acc IDs) so it has to be dynamic and the 
IDs changes always because we have a lot of accounts and dynamic ADs.

So you mean i can get all the AdGroup IDs and then loop throw them and get 
the Ads by AdGroup Ids did i understand it well ?

Thank you again

Am Dienstag, 1. März 2016 16:35:31 UTC+1 schrieb Josh Radcliff (AdWords API 
Team):
>
> Hi,
>
> In that case, you'll want to batch your requests by ad group ID. For 
> example:
>
>    1. Issue an AdGroupService.get 
>    
> <https://developers.google.com/adwords/api/docs/reference/latest/AdGroupService#get>
>  
>    to retrieve the list of all ENABLED ad groups and collect all of their IDs.
>    2. Split the collection of ad group IDs into multiple collections, 
>    each with a reasonable max size. For example, if you have a *maximum* 
>    of 20 ads per ad group and 1,000 ad groups, then you'd create:
>       - Batch 1 = ad group IDs 1 to 500 (maximum # of ads = 20 * 500 = 
>       10,000)
>       - Batch 2 = ad group IDs 501 to 1000
>    3. For each collection of ad group IDs, issue an AdGroupAdService.get 
>    
> <https://developers.google.com/adwords/api/docs/reference/latest/AdGroupAdService#get>
>  
>    with a predicate on *AdGroupId IN [collectionOfAdGroupIds]*.
>    4. Combine results of all the iterations in step 3.
>
> Cheers,
> Josh, AdWords API Team
>
> On Tuesday, March 1, 2016 at 9:22:03 AM UTC-5, Karim Benna wrote:
>>
>> The problem is that i have minimum 250000 active Ads so i need to find a 
>> way to avoid that limit do u think it's possible ? and how ? i'm sorry to 
>> ask again the same question but the solution you gave me doesn't really 
>> help for my case but i thank you anyway
>>
>> Am Dienstag, 1. März 2016 15:10:55 UTC+1 schrieb Josh Radcliff (AdWords 
>> API Team):
>>>
>>> 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/c793a701-e911-48f1-ad44-305e3e6d6306%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to