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
 

Ad Service

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

WSDL

Ad Service methods

addAd

Create a new ad within an ad group.

Parameters

token String API authentication token
ad AdStruct An object containing all ad fields

Response

AdStruct A data structure containing the newly created ad

addAds

Create multiple ads from the specified list.

Parameters

token String API authentication token
ads AdStruct[] An array of the ads to create

Response

AdStruct[] An array of data structures that contain the newly created ads

getAd

Retrieve ad information for the specified ad.

Parameters

token String API authentication token
ad_id int The ID for the requested ad

Response

AdStruct A data structure containing all ad information

getAds

Retrieve ad information for the specified ads.

Parameters

token String API authentication token
ad_ids int[] Array of ad IDs for which ad information is requested

Response

AdStruct[] An array containing ad data structures for the specified ad IDs

getAdsForAccount

Retrieve all ads for the specified account.

Parameters

token String API authentication token
account_id int The ID of the target account

Response

AdStruct[] An array containing ad data structures for the specified account

getAdsForAccountByPage

Retrieve all ads on the specified page for the given account.

Parameters

token String API authentication token
account_id int The ID of the target account
page int The target page number

Response

AdStruct[] An array containing ad data structures for the specified page and account

getAdsForAdGroup

Retrieve ad information for all ads in the specified ad group.

Parameters

token String API authentication token
ad_group_id int The ID of the target ad group

Response

AdStruct[] An array containing ad data structures for the specified ad group

getAdsForCampaign

Retrieve ad information for all ads in the specified campaign.

Parameters

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

Response

AdStruct[] An array containing ad data structures for the specified campaign

getAdsForCampaignPage

Retrieve all ads on the specified page for the given campaign.

Parameters

token String API authentication token
campaign_id int The ID of the campaign to which the ads belong
page int The page number

Response

AdStruct[] An array containing ad data structures for the specified page and campaign

getNumAdPagesForAccount

Get the total number of pages of ad records for the specified campaign.

Parameters

token String API authentication token
account_id int The ID of the target account

Response

int The total number of ad records in the account

getNumAdPagesForCampaign

Get the total number of pages of ad records for the specified campaign.

Parameters

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

Response

int The total number of ad records in the campaign

updateAd

Update ad information for the given ad.

Parameters

token String API authentication token
ad AdStruct An object containing all ad fields

Response

AdStruct A data structure containing updated ad information

updateAds

Update ad information for the given ads.

Parameters

token String API authentication token
ads AdStruct[] An array of the objects containing the ad fields to update

Response

AdStruct[] An array of data structures containing updated ad information

updateAdState

Update only the ad_state field of the ad. While this method takes a AdStruct, the only required fields of the struct are ad_id and ad_state. All other fields of the struct will be ignored.

Parameters

token String API authentication token
ad AdStruct The AdStruct to update
Required fields:
  • ad_id
  • ad_state

Response

AdStruct[] A data structure containing updated ad information

updateAdStates

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

Parameters

token String API authentication token
ad AdStruct The AdStruct to update
Required fields:
  • ad_id
  • ad_state

Response

AdStruct[] An array of data structures containing updated ad information