Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following are changes for version 2, updated from version 1:

  • Added support for SSL
  • New endpoint URLs beginning with http://api.citygridmedia.com/content/places/v2/.
  • New parameters for search requests:
    • histograms
    • lat2
    • lon2
    • has_offers
    • i (impression_id)
  • Changes to the Places Search response:
    • Added impression_id.
    • If there is no featured, an empty element is still provided in the response.
    • If there is no distance, an empty element is still provided in the response.
    • If there is no image, an empty element is still provided in the response.
    • If there is no fax_number, an empty element is still provided in the response.
    • If there is no tagline, an empty element is still provided in the response.
    • If there is no website, an empty element is still provided in the response.
    • If there is no has_video, an empty element is still provided in the response.
    • If there is no has_offers, an empty element is still provided in the response.
    • If there is no expansion, an empty element is still provided in the response.
    • If there are no spelling suggestions, an empty element/attribute is still provided in the response.
  • Changes involving geocoding:
    • For the XML response, there is now a regions element around a collection of region results.
    • If there are no regions, an empty element/attribute is still provided in the response.
  • Changes involving histograms, if histogramsis set to "true":
    • For the XML response, there is now a histograms element around a collection of histogram results.
    • For the XML response, there is now an items element around a collection of item results
    • If there are no histograms, an empty element/attribute is still provided in the response.
  • New parameters for detail requests:
    • i (impression_id)
    • image_count
    • image_size_min
    • image_size_max
  • Changes to the Places Details response:
    • Added impression_id.
    • review_date, editorial_date, and offer_expiration_date are in ISO 8601 format.
    • For both JSON and XML responses, reviews has been renamed to review_info.
    • For the JSON response, review has been renamed to reviews.
    • For the XML response, there is now a reviews element around a collection of review elements.
    • Attributes nameid and parentid associated with category are now name_id and parent_id.
    • Attribute groupid associated with group is now group_id.
    • Attribute attributeid associated with attribute is now attribute_id.
    • For the JSON response, markets is now an array of strings.
    • For the JSON response, neighborhoods is now an array of strings.
    • For the JSON response, bullets is now an array of strings.
    • Added Google's Protocol Buffers as format option.
    • Added geographies.
  • Changes to Places details error codes:
    • Removal of review_count.out.of.range - If a supplied value is out of range, the default value is used (see Places Detail Request below).
    • Removal of format.unacceptable - If a supplied value is not one of the expected values (see Places Detail Request below), the response will be returned in XML.
    • Added image.count.illegal
    • Added image.count.out.of.range
    • Added image.size.range.invalid
    • Added image.size.illegal

...

The where endpoint returns places whose geography is specified with free-form text. The text can consist of a zip code, the name of a neighborhood or city, or a street address.

Where Search

...

HTTPS Endpoint

The following endpoint supports HTTP HTTPS GET:

Code Block
XML
XML
httphttps://api.citygridmedia.com/content/places/v2/search/where

...

...

To search for a location with a string, use the where endpoint and set the where parameter to the location's name or zip code. The CityGrid service will automatically parse the text and determine the geographical region to be searched.

Example: httphttps://api.citygridmedia.com/content/places/v2/search/where?type=movietheater&where=90045&publisher=test

...

The latlon endpoint allows you to search for places using a geographic region defined by latitude and longitude.

LatLon Search

...

HTTPS Endpoint

The following endpoint supports HTTP HTTPS GET:

Code Block
XML
XML
httphttps://api.citygridmedia.com/content/places/v2/search/latlon

...

...

The point-radius search returns listings in a region with the specified radius. To use this search, specify the lat, lon, and radius parameters.

Example: httphttps://api.citygridmedia.com/content/places/v2/search/latlon?type=movietheater&lat=34.03&lon=-118.28&radius=5&publisher=test

...

The box search is similar to the point-radius search, except that it returns listings in a rectangular region rather than a square or circular one. It does not calculate distances between a place and a reference coordinate, so searches are often faster. To use this search, specify the lat, lon, lat2, and lon2 parameters.

Example: httphttps://api.citygridmedia.com/content/places/v2/search/latlon?type=movietheater&lat=34.03&lon=-118.28&lat2=34.08&lon2=-118.23&publisher=test

...

For example, the following request:

Code Block
XML
XML
httphttps://api.citygridmedia.com/content/places/v2/search/where?what=food&where=los+angeles,ca

...

For example, the following request:

Code Block
XML
XML
httphttps://api.citygridmedia.com/content/places/v2/search/where?where=lax&page=q&lon=2&format=json

...

The Places Details API provides programmatic access to CityGrid's local listings data, including businesses and events.

Detail

...

HTTPS Endpoint

Code Block
XML
XML
httphttps://api.citygridmedia.com/content/places/v2/detail

...

Usage

URL

Find the place with listing id 10100230, placement "search_page", and client ip 123.4.56.78

httphttps://api.citygridmedia.com/content/places/v2/detail?id=10100230&id_type=cs&placement=search_page&client_ip=123.4.56.78&publisher=test

Find the place with infousa ID of 412275828 and client IP of 123.124.123.124

httphttps://api.citygridmedia.com/content/places/v2/detail?id=412275828&id_type=iusa&client_ip=123.124.123.124&publisher=test

Find the place with phone 323-256-9617 and client IP of 123.124.123.124

httphttps://api.citygridmedia.com/content/places/v2/detail?phone=3232569617&client_ip=123.124.123.124&publisher=test

Find the place with phone 323-256-9617 and client IP of 123.124.123.124, and placement "search_page" and display all listings associated with that phone

httphttps://api.citygridmedia.com/content/places/v2/detail?phone=3232569617&client_ip=123.124.123.124&placement=search_page&all_results=true&publisher=test

Find the place with phone 323-256-9617 and client IP of 123.124.123.124, and placement "search_page" and (at most) the first 10 reviews

httphttps://api.citygridmedia.com/content/places/v2/detail?phone=3232569617&client_ip=123.124.123.124&placement=search_page&review_count=10&publisher=test

...

For example, the following request:

Code Block
XML
XML
httphttps://api.citygridmedia.com/content/places/v2/detail?listing_id=joes+pizza

...

For example, the following request:

Code Block
XML
XML
httphttps://api.citygridmedia.com/content/places/v2/detail?listing_id=2&publisher=sam&format=json

...