...
Parameter | Description | Required | Valid Values | Default | Examples | Notes |
---|---|---|---|---|---|---|
type | Restricts results search to listings of the given type (category) | See Notes below. | movie |
| movie | 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 |
|
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 | 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 |
|
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 | 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 |
| 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. |
publisher | The publisher code that identifies you. | Yes |
|
| acme |
|
format | The desired format for the results | No | json | xml | json | json = javascript object notation |
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 | true | 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 |
| Turning on histograms can affect performance. More information is provided below. |
call_id | An 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_refinement | An optional property Restricts search to return listings containing specific tags. | No | Tag(s) separated by comma. | haircut,hair dye | This is for getting results that match ALL tags. To search for results that match ANY tags use the what parameter | |
site | Restricts search to listings at a specific location | No | Integer | 12345 | Site 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 | ||||
---|---|---|---|---|
|
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 |
| movie | 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 | 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 | 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 |
|
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 |
| 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. |
publisher | The publisher code that identifies you. | Yes |
|
| acme |
|
format | The desired format for the results | No | json | xml | json | json = javascript object notation |
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 | true |
|
histograms | An optional property for providing Provide information on how many listings are in given groups and categories. | No | true | false |
| Turning on histograms can affect performance. More information is provided below. |
call_id | An 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_refinement | An optional property Restricts search to return listings containing specific tags. | No | Tag(s) separated by comma. | haircut,hair dye | This is for getting results that match ALL tags. To search for results that match ANY tags use the what parameter | |
site | Restricts search to listings at a specific location | No | Integer | 12345 | Site 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). |
...