The FilterPlacesByTopLevelCategories Choreo retrieves contextual data from Factual by specifying a query string, a query search area (defined by a latitude-longitude center coordiantes), a list of top-level categories, and a result-set radius specified in meters. More information about the Factual API can be found here.
To run this Choreo, you'll need:
- Latitude-Longitude coordinates to specify the search radius.
- A list of Factual top-level categories specified here
Here's an example set of inputs:
Category: Food & Dining
Latitude: 40.718274
Longitude: -74.005323
Query: Bagels
Radius: 1000
The following is a sample of the JSON information returned by this Choreo:
{
"version": 3,
"status": "ok",
"response": {
"data": [
{
"region": "NY",
"tel": "(212) 431-3433",
"category_labels": [
[
"Social",
"Bars",
"Wine Bars"
],
[
"Social",
"Food and Dining",
"Restaurants",
"American"
],
[
"Social",
"Food and Dining",
"Restaurants",
"International"
]
],
"name": "Bubble Lounge",
"longitude": -74.006374,
"address_extended": "Frnt 1",
"fax": "(212) 431-4572",
"website": "http://www.bubblelounge.com/new-york/",
"hours": {
"monday": [
[
"17:00",
"23:59"
]
],
"tuesday": [
[
"00:00",
"2:00"
],
[
"17:00",
"23:59"
]
],
"wednesday": [
[
"00:00",
"2:00"
],
[
"17:00",
"23:59"
]
],
"thursday": [
[
"00:00",
"2:00"
],
[
"17:00",
"23:59"
]
],
"friday": [
[
"00:00",
"2:00"
],
[
"17:00",
"23:59"
]
],
"saturday": [
[
"00:00",
"4:00"
],
[
"17:00",
"23:59"
]
],
"sunday": [
[
"00:00",
"4:00"
]
]
},
"neighborhood": [
"Tribeca",
"Downtown",
"TriBeCa - Downtown",
"Manhattan",
"sohotrbcafindist",
"Soho",
"Lower Manhattan",
"Civic Center",
"Manhattan – TriBeCa"
],
"postcode": "10013",
"country": "us",
"category_ids": [
316,
348,
464
],
"email": "nyinfo@bubblelounge.com",
"address": "228 W Broadway",
"locality": "New York",
"hours_display": "Mon 5:00 PM-11:59 PM; Tue-Fri 12:00 AM-2:00 AM, 5:00 PM-11:59 PM; Sat 12:00 AM-4:00 AM, 5:00 PM-11:59 PM; Sun 12:00 AM-4:00 AM",
"latitude": 40.719522,
"factual_id": "74122fb6-0a88-4ea2-83a0-c2b48ea8de65",
"$distance": 164.63004
},
{
"address": "145 W Broadway",
"address_extended": "Frnt A",
"category_ids": [
356,
348,
358
],
"category_labels": [
[
"Social",
"Food and Dining",
"Restaurants",
"French"
],
[
"Social",
"Food and Dining",
"Restaurants",
"American"
],
[
"Social",
"Food and Dining",
"Restaurants",
"Italian"
]
],
"country": "us",
"email": "info@theodeonrestaurant.com",
"factual_id": "07a2dc44-3314-4bfa-8c8b-4f7f23a397c9",
"fax": "(212) 406-1962",
"hours": {
"monday": [
[
"00:00",
"4:00"
]
],
"saturday": [
[
"10:00",
"23:59"
]
],
"sunday": [
[
"00:00",
"4:00"
],
[
"10:00",
"23:59"
]
]
},
"hours_display": "Mon 12:00 AM-4:00 AM; Sat 10:00 AM-11:59 PM; Sun 12:00 AM-4:00 AM, 10:00 AM-11:59 PM",
"latitude": 40.71696,
"locality": "New York",
"longitude": -74.007995,
"name": "The Odeon",
"neighborhood": [
"Tribeca",
"Downtown",
"Manhattan",
"TriBeCa - Downtown",
"sohotrbcafindist",
"Soho",
"Civic Center",
"Lower Manhattan",
"City Hall Area",
"Financial District"
],
"postcode": "10013",
"region": "NY",
"tel": "(212) 233-0507",
"website": "http://www.theodeonrestaurant.com",
"$distance": 268.43948
}
],
"included_rows": 20
}
}