Requesting Exemption for Expanded Text Ads and Responsive Search Ads

Expanded text ads and responsive search ads require steps for exemption request that are different from other ad types:

  1. Store all the ignorable policy topic included in PolicyTopicEntry, which is stored inside PolicyFindingDetails, returned when your first attempt to create an ad failed.
  2. Send a mutate request to create the ad again by including the stored ignorable policy topics.

Visit this guide if you wish to request exemption for other ad types instead. In this guide, we will use an expanded text ad as an example. The steps for requesting exemption for responsive search ads are mostly the same, except for the step of creating ExpandedTextAdInfo, which you need to replace with ResponsiveSearchAdInfo.

Store all ignorable policy topics

The error details for expanded text ads and responsive search ads will be included in PolicyFindingDetails, which in turn stores a list of PolicyTopicEntry objects.

In this step, you need to store the topic field of each PolicyTopicEntry:


private static function fetchIgnorablePolicyTopics(GoogleAdsException $googleAdsException)
    $ignorablePolicyTopics = [];

    printf("Google Ads failure details:%s", PHP_EOL);
    foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) {
        /** @var GoogleAdsError $error */
        if ($error->getErrorCode()->getErrorCode() !== 'policy_finding_error') {
            // This example supports sending exemption request for the policy finding error
            // only.
            throw $googleAdsException;

            "\t%s: %s%s",
        if (
            && !is_null($error->getDetails()->getPolicyFindingDetails())
        ) {
            $policyFindingDetails = $error->getDetails()->getPolicyFindingDetails();
            printf("\tPolicy finding details:%s", PHP_EOL);

            foreach ($policyFindingDetails->getPolicyTopicEntries() as $policyTopicEntry) {
                /** @var PolicyTopicEntry $policyTopicEntry */
                $ignorablePolicyTopics[] = $policyTopicEntry->getTopic();
                    "\t\tPolicy topic name: '%s'%s",
                    "\t\tPolicy topic entry type: '%s'%s",
                // For the sake of brevity, we exclude printing "policy topic evidences" and
                // "policy topic constraints" here. You can fetch those data by calling:
                // - $policyTopicEntry->getEvidences()
                // - $policyTopicEntry->getConstraints()
    return $ignorablePolicyTopics;

Send another mutate request by including ignorable policy topics

  1. Create an object of PolicyValidationParameter.
  2. Set stored ignorable policy topics to the ignorable_policy_topics field of the created PolicyValidationParameter.
  3. Set PolicyValidationParameter to the policy_validation_parameter field of an ad group ad operation.
  4. Send a mutate request for creating the ad group ad as usual.


private static function requestExemption(
    int $customerId,
    AdGroupAdServiceClient $adGroupAdServiceClient,
    AdGroupAdOperation $adGroupAdOperation,
    array $ignorablePolicyTopics
) {
    print "Try adding an expanded text ad again by requesting exemption for its policy"
        . " violations." . PHP_EOL;
        new PolicyValidationParameter(['ignorable_policy_topics' => $ignorablePolicyTopics])
    $response = $adGroupAdServiceClient->mutateAdGroupAds(
        "Successfully added an expanded text ad with resource name '%s' by requesting"
        . " for policy violation exemption.%s",

Code examples

The ErrorHandling folder of each client library contains the following code example that shows how to use this feature: