POST
/
gads
/
create_search_campaign
Create Search Campaign
curl --request POST \
  --url https://public.plai.io/gads/create_search_campaign \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "userId": "<string>",
  "objective": "<string>",
  "campaignName": "<string>",
  "dailyBudget": "<string>",
  "startDate": "<string>",
  "endDate": "<string>",
  "keywords": [
    {
      "text": "<string>",
      "match_type": "<string>"
    }
  ],
  "negativeKeywords": [
    {
      "text": "<string>",
      "match_type": "<string>"
    }
  ],
  "locations": [
    "<string>"
  ],
  "proximityTargeting": [
    {
      "radius_units": "<string>",
      "radius": 123,
      "longitude_in_micro_degrees": 123,
      "latitude_in_micro_degrees": 123
    }
  ],
  "negativeLocations": [
    "<string>"
  ],
  "geo_target_type": "<string>",
  "languages": [
    "<string>"
  ],
  "ads": [
    {
      "url": "<string>",
      "headlines": [
        "<string>"
      ],
      "descriptions": [
        "<string>"
      ],
      "headlineIndexToPinFirstSlot": 123,
      "descriptionIndexToPinFirstSlot": 123
    }
  ],
  "conversionEvents": [
    "<string>"
  ],
  "callouts": [
    "<string>"
  ],
  "phoneNumber": "<string>",
  "phoneNumberCountryCode": "<string>",
  "leadFormAssetId": "<string>",
  "images": [
    "<string>"
  ],
  "utmParams": "<string>",
  "locationGroupId": "<string>"
}'
{
  "success": true,
  "results": {
    "success": true,
    "adGroupResourceName": "<string>",
    "campaignResourceName": "<string>",
    "additionalMessage": "<string>",
    "error": "<string>"
  }
}

Request Body

userId
string
required
User ID, If not already created, make a user on create user page first. If already created, retrieve the user ID from get profile page.
objective
string
required
Specifies the goal of the campaign. Determines how the campaign is optimized and what actions are prioritized.
  • TRAFFIC: Optimizes the campaign to drive users to a website or landing page.
  • CONVERSION: Optimizes the campaign to drive valuable actions like sign-ups, purchases, or leads.
Valid objective values: CONVERSION, TRAFFIC
campaignName
string
required
Name of the campaign
dailyBudget
string
required
Daily budget of the campaign
dailyBudget
string
required
Daily budget of the campaign.
The currency used for the dailyBudget is the same as the one set during the ad account creation.
startDate
string
required
Start Date Format: YYYY-MM-DD, use to schedule the campaign to start at a specific date.
endDate
string
End Date Format: YYYY-MM-DD, use to schedule the campaign to end at a specific date.
keywords
object[]
required
Keywords for the campaign. You can either pass your own keywords or use our generate keyword ideas API to get keyword suggestions.
negativeKeywords
object[]
Negative keywords for the campaign. Locations that should be excluded from targeting. You can either pass your own keywords or use our generate keyword ideas API to get keyword suggestions.
locations
string[]
required
locations is an array of target location IDs for the campaign. To get the locationId reference get location API.
Locations is required if proximityTargeting is not provided.
proximityTargeting
object[]
proximityTargeting allows you to define radius-based targeting for your campaign. Use this when you want to show ads to users within a certain distance from a specific geographic point. This is especially useful for local businesses or location-based services.
Proximity targeting is required if locations is not provided.
negativeLocations
string[]
negative_locations is an array of location IDs that you want to exclude from the campaign targeting. To get the locationId reference get location API.
geo_target_type
string
Targeting type for the campaignValid values: PRESENCE, PRESENCE_OR_INTEREST
Default geo_target_type is PRESENCE.
languages
string[]
Languages for the campaign. Array of language code strings.Language code string (e.g., “en”, “es”, “fr”, etc.)
ads
object[]
required
ads defines the list of ad creatives to be used in the campaign. Each entry includes the destination URL, multiple headlines and descriptions (as arrays of strings), along with optional fields to pin a specific headline or description to the top position in the ad.
conversionEvents
string[]
conversionEvents is an array of strings that define the desired conversion actions for the campaign. To get the conversion categories reference get conversion action API.
Conversion events are required if objective is “CONVERSION”.
callouts
string[]
required
Callouts are Keywords for the campaign. You can either type your own keywords or use our generate keyword ideas API to get keyword suggestions.
phoneNumber
string
Phone number to be displayed with the campaign. Must be in a valid local format.
Example: (201) 555-0123
phoneNumberCountryCode
string
Two-letter country code in uppercase (ISO format).
Example: “US”, “PK”, “BE”
phoneNumberCountryCode is required if phoneNumber is provided.
leadFormAssetId
string
A lead form is a Google Ads asset used to collect user information directly within the ad. To get the lead form asset ID reference get lead forms API or create lead form API.
images
string[]
Image assets for the campaign. Provide an array of image URLs. Make sure the connected Google Ads account is eligible to use image assets by using our Image Asset Eligibility API.
utmParams
string
UTM parameters for the campaign
locationGroupId
string
Unique identifier of the location group to associate with this campaign.This ID allows your ads to appear on Google Maps and in location-based search results by linking your campaign to a group of business locations.You can obtain the locationGroupId by calling the Create Location Group API.

Response

success
boolean
Indicates that the HTTP response was successful (status code 200 OK).
results
object