View
 

Listing View

URL | Parameters | Response Properties | Example | Query | Response

 

The listing method takes a business entity's guid and returns a JSON array of the entity's property-value pairs, using data from the TownMe local information site. 

 

Property values may be strings, arrays, or have a null value. One property value, web-wide-rating, is a floating point number.

 

Two properties, chain and verticals, have associated data files. 

 

  • chain: If the entity is part of a chain, this property has a non-null value. A list of all valid chain values and their English equivalents (for example, ace-rent-a-car could be a chain value with associated English "ACE Rent A Car") is here.
  •  

  • verticals: This property has two associated data files, both containing values for the verticals property. A full value can have one or several levels; for example, restaurants has one level, while shopping:books-news-magazines:bookstores has three levels, separated by colons. 

     

    • verticalnames.txt: Lists in alphabetical order all possible full values for the verticals property value. The verticals entry in the Response Properties section describes the format in more detail, but this is where you'd find colon delimited multi-level values such as  shopping:books-news-magazines:bookstores.
    •  

    • verticals.txt: Similar to the chain file, it lists all of the individual level vertical values. For example, there are separate entries for each of shopping, books-news-magazines, and bookstores. Associated with each is its English equivalent, in the case of our example, "Shopping", "Books, news, magazines", and "Bookstores".

       

      When you do a listing view query, you get back businesses that have a verticals property value. You can look up the value in this file and get its well spaced and capitalized English version, which you then display to your users.

 

URL          [Top]

 

http://api.geoapi.com/v1/e/<guid>/view/listing

 

Parameters          [Top]

 

  • guid:

    • Required.
    • Business entity's guid.
    • Format: String. Must be the guid of a business type entity.
  • apikey:

    • Required.
    • Your application's GeoAPI key.
    • Format: String.
  • pretty:

    • Optional.
    • Enables easier to read prettified JSON in result.
    • Format: Set equal to 1 to enable prettification.
  • jsoncallback:

    • Optional.
    • Return response in JSONP format. JQuery has nice support for JSONP callbacks.
    • Format: JSON prefix string.

 

Response Properties          [Top]

 

  • address: Business' address, an array of strings (street address, city, zip code).

  • canonical-url: url for the entity's page at www.townme.com, a string.

  • chain: Name of chain the business is a part of, for example "jamba-juice". A string, or, if the business is not part of a chain, the non-string value null.  In general, multi-word chain names have their words separated by hyphens; for example "starbucks-coffee". See here for a list of all valid chain names.

  • features: Business features, an array of strings with possible values of:

    • Alcohol
    • Credit Card OK
    • Delivery
    • Noise: Quiet
    • Noise: Loud
    • Open Late
    • Outdoor Seating
    • Parking
    • Price: Cheap
    • Price: Moderate
    • Price: Expensive
    • Romantic
  • hours: Hours of operation, an array of tuples with values [days, hours, type])

  • listing-url: Business' webpage's url, a string.

  • name: Business' name, a string.

  • phone: Business' phone number in the format "(xxx) xxx-xxxx"

  • sips: Statistically Improbably Phrases, for example "hipsters" for Ritual Roasters in San Francisco. These are phrases/words we think are unique/interesting for that business. Since this value is compiled from terms posted on the web about the business, we cannot provide a list of possible values.

  • verticals: Business categories, an array of strings. Note that a specific vertical value can actually be a hierarchy of verticals from general to specific. For example, the vertical "arts-entertainment-and-nightlife:bars:sports-bars" is a more specific vertical than "arts-entertainment-and-nightlife" or "arts-entertainment-and-nightlife:bars". Levels are separated by colons.Click here for a list of all possible full vertical values and here for a list of all individual vertical values and their English equivalents. 

  • web-wide-rating: Aggregate web-wide TownMe rating on a 0.0 to 5.0 scale, a floating point number.

 

Example          [Top]

 

listing is also used in the What's Near Me demo.

 

Query          [Top]

 

http://api.geoapi.com/v1/e/ritual-coffee-roasters-san-francisco-ca-94110/view/listing?apikey=demo&pretty=1

 

Response          [Top]

 

{
"query": {
"params": {
"guid": "ritual-coffee-roasters-san-francisco-ca-94110", 
"view": "listing"
}, 
"type": "entity-view"
}, 
"result": {
"hours": [
[
"Mon to Fri", 
"6:00am to 10:00pm", 
""
], 
[
"Sat", 
"7:00am to 10:00pm", 
""
], 
[
"Sun", 
"7:00am to 9:00pm", 
""
]
], 
"web-wide-rating": 4.0, 
"features": [
"Credit Card OK", 
"Price: Cheap"
], 
"chain": null, 
"address": [
"1026 Valencia St", 
"San Francisco", 
"94110"
], 
"canonical-url": "http://www.townme.com/ritual-coffee-roasters-san-francisco-ca-94110",
"verticals": [
"food-and-drink:coffee-houses", 
"restaurants"
], 
"phone": "(415) 641-1024", 
"sips": [
"soy latte", 
"espresso", 
"hipsters", 
"blue bottle", 
"mission", 
"coffee shop", 
"baristas", 
"cappuccino", 
"outlets", 
"foam"
], 
"listing-url": "http://www.ritualroasters.com", 
"name": "Ritual Coffee Roasters"
}
}