# Foursquare

Foursquare provides location-based search and discovery, offering detailed venue information, place recommendations, and geospatial data for businesses and points of interest worldwide

- **Category:** analytics
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 5
- **Triggers:** 0
- **Slug:** `FOURSQUARE`
- **Version:** 20260211_00

## Tools

### Retrieve nearby places v3

**Slug:** `FOURSQUARE_RETRIEVE_NEARBY_PLACES_V3`

The GetNearbyPlaces endpoint retrieves a list of places near a specified location, primarily supporting check-in use cases and local discovery. It returns points of interest (POIs) including lower quality results not found in the standard Place Search, enhancing location-based experiences with additional data like photos, reviews, and tips. This endpoint is ideal for applications seeking to provide users with a comprehensive view of their surroundings, including less prominent or newer locations. While it offers a broader range of results, it may sacrifice some precision compared to more focused search endpoints. Use this when you want to offer users a diverse array of nearby options, particularly for social check-in features or exploratory local recommendations.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ll` | string | No | The latitude/longitude around which to retrieve place information. This must be specified as latitude,longitude (e.g., ll=41.8781,-87.6298). If you do not specify ll, the server will attempt to retrieve the IP address from the request, and geolocate that IP address.  |
| `hacc` | integer | No | The estimated horizontal accuracy radius in meters of the user's location at the 68th percentile confidence level as returned by the user's cell phone OS.  |
| `limit` | integer | No | The number of results to return, up to 50. Defaults to 10. |
| `fields` | string | No | Indicate which fields to return in the response, separated by commas. Core fields include: fsq_id, name, geocodes (main and other lat/lng coordinates for place), location, categories, chains, timezone, distance, and link (to place detail). Rich data fields include: description, tel (phone), fax, email, website, social_media, hours, hours_popular, rating, stats, popularity, price, menu, date_closed, photos, tips (mini reviews), tastes, and features (e.g., wifi, reservations). If no fields are specified, all Core Fields are returned by default.  |
| `altitude` | integer | No | The altitude of the user's location in meters above the World Geodetic System 1984 (WGS84) reference ellipsoid as returned by the user's cell phone OS.  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve place photos by id

**Slug:** `FOURSQUARE_RETRIEVE_PLACE_PHOTOS_BY_ID`

Retrieves photos associated with a specific place in Foursquare's database. This endpoint allows you to access user-generated images for a particular point of interest (POI) using its unique Foursquare ID (fsq_id). It's useful for enhancing your application with visual content related to locations, such as restaurants, landmarks, or businesses. The endpoint returns photo data that can be used to construct image URLs for display. Keep in mind that the number and quality of photos may vary depending on the popularity and user engagement of the place. This tool should be used when you need to display or analyze visual information about a specific location in your application.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sort` | string ("POPULAR" | "NEWEST") | No | Specifies the order in which results are listed. Possible values are:<ul><li>popular (default) - sorts results based on their popularity among Foursquare users, newest - sorts results from most recently added to least recently added  |
| `limit` | integer | No | The specified number of photos per page. Returns 10 photos by default, up to a maximum number of 50.  |
| `fsq_id` | string | Yes | A unique string identifier for a FSQ Place (formerly known as Venue ID). E.g., Foursquare HQ"s fsq_id = 5a187743ccad6b307315e6fe  |
| `classifications` | string | No | Restricts the results to photos matching the specified classifications, separated by a comma. Possible values are: food - photos of food, indoor - photos of indoors, menu - photos of menus, outdoor - photos of storefronts, outdoors, and exteriors  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve places by id

**Slug:** `FOURSQUARE_RETRIEVE_PLACES_BY_ID`

Retrieves detailed information about a specific place using its unique Foursquare ID (FSQ ID). This endpoint provides comprehensive data about a venue, including its name, address, category, ratings, tips, photos, and other relevant information. It's particularly useful when you need in-depth details about a known location, such as for displaying venue profiles or gathering specific place attributes. The endpoint should be used when you have a valid FSQ ID and require the most up-to-date and complete information about that place. Note that this endpoint focuses on individual place details and does not provide search functionality or lists of multiple venues.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fields` | string | No | Indicate which fields to return in the response, separated by commas. Core fields include: fsq_id, name, geocodes (main and other lat/lng coordinates for place), location, categories, chains, timezone, distance, and link (to place detail). Rich data fields include: description, tel (phone), fax, email, website, social_media, hours, hours_popular, rating, stats, popularity, price, menu, date_closed, photos, tips (mini reviews), tastes, and features (e.g., wifi, reservations). If no fields are specified, all Core Fields are returned by default.  |
| `fsq_id` | string | Yes | A unique string identifier for a FSQ Place (formerly known as Venue ID). E.g., Foursquare HQ"s fsq_id = 5a187743ccad6b307315e6fe  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve place tips using fsq id

**Slug:** `FOURSQUARE_RETRIEVE_PLACE_TIPS_USING_FSQ_ID`

Retrieves user-generated tips for a specific place in the Foursquare database. This endpoint allows you to fetch valuable insights and experiences shared by Foursquare users about a particular venue. It's useful for enhancing location-based applications with real user feedback, helping users make informed decisions about places they might visit. The endpoint returns a list of tips, which may include information such as the tip text, the user who created it, and potentially a timestamp or rating.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sort` | string ("POPULAR" | "NEWEST") | No | Specifies the order in which results are listed. Possible values are: popular (default) - sorts results based on their popularity among Foursquare users, newest - sorts results from most recently added to least recently added  |
| `limit` | integer | No | The specified number of tips per page. Returns 10 tips by default, up to a maximum number of 50.  |
| `fields` | string | No | Indicate which fields to return in the response, separated by commas. Supported fields are: id - The ID of the tip to be returned, created_at - The timestamp indicating when the tip was created; UNIX timestamp in seconds since Epoch, text - The text of the returned tip, lang - The language of the returned tip, url - The URL associated with the returned tip, agree_count - The count of users who have agreed with the returned tip, disagree_count - The count of users who have disagreed with the returned tip, photo - The ID of the photo asociated with the returned tip. Default fields if this param is omitted are "id", "created_at", and "text".  |
| `fsq_id` | string | Yes | A unique string identifier for a FSQ Place (formerly known as Venue ID). E.g., Foursquare HQ"s fsq_id = 5a187743ccad6b307315e6fe  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search places api request

**Slug:** `FOURSQUARE_SEARCH_PLACES_API_REQUEST`

The GetPlacesSearch endpoint allows you to search for places in the Foursquare database based on various criteria such as location, keywords, and categories. This tool is ideal for discovering nearby points of interest or finding specific venues. It returns a list of places matching the specified parameters, providing essential information about each location. Use this endpoint for location-based features or gathering venue information in a specific area.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ll` | string | No | The latitude/longitude around which to retrieve place information. This must be specified as latitude,longitude (e.g., ll=41.8781,-87.6298).  |
| `ne` | string | No | The latitude/longitude representing the north/east points of a rectangle. Must be used with sw parameter to specify a rectangular search box. Global search results will be omitted.  |
| `sw` | string | No | The latitude/longitude representing the south/west points of a rectangle. Must be used with ne parameter to specify a rectangular search box. Global search results will be omitted.  |
| `near` | string | No | A string naming a locality in the world (e.g., "Chicago, IL"). If the value is not geocodable, returns an error. Global search results will be omitted.  |
| `limit` | integer | No | The number of results to return, up to 50. Defaults to 10. |
| `query` | string | No | A string to be matched against all content for this place, including but not limited to venue name, category, telephone number, taste, and tips.  |
| `fields` | string | No | Indicate which fields to return in the response, separated by commas. Core fields include: fsq_id, name, geocodes (main and other lat/lng coordinates for place), location, categories, chains, timezone, distance, and link (to place detail). Rich data fields include: description, tel (phone), fax, email, website, social_media, hours, hours_popular, rating, stats, popularity, price, menu, date_closed, photos, tips (mini reviews), tastes, and features (e.g., wifi, reservations). If no fields are specified, all Core Fields are returned by default.  |
| `radius` | integer | No | Sets a radius distance (in meters) used to define an area to bias search results. The maximum allowed radius is 100,000 meters. Radius can be used in combination with ll or ip biased geolocation only. By using radius, global search results will be omitted. If not provided, default radius applied is 22000 meters.  |
| `open_at` | string | No | Support local day and local time requests through this parameter. To be specified as DOWTHHMM (e.g., 1T2130), where DOW is the day number 1-7 (Monday = 1, Sunday = 7) and time is in 24 hour format. Places that do not have opening hours will not be returned if this parameter is specified. Cannot be specified in conjunction with `open_now`.  |
| `open_now` | boolean | No | Restricts results to only those places that are open now. Places that do not have opening hours will not be returned if this parameter is specified. Cannot be specified in conjunction with `open_at`.  |
| `max_price` | integer | No | Restricts results to only those places within the specified price range. Valid values range between 1 (most affordable) to 4 (most expensive), inclusive.  |
| `min_price` | integer | No | Restricts results to only those places within the specified price range. Valid values range between 1 (most affordable) to 4 (most expensive), inclusive.  |
| `super_venue_id` | string | No | A Foursquare Venue ID to use as search bounds so only places within that venue are returned  |
| `exclude_all_chains` | boolean | No | Filters the response by only returning FSQ Places that are not known to be part of any chain.  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
