LookSmart® API v4.0 Developer Implementation Guide
  Introduction
  Accounts Service
  Campaigns Service
  Ad Groups Service
  Ads Service
  Keywords Service
  Reports Service
  Geo Locations
Frequently Asked Questions
Implementation Guide

version 3
 

Campaign Service

Developers are encouraged to use the paginated form of reporting methods when possible, as they are more reliable for larger data sets.

WSDL

Campaign Service methods

addCampaign

Create a new campaign within the specified account.

Parameters

token String API authentication token
campaign CampaignStruct A structure containing all campaign information

Response

CampaignStruct A data structure containing the newly created campaign information

addCampaignNegativeKeyword

Add a single negative broad keyword to a campaign.

Parameters

token String API authentication token
campaign_id integer The ID of the target campaign
keyword String The negative broad keyword to add

Response

boolean A boolean value indicating whether the negative broad keyword was successfully added

addCampaignNegativeKeywords

Add multiple negative broad keywords to a campaign.

Parameters

token String API authentication token
campaign_id integer The ID of the target campaign
keywords String[] The negative broad keywords to add

Response

boolean A boolean value indicating whether the negative broad keywords were successfully added

addCampaigns

Create multiple campaigns.

Parameters

token String API authentication token
campaigns CampaignStruct[] An array of data structures containing all campaign information

Response

CampaignStruct[] An array of data structures that contain the newly created campaigns

getAdSchedule

Returns the ad scheduling intervals that are currently turned on for the specified campaign.

Parameters

token String API authentication token
campaign_id int ID of the target campaign

Response

AdScheduleStruct A data structure containing the ad schedule for the campaign

getCampaign

Get detailed campaign information for a specified campaign ID.

Parameters

token String API authentication token
campaign_id int ID of the target campaign

Response

CampaignStruct A data structure containing all campaign information

getCampaignNegativeKeywords

Get all the negative broad keywords for a given campaign.

Parameters

token String API authentication token
campaign_id integer The ID of the target campaign

Response

String[] An array containing all negative broad keywords associated with the campaign

getCampaigns

Get detailed campaign information for the specified campaign IDs.

Parameters

token String API authentication token
campaign_ids[] int[] An array containing the target campaign IDs

Response

CampaignStruct[] An array containing campaign data structures for the specified campaign IDs

getCampaignsForAccount

Get all the campaigns for the specified account and page.

Parameters

token String API authentication token
account_id int The account ID for which campaign data is requested

Response

CampaignStruct[] An array containing campaign data structures for the specified account

getCampaignsForAccountByPage

Get all the campaigns for the specified account and page.

Parameters

token String API authentication token
account_id int The account ID for which campaign data is requested
page int The page number

Response

CampaignStruct[] An array containing campaign data structures for the specified page and account

getGeoTargeting

Get detailed geo-targeting information for the specified campaign.

Parameters

token String API authentication token
campaign_id int An integer containing the target campaign ID

Response

GeoStruct All the geo targets that are currently set for the campaign.

getNumCampaignPagesForAccount

Returns the total number of pages of campaign records in the account.

Parameters

token String API authentication token
page int the target campaign

Response

int The total number of campaign records in the account

removeCampaignNegativeKeyword

Remove a single negative keyword from a campaign.

Parameters

token String API authentication token
campaign_id integer The ID of the target campaign
keyword String The negative keyword to remove

Response

boolean A boolean flag indicating whether the negative keyword was successfully removed

removeCampaignNegativeKeywords

Remove multiple negative keyword from a campaign.

Parameters

token String API authentication token
campaign_id integer The ID of the target campaign
keywords String[] A list of negative keywords to remove

Response

boolean A boolean flag indicating whether the negative keywords were successfully removed

setAdSchedule

Set the ad scheduling for this campaign. This method will overwrite the existing ad schedule.

Parameters

token String API authentication token
campaign_id integer The ID of the target campaign
schedule AdScheduleStruct The new ad schedule

Response

AdScheduleStruct The current ad schedule for the campaign

setAdScheduleStatus

Set the ad scheduling status for this campaign. The ad scheduling status for a campaign can be set to either enabled or disabled. All other values will be ignored.

Parameters

token String API authentication token
campaign_id integer The ID of the target campaign
status String The status of the ad schedule

Response

AdScheduleStruct The current ad schedule for the campaign

setGeoTargeting

Replace geo-targeting information for the specified campaign. Any invalid geo-targeting parameters passed on the method will be ignored. An error condition will not be raised for invalid geo-targeting parameters.

Parameters

token String API authentication token
campaign_id int An integer containing the target campaign ID
geostruct GeoStruct An structure containing the geo-targeting parameters that will replace the existing geo-targeting parameters for the given campaign

Response

GeoStruct All the geo targets that are currently set for the campaign

setSchedulingInterval

Turns a specific interval on or off for the specified campaign. Allows you to make changes to the current ad schedule without having to make a call to setAdSchedule.

Parameters

token String API authentication token
campaign_id integer The ID of the target campaign
interval SchedulingIntervalStruct The scheduling interval to modify
state boolean A flag indicating whether to turn this interval on or off. A value of true will turn the interval on; false will turn it off.

Response

AdScheduleStruct The current ad schedule for the campaign

updateCampaignAdRotationType

Updates the ad_rotation_type field of a campaign. While this method takes a CampaignStruct, the only required fields of the struct are the campaign_id and ad_rotation_type. All other fields of the struct will be ignored.

Parameters

token String API authentication token
campaign CampaignStruct A structure containing campaign information
Required fields:
  • campaign_id
  • ad_rotation_type

Response

CampaignStruct A data structure containing updated campaign information

updateCampaignAdRotationTypes

Updates the ad_rotation_type field of multiple campaigns. As with singular form of this method, the only required fields of each struct are the campaign_id and ad_rotation_type. All other fields of the struct will be ignored.

Parameters

token String API authentication token
campaign CampaignStruct[] A structure containing campaign information
Required fields:
  • campaign_id
  • ad_rotation_type

Response

CampaignStruct[] An array of data structures containing updated campaign information

updateCampaign

Update campaign information.

Parameters

token String API authentication token
campaign CampaignStruct A structure containing all campaign information

Response

CampaignStruct A data structure containing updated campaign information

updateCampaigns

Update campaign information for all of the given campaigns.

Parameters

token String API authentication token
campaigns CampaignStruct[] An array of structures containing all campaign information

Response

CampaignStruct[] An array of data structures containing updated campaign information

updateCampaignBudget

Update the budget field of a campaign. While this method takes a CampaignStruct, the only required fields of the struct are campaign_id and budget. All other fields of the struct will be ignored.

Parameters

token String API authentication token
campaign CampaignStruct A structure containing campaign information
Required fields:
  • campaign_id
  • budget

Response

CampaignStruct A data structure containing updated campaign information

updateCampaignBudgets

Updates the budget field of multiple campaigns. As with singular form of this method, the only required fields of each struct are the campaign_id and budget. All other fields of the struct will be ignored.

Parameters

token String API authentication token
campaign CampaignStruct[] A structure containing campaign information
Required fields:
  • campaign_id
  • budget

Response

CampaignStruct[] An array of data structures containing updated campaign information

updateCampaignMaxCpc

Update the max_cpc field of a campaign. While this method takes a CampaignStruct, the only required fields of the struct are campaign_id and max_cpc. All other fields of the struct will be ignored.

Parameters

token String API authentication token
campaign CampaignStruct A structure containing campaign information
Required fields:
  • campaign_id
  • max_cpc

Response

CampaignStruct A data structure containing updated campaign information

updateCampaignMaxCpcs

Updates the max_cpc field of multiple campaigns. As with singular form of this method, the only required fields of each struct are the campaign_id and max_cpc. All other fields of the struct will be ignored.

Parameters

token String API authentication token
campaign CampaignStruct[] A structure containing campaign information
Required fields:
  • campaign_id
  • max_cpc

Response

CampaignStruct[] An array of data structures containing updated campaign information

updateCampaignState

Update the state field of a campaign. While this method takes a CampaignStruct, the only required fields of the struct are campaign_id and campaign_state. All other fields of the struct will be ignored.

Parameters

token String API authentication token
campaign CampaignStruct A structure containing campaign information
Required fields:
  • campaign_id
  • campaign_state

Response

CampaignStruct A data structure containing updated campaign information

updateCampaignStates

Updates the state field of multiple campaigns. As with singular form of this method, the only required fields of each struct are the campaign_id and campaign_state. All other fields of the struct will be ignored.

Parameters

token String API authentication token
campaign CampaignStruct[] A structure containing campaign information
Required fields
  • campaign_id
  • campaign_state

Response

CampaignStruct[] An array of data structures containing updated campaign information