Re: Skip Removed Adgoups, KeyWords, and Text Ads?

2018-02-14 Thread 'Dhanya Sundararaju (AdWords API Team)' via AdWords API Forum
Hi Edward,
For your code to ignore removed adgroup and keywords, you would need to use 
predicates 

 in 
your selector 
 as 
below:

*// For AdGroups*
// Create selector.
SelectorBuilder builder = new SelectorBuilder();
Selector selector = builder
.fields(AdGroupField.Id, AdGroupField.Name, AdGroupField.Status)
.orderAscBy(AdGroupField.Name)
.offset(offset)
.limit(PAGE_SIZE)
*.in(AdGroupField.Status,"ENABLED","PAUSED")*
.build();

*//For Keywords*
// Create selector.
SelectorBuilder builder = new SelectorBuilder();
Selector selector = builder
.fields(
AdGroupCriterionField.Id,
AdGroupCriterionField.CriteriaType,
AdGroupCriterionField.AdGroupId,
AdGroupCriterionField.Status
)
.orderAscBy(AdGroupCriterionField.KeywordText)
.offset(offset)
.limit(PAGE_SIZE)
.in(AdGroupCriterionField.AdGroupId, adGroupId.toString())
.in(AdGroupCriterionField.CriteriaType, "KEYWORD")
   * .in(AdGroupCriterionField.Status, "ENABLED", "PAUSED")*
.build();


Regards,
Dhanya, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/8dcc2c11-f01b-4bf8-af56-9106401daa82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Skip Removed Adgoups, KeyWords, and Text Ads?

2018-02-14 Thread Edward Bernays
Hi Dhanya,

I was wondering if it was possible for the API to ignore removed keywords & 
adgroups. I have over 100,000 removed keywords and it's slowing down my 
script.

On Tuesday, February 13, 2018 at 3:56:02 PM UTC-5, Dhanya Sundararaju 
(AdWords API Team) wrote:
>
> Hi Edward,
>
> To get the removed AdGroups, Keywords and Ads, you can use the 
> AdGroupService 
> 
> , AdGroupCriterionService 
> 
>  and AdGroupAdService 
> 
>  respectively. 
> Then, use the selector 
> 
>  fields 
> to filter by *status* for AdGroups and Ads; and by *userStatus* for 
> keywords.
>
> Sample code snippet in java for AdGroup is as below:
> Selector selector = builder
> .fields(AdGroupField.Id, AdGroupField.Name, AdGroupField.Status)
> .orderAscBy(AdGroupField.Name)
> .offset(offset)
> .limit(PAGE_SIZE)
> .equals(AdGroupField.Status,"REMOVED")
> .build();
>
> Please let me know if you have further questions.
>
> Regards,
> Dhanya, AdWords API Team
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/fa294ef7-b8bd-4388-b444-4dd5d668cad0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Skip Removed Adgoups, KeyWords, and Text Ads?

2018-02-13 Thread 'Dhanya Sundararaju (AdWords API Team)' via AdWords API Forum
Hi Edward,

To get the removed AdGroups, Keywords and Ads, you can use the 
AdGroupService 

, AdGroupCriterionService 

 and AdGroupAdService 

 respectively. 
Then, use the selector 

 fields 
to filter by *status* for AdGroups and Ads; and by *userStatus* for 
keywords.

Sample code snippet in java for AdGroup is as below:
Selector selector = builder
.fields(AdGroupField.Id, AdGroupField.Name, AdGroupField.Status)
.orderAscBy(AdGroupField.Name)
.offset(offset)
.limit(PAGE_SIZE)
.equals(AdGroupField.Status,"REMOVED")
.build();

Please let me know if you have further questions.

Regards,
Dhanya, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/90bb2cb6-c72d-4b86-ad72-ced65a1c1e4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.