Versions Compared

Key

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

...

Parameter

Description

Required

Valid Values

Default

Examples

Notes

type

Restricts results search to listings of the given type (category)

See Notes below.

movie
movietheater
restaurant
hotel
travel
barclub
spabeauty
shopping

 

movie
hotel
restaurant

A full list of types supported is available as a json list and as a json tree. Only one category may be provided.

what

Search term text

See Notes below.

 

 

pizza
sporting%20goods
plumbers

 

tag

Restricts search to listings with the given tag id

See Notes below.

An integer

 

1722

Tag ids are internal CityGrid identifiers and subject to change. A full list of types supported is available as a json list and as a json tree. This parameter may be used in queries that are obtained as "refinement urls" from previous searches

chain

Restricts search to listings with the given chain id.

See Notes below.

An integer

 

360861766
41859967

Chain ids are internal CityGrid identifiers and subject to change. This parameter should only be used in queries that are obtained as "chain expansion urls" from previous searches.

first

Restricts search to entities whose name begins with the given character, or if "#", then to entities beginning with any digit

No

A character

 

s
c

 

where

The geographic location

Yes

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
1%20Main,Miami,FL

Address-based search is performed when this parameter starts with a number and contains non-numeric characters; it is much slower than searching a named region

page

The page number of the result set to display

No

Positive integer

1

8

 

rpp 

Results per page

No

Positive integer between 1 and 50 inclusive

20

20

 

sort

Sort criterion for the results

No

dist
alpha
highestrated
mostreviewed
topmatches
offers

 

dist

Use alpha to sort results alphabetically, and dist to sort by increasing distance from the center of the search region. The dist request is only valid for address-based and circle searches.
If this parameter is omitted, the results will be ranked by relevance for keyword searches and distance for latitude and longitude

publisher

The publisher code that identifies you.

Yes

 

 

acme

 

format

The desired format for the results

No

json
xml
pbuf

xml

json

json = javascript object notation
xml = extensible markup language
pbuf = Google's Protocol Buffers

placement

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

No

 

 

 

An example: if you run a search engine marketing campaign for, say, Google and Yahoo!, you can set the placement property to "sem_google" or "sem_yahoo". Alternatively, if you publish CityGrid listings in different locations in your own site, you can set the placement property to values such as "home_page" or "search" (all up to you). CityGrid will organize reports for you by placement

has_offers

Return Restricts search to listings that have offers associated with them

No

true
false

false

true 
false

If this parameter is set to false it ignores the flag and returns all listings regardless of having offers.

histograms

An optional property for providing Provide information on how many listings are in given groups and categories.

No

true
false

false

 

Turning on histograms can affect performance. More information is provided below.

call_idAn optional property used to identify Iddentify a single search requests over subsequent pages.    The value should be set when making subsequent calls for the same search, but a different page of the results. This user should never supply their own generated value for call_id, instead it should be taken from the search results's first page.
tag_refinementAn optional property Restricts search to return listings containing specific tags.NoTag(s) separated by comma. haircut,hair dyeThis is for getting results that match ALL tags. To search for results that match ANY tags use the what parameter
siteRestricts search to listings at a specific locationNoInteger 12345Site Ids are provided in Places Detail API response where valid. This is useful for finding all places at a given location (e.g. a mall, a shopping or medical center, etc.)

Anchor
SearchWhereNotes
SearchWhereNotes

Note that there are four ways to specify the kind of places to return in a where search.

...

Parameter

Description

Required

Valid Values

Default

Examples

Notes

type

Restricts results search to listings of the given type

See Notes below.

movie
movietheater
restaurant
hotel
travel
barclub
spabeauty
shopping

 

movie 
hotel 
restaurant 

A full list of types supported is available as a json list and as a json tree. Only one category may be provided.

what

Search term text

See Notes below.

 

 

pizza 
sporting%20goods 
plumbers

A full list of types supported is available as a json list and as a json tree

tag

Restricts search to listings with the given tag id

See Notes below.

An integer

 

1722

Tag ids are internal CityGrid identifiers and subject to change. A full list of types supported is available as a json list and as a json tree. This parameter may be used in queries that are obtained as "refinement urls" from previous searches.

chain

Restricts search to listings with the given chain id.

See Notes below.

An integer.

 

360861766 
41859967

Chain ids are internal CityGrid identifiers and subject to change. This parameter should only be used in queries that are obtained as "chain expansion urls" from previous searches.

first

Restricts search to entities whose name begins with the given character, or if "#", then to entities beginning with any digit

No

A character

 


c

 

lat

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

Yes.

 

 

37.65056

 

lon

Longitude of the center of a circle to search.

Yes

 

 

-119.03639

 

lat2

Second latitude used when performing a manual box search

See Notes below.

 

 

37.65056

lat2 and lon2 represents the lower right corner of the box

lon2

Second longitude used when performing a manual box search

See Notes below.

 

 

-119.03639

lat2 and lon2 represents the lower right corner of the box

radius

Radius of a circle search

See Notes below.

Positive number between 0 and 50 inclusive

5

7.5 

If larger than 50 it defaults to 50

page

The page number of the result set to display

No

Positive integer

1

8

 

rpp 

Results per page

No

Positive integer between 1 and 50 inclusive

20

20

 

sort

Sort criterion for the results

No

dist
alpha
highestrated
mostreviewed
topmatches
offers

 

dist

Use alpha to sort results alphabetically, and dist to sort by increasing distance from the center of the search region. The dist request is only valid for address-based and circle searches. 
If this parameter is omitted, the results will be ranked by relevance for keyword searches and distance for latitude and longitude

publisher

The publisher code that identifies you.

Yes

 

 

acme

 

format

The desired format for the results

No

json
xml
pbuf

xml

json

json = javascript object notation
xml = extensible markup language
pbuf = Google's Protocol Buffers

placement

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

No

 

 

 

An example: if you run a search engine marketing campaign for, say, Google and Yahoo!, you can set the placement property to "sem_google" or "sem_yahoo". Alternatively, if you publish CityGrid listings in different locations in your own site, you can set the placement property to values such as "home_page" or "search" (all up to you). CityGrid will organize reports for you by placement

has_offers

Whether to return only listings Restricts search to listings that have offers associated with them

No

true
false

false

true 
false

 

histograms

An optional property for providing Provide information on how many listings are in given groups and categories.

No

true
false

false

 

Turning on histograms can affect performance. More information is provided below.

call_idAn optional property used to identify Identify a single search requests over subsequent pages.    The value should be set when making subsequent calls for the same search, but a different page of the results. This user should never supply their own generated value for call_id, instead it should be taken from the search results's first page.
tag_refinementAn optional property Restricts search to return listings containing specific tags.NoTag(s) separated by comma. haircut,hair dyeThis is for getting results that match ALL tags. To search for results that match ANY tags use the what parameter
siteRestricts search to listings at a specific locationNoInteger 12345Site Ids are provided in Places Detail API response where valid. This is useful for finding all places at a given location (e.g. a mall, a shopping or medical center, etc.)
Note

Arguments must be properly URL-encoded (spaces as %20 or +, ampersands as %26, and so on).

...