Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Parameter

Description

Required

Valid Values

Examples

publisher

The publisher code that identifies you. This parameter is required so that we know who to credit.

Yes

Contact your account manager for your publisher code.

acme

collection_id

Used for rotation or targeting. A publisher can have multiple collections and is required to pass one collection id per request.

Yes

A predefined id that holds template information. See Collection IDs for more information.

mobile-001-320x50
mobile-003-300x250

what

What a user is searching for. For multi-word searches, simply put a space between the words.

Yes

 

pizza
sporting%20goods
plumbers

where

The geographic location, generally a zip code or city-state pair.

Yes, if lat and lon are not provided.

A zip code, city-state pair, or street address. Spaces are optional following the comma between a city and state.

91011
Pasadena,%20CA 
Cambridge,MA 

lat

Latitude of the center of a circle for a geographic search.

Yes, if where is not specified

A decimal between -90 and 90.

37.65056

lon

Longitude of the center of a circle for a geographic search.

Yes, if where is not specified

A decimal between -180 and 180.

-119.03639

radius

Radius of a circle search, in miles. Defaults to 5. If radius is larger than 25, it will be clamped to 25.

Yes, if lat and lon are specified

An integer between 1 and 25, inclusive.

2

raw_what

The original user search term if available.

No

 

italian%20food
plumbing%20work

raw_where

The original user search term if available.

No

 

los%20angeles

format

The desired format for the results. The default format is xml.

No

xml
json

json

max

The maximum number of results to return. The default value is 10. Values over 10 will be clamped to 10.

No

Integers in the range 1 through 10.

3

muid

The hash of user phone number and/or device ID as provided by the carrier. Maximum of 32 characters.

Yes

device ID
phone number

2054538217

i

The impressionId that you obtained from a previous CityGrid API call.

No

 

0007000008b8b6fd23eb3c463ab3fdcc5b04f6ad13

placement

An optional property for storing additional information you would like CityGrid Media to log for this view.

For example, if you are re-syndicating advertisements, you can use this parameter to record the ultimate destination for the advertisement. If you are placing CityGrid advertisements on your own site, you can record where on your site the advertisement will be placed.

No

 

google
yahoo
searchresults

client_ip

The IP address of your client.

No

IPv4 or IPv6

17.148.221.102

user_agent

The version of browser or device the ad is served on.

No

 

Mozilla%2F5.0+%28BlackBerry%3B+U%3B+BlackBerry+9800%3B
+en-US%29+AppleWebKit%2F534.1%2B+%28KHTML%2C+like
+Gecko%29+Version%2F6.0.0.246+Mobile+Safari%2F534.1%2B

...

Element

Description

Parent Element

Attributes

ads

Top level container of advertisement elements.

 

 

ad

Advertisement data.

ads

id - The ID to uniquely identify the ad

impression_id

The impression ID returned per ad.

ad

 

ad_image_url

The URL where the image resides. See note below.

ad

 

listingId

The ID that uniquely identifies a CityGrid business.

ad

 

ad_destination_url

URL of the ad click.

ad

 

...

The following is an example of an XML response:

Code Block
xml
xml
titleXMLxml
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ads>
  <ad id="59886932">
    <listing_id>32895961</listing_id>
    <ad_destination_url>
      http://pfpc.citygridmedia.com/pfp/ad/v2?q=JKA_CPlD7kF2Zbqb...x87io-IfDI
    </ad_destination_url>
    <ad_image_url>
      http://banners.citygridmedia.com/mobileimages?W4d09-V3GJ...nxt0mjn-Q
    </ad_image_url>
    <impression_id>00c4050008b8b6fdb3eb3c463ab3fdcc5b04f6ad13</impression_id>
  </ad>
</ads>

...

Properties Name

Description

Required

Valid Values

Example

publisher

The publisher code that identifies you. This parameter is required so that we know who to credit.

Yes

Contact your account manager for your publisher code.

acme

collection_id

Used for rotation or targeting. A publisher can have multiple collections and is required to pass one collection id per request.

Yes

A predefined id that holds template information. See Collection IDs for more information.

mobile-001-320x50
mobile-003-300x250

width

The width of the ad slot. Pass the width of the ad space not the image size you expect.

Yes

An integer in pixels.

300

height

The height of the ad slot. Pass the height of the ad space not the image size you expect.

Yes

An integer in pixels.

250

what

What a user is searching for. For multi-word searches, simply put a space between the words.

Yes

 

pizza
sporting goods
plumbers

where

The geographic location, generally a zip code or city-state pair.

Yes, if lat and lon are not provided.

A zip code, city-state pair, or street address. Spaces are optional following the comma between a city and state.

91011
Pasadena, CA 
Cambridge,MA 

lat

Latitude of the center of a circle for a geographic search.

Yes, if where is not specified

A decimal between -90 and 90.

37.65056

lon

Longitude of the center of a circle for a geographic search.

Yes, if where is not specified

A decimal between -180 and 180.

-119.03639

radius

Radius of a circle search, in miles. Defaults to 5. If radius is larger than 25, it will be clamped to 25.

Yes, if lat and lon are specified

An integer between 1 and 25, inclusive.

2

raw_what

The original user search term if available.

No

 

italian food
plumbing work

raw_where

The original user search term if available.

No

 

los angeles

i

The impressionId that you obtained from a previous CityGrid API call.

No

 

0007000008b8b6fd23eb3c463ab3fdcc5b04f6ad13

placement

An optional property for storing additional information you would like CityGrid Media to log for this view.

For example, if you are re-syndicating advertisements, you can use this parameter to record the ultimate destination for the advertisement. If you are placing CityGrid advertisements on your own site, you can record where on your site the advertisement will be placed.

No

 

google
yahoo
searchresults

serve_url

This property is only required if the web ads is called within an iframe. This property stands for the url of the page that the ad is serving on.

No

Unescaped URL

http://losangeles.citysearch.com/profile/45654239/los_angeles_ca/green_door.html

...