...
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 |
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 | |
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 |
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 italian food |
raw_where | The original user search term if available. | No | los%20angeles | 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. | No |
| google |
client serve_ip The IP address of your clienturl | 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 | 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 |
serve_url | The URL of the requested page. | No |
| http%3A%2F%2Fnational.citysearch.com%2Fprofile%2F10843791 |
Errors
Errors are indicated in the HTTP response as follows:
HTTP Status Code | Type | Message | Description |
---|---|---|---|
403 | Status report | publisher Unescaped URL | http://losangeles.citysearch.com/profile/45654239/los_angeles_ca/green_door.html |
Errors
Errors are indicated in the HTTP response as follows:
HTTP Status Code | Type | Message | Description | ||||
---|---|---|---|---|---|---|---|
403 | Status report | publisher is a required field. | Access is forbidden because of a missing publisher property. | ||||
403 | Status report | collection_id is a required field. | Access is forbidden because of a missing publisher collection_id property. | ||||
403 | Status report | collection_id what is a required field. | Access is forbidden because of a missing collection_id property what parameter. | ||||
403 | Status report | what is a required field. | Access is forbidden because of a missing what parameter. | 403 | Status report | either either where or lat/lon is required. | Access is forbidden because of missing location information (where or lat and lon). |
403 | Status report | Invalid publisher parameter | Access is forbidden because of an invalid publisher property. | ||||
403 | Status report | Invalid collection_id parameter | Access is forbidden because of an invalid collection_id property. | ||||
403 | Status report | max must be between 1-10. | Access is forbidden because of an invalid max property. |
...
CollectionId | Description | ||
---|---|---|---|
mobile-001-320x50 | 320x50 is the native resolution for iPhone. This This collection holds a single generic template. For high-resolution hd version please use collectionId mobile-004-320x50. | ||
mobile-002-300x50 300x50 is the native resolution for most Android phones. This collection holds a single generic template. | mobile-003-300x250 | A standard medium-rectangle sized ad. This collection holds a single generic template. | |
mobile-003-300x250 |
| ||
mobile-004-320x50 | For ad samples please refer to collection mobile-001-320x50. This collection contains the same templates as mobile-001-320x50 but with higher resolution. | ||
mobile-005-300x250 | Category-based ad. This collection contains a set of templates with different themes and will use the one best matched the user search term. | ||
mobile-006-320x50 | Category-based ads. This collection contains a set of templates with different themes and will use the one best matched the user search term. | ||
mobile-007-300x50 | Category-based ads. This collection contains a set of templates with | ||
mobile-008-320x50 | Please refer to collection mobile-001006-320x50. This collection contains the same templates as mobile-001006-320x50 but with higher resolution. | ||
mobile-005009-300x250 216x36 | Category-based adads. This collection contains a set of templates with different themes and will use the one best matched the user search term. | ||
mobile-006010-320x50 360x480 | Category-based ads. This collection contains a set of templates with different themes and will use the one best matched the user search term. | ||
mobile-007011-300x50 720x90 | Category-based ads. This collection contains a set of templates with | mobile-008-320x50 |
|
House Ads
If an ad request cannot be satisfied, a house advertisement image is returned. The API randomly selects one house ad from those available for the collection ID supplied.
...