Foursquare
App · Travel & Places · 5 actions
Search Foursquare for places, ask for recommendations in plain language, and pull a place's details, tips, and photos.
Actions
| Action | What it does |
|---|---|
| Ask for places | Ask Foursquare a question in plain language, such as 'best cocktail lounge in Williamsburg', and get back the places that answer it along with why each one matches. |
| Get place details | Look up the full profile of a place, including hours and contact details. |
| Get place photos | List the photos Foursquare users have uploaded for a place. |
| Get place tips | List the short tips Foursquare users have left about a place. |
| Search places | Search the Foursquare Places database by keyword and location, for example coffee shops in Chicago. |
Ask for places
Ask Foursquare a question in plain language, such as 'best cocktail lounge in Williamsburg', and get back the places that answer it along with why each one matches.
Inputs
- Query
querytextRequired - The question to answer, for example 'show me all cheap cafes in Williamsburg'.
- Location
locationtext - A place to search in, such as 'Chicago, IL'. Needed unless the question already names one, or coordinates are given.
- Latitude, longitude
lltext - Coordinates to search around, as 'latitude,longitude' (e.g. 41.8781,-87.6298). An alternative to naming a location.
- Context
contexttext - Extra preferences to weigh, for example 'traveling with kids, need outdoor seating'.
Outputs
countnumber- Number of places returned.
placeslist- Places that answer the question.
summarytext- Foursquare's written summary of the results, when it provides one.
Example output
{
"count": 1,
"places": [
{
"address": "53 W Jackson Blvd, Chicago, IL 60604",
"categories": [
"Coffee Shop"
],
"fsq_place_id": "4b6f0b40f964a520bce02ce3",
"justifications": [
"Reviewers mention quiet seating and wifi"
],
"latitude": 41.878,
"longitude": -87.629,
"name": "Intelligentsia Coffee",
"price": 2,
"rating": 8.7,
"tel": "(312) 253-0594",
"website": "https://www.intelligentsiacoffee.com"
}
],
"summary": "Three well-rated cafes with quiet seating downtown."
}Get place details
Look up the full profile of a place, including hours and contact details.
Inputs
- Place ID
fsq_place_idtextRequired - The Foursquare place ID to look up.
Outputs
Detailed information about a single place.
addresstext- Full formatted street address.
categorieslist- Category labels, such as 'Coffee Shop' or 'Italian Restaurant'.
descriptiontext- Description of the place.
emailtext- Contact email address for the place.
fsq_place_idtext- Foursquare place ID. Pass this to the other Foursquare actions.
hourstext- Opening hours, written out for reading.
latitudenumber- Latitude of the place.
longitudenumber- Longitude of the place.
nametext- Name of the place.
open_nowtrue/false- Whether the place is open right now.
pricenumber- Price tier from 1 (most affordable) to 4 (most expensive).
ratingnumber- Foursquare rating from 0 to 10.
teltext- Phone number of the place.
websitetext- Website of the place.
Example output
{
"address": "53 W Jackson Blvd, Chicago, IL 60604",
"categories": [
"Coffee Shop"
],
"description": "Third-wave coffee bar in the Loop.",
"email": "hello@intelligentsiacoffee.com",
"fsq_place_id": "4b6f0b40f964a520bce02ce3",
"hours": "Mon-Fri 6:00 AM-7:00 PM; Sat-Sun 7:00 AM-7:00 PM",
"latitude": 41.878,
"longitude": -87.629,
"name": "Intelligentsia Coffee",
"open_now": true,
"price": 2,
"rating": 8.7,
"tel": "(312) 253-0594",
"website": "https://www.intelligentsiacoffee.com"
}Get place photos
List the photos Foursquare users have uploaded for a place.
Inputs
- Place ID
fsq_place_idtextRequired - The Foursquare place ID to get photos for.
- Limit
limitnumber - Maximum number of photos to return, up to 50.From 1 to 50.
Outputs
countnumber- Number of photos returned.
photoslist- Photos uploaded for the place.
Example output
{
"count": 1,
"photos": [
{
"classifications": [
"indoor"
],
"created_at": "2024-03-02T18:41:11.000Z",
"fsq_photo_id": "5b2c3d4e5f6a7b8c9d0e1f2a",
"height": 1920,
"url": "https://fastly.4sqi.net/img/general/original/1234_abcdef.jpg",
"width": 1440
}
]
}Get place tips
List the short tips Foursquare users have left about a place.
Inputs
- Place ID
fsq_place_idtextRequired - The Foursquare place ID to get tips for.
- Limit
limitnumber - Maximum number of tips to return, up to 50.From 1 to 50.
Outputs
countnumber- Number of tips returned.
tipslist- Tips left about the place.
Example output
{
"count": 1,
"tips": [
{
"agree_count": 12,
"created_at": "2024-04-18T15:22:04.000Z",
"disagree_count": 0,
"fsq_tip_id": "5a1b2c3d4e5f6a7b8c9d0e1f",
"lang": "en",
"text": "Grab a seat upstairs -- quieter and there are outlets.",
"url": "https://foursquare.com/item/5a1b2c3d4e5f6a7b8c9d0e1f"
}
]
}Search places
Search the Foursquare Places database by keyword and location, for example coffee shops in Chicago.
Inputs
- Query
querytext - What to search for -- a place name, category name, or keyword such as 'tacos'. Required unless you filter by category IDs instead.
- Near
neartext - A place to search in, such as 'Chicago, IL'. Provide this or a latitude/longitude.
- Latitude, longitude
lltext - Coordinates to search around, as 'latitude,longitude' (e.g. 41.8781,-87.6298). Provide this or a place name.
- Radius (meters)
radiusnumber - How far from the coordinates to search, in meters. Only applies alongside a latitude/longitude. Defaults to 22000.From 0 to 100000.
- Category IDs
fsq_category_idstext - Only return places in these Foursquare category IDs, separated by commas.
- Minimum price tier
min_pricenumber - Cheapest price tier to include, from 1 to 4.From 1 to 4.
- Maximum price tier
max_pricenumber - Most expensive price tier to include, from 1 to 4.From 1 to 4.
- Open now
open_nowtrue/false - Set to true to only include places that are open right now. Places with no published hours are left out.
- Sort results by
sorttext - How to order the places. Defaults to relevance.One of:
RELEVANCE(Best match),RATING(Highest rated),DISTANCE(Closest first),POPULARITY(Most popular). Default:RELEVANCE. - Limit
limitnumber - Maximum number of places to return, up to 50. Defaults to 10.From 1 to 50.
Outputs
countnumber- Number of places returned.
placeslist- Matching places, best match first.
Example output
{
"count": 1,
"places": [
{
"address": "53 W Jackson Blvd, Chicago, IL 60604",
"categories": [
"Coffee Shop"
],
"distance": 120,
"fsq_place_id": "4b6f0b40f964a520bce02ce3",
"latitude": 41.878,
"longitude": -87.629,
"name": "Intelligentsia Coffee",
"price": 2,
"rating": 8.7,
"tel": "(312) 253-0594",
"website": "https://www.intelligentsiacoffee.com"
}
]
}