Script for deleting rejected ads

If you work in a topic with strict moderation and ad creation is «on stream» — you will likely have to frequently remove rejected ads.

This can be done using this script:

function main() {
	var adSelector = AdsApp
		.withCondition('CombinedApprovalStatus IN [DISAPPROVED, SITE_SUSPENDED]');
	var adIterator = adSelector.get();
	while (adIterator.hasNext()) {
		var ad =;
		Logger.log('Удаляем объявление [' + ad.getId() + '] - "' + ad.getHeadline() + '"');

The script will have to be run several times if you have more than 50,000 rejected ads in your account.