Skip to main content

Foursquare

Foursquare Places API provides comprehensive location data and place information, enabling businesses to access detailed venue data, check-ins, user insights, and location-based services to enhance location intelligence and customer engagement strategies.

Foursquare icon

Power end-to-end data operations for your Foursquare API with Nexla. Our bi-directional Foursquare connector is purpose-built for Foursquare, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Foursquare or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Foursquare workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating a Foursquare credential, you need to obtain a Client ID and Client Secret from your Foursquare developer account. The Client ID and Client Secret are required to authenticate with the Foursquare Places API.

To obtain your Client ID and Client Secret, you need to have a Foursquare developer account with API access enabled. Once you have access to your account, you can create a new app in the Foursquare Developer Console to generate a Client ID and Client Secret. The Client ID and Client Secret are sent as query parameters (client_id and client_secret) for all API requests to the Foursquare Places API. For detailed information about API authentication setup, refer to the Foursquare Places API documentation.

Authenticate

Credentials required

FieldRequiredSecretDescription
Client IDYesNoFoursquare App Client Id for userless authentication. View https://developer.foursquare.com/docs/places-api/authentication for details.
Client SecretYesYesFoursquare App Client Secret for userless authentication. View https://developer.foursquare.com/docs/places-api/authentication for details.

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – Foursquare

FoursquareCred.png
  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  2. Enter your Foursquare Client ID in the Client ID field. This is the Client ID you obtained from your Foursquare Developer Console. The Client ID is sent as the client_id query parameter for all API requests to the Foursquare Places API.

  3. Enter your Foursquare Client Secret in the Client Secret field. This is the Client Secret you obtained from your Foursquare Developer Console. The Client Secret is sent as the client_secret query parameter for all API requests to the Foursquare Places API.

    Keep your Client ID and Client Secret secure and do not share them publicly. The Client ID and Client Secret provide access to your Foursquare account and should be treated as sensitive information. You can view and manage your API credentials in your Foursquare Developer Console. The Client ID and Client Secret are sent as query parameters (client_id and client_secret) for all API requests to the Foursquare Places API. For detailed information about obtaining and managing API credentials, see the Foursquare Places API authentication documentation.

  4. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Foursquare connector tile, then select the credential that will be used to connect to the Foursquare instance, and click Next; or, create a new Foursquare credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Foursquare endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

Search for Venues Near Location

Returns a list of venues near the geocodable location, optionally matching a search term. Returns a failed_geocode error if the location string is not geocodable.

  • Enter a geocodable location string in the Search Near Location (Geocodable String) field. This should be a string naming a place in the world (e.g., "New York, NY" or "1600 Amphitheatre Parkway, Mountain View, CA"). The API will search within the bounds of the geocode and add a geocode object to the response.

  • Select your intent in performing the search from the Intent dropdown menu. Available options are: checkin (default), global, browse, or match. The default value is checkin if not specified.

  • Optionally, enter a search term to be applied against venue names in the Search Query(Optional) field. This allows you to filter venues by name. The default value is empty if not specified.

  • The endpoint uses GET requests to https://api.foursquare.com/v2/venues/search?limit=50&near={near_string}&intent={intent}&query={query}&v=20200324&client_id={client_id}&client_secret={client_secret} where {near_string} is the Search Near Location, {intent} is the Intent, {query} is the Search Query, {client_id} is your Client ID from the credential configuration, and {client_secret} is your Client Secret from the credential configuration. The endpoint URL is automatically constructed based on the Foursquare API base URL and all the parameters.
  • The endpoint does not use pagination and returns up to 50 venues in a single request.
  • The endpoint will return a list of venues near the specified location. The response data is extracted from the venues array in the API response ($.response.venues[*]), with each venue record processed individually.

Location strings should be geocodable place names or addresses. The API will attempt to geocode the location string and search for venues within the geocoded area. If the location string cannot be geocoded, the API will return a failed_geocode error. The Intent parameter determines how the search is performed: checkin finds venues suitable for check-ins, global searches globally, browse searches within a specific area, and match attempts to match a specific venue. The endpoint uses a static URL (iteration.type: static.url) and does not require pagination. The response data path is $.response.venues[*], which extracts all items from the venues array in the API response. For detailed information about searching for venues, see the Foursquare Places API documentation.

Search for Venues Near Lat, Long

Returns a list of venues near the specified latitude & longitude, optionally matching a search term.

  • Enter a comma-separated latitude and longitude in the Search Near Lat,Long field. This should be in the format latitude,longitude (e.g., 40.74224,-73.99386).

  • Select your intent in performing the search from the Intent dropdown menu. Available options are: checkin (default), global, browse, or match. The default value is checkin if not specified.

  • Optionally, enter a search term to be applied against venue names in the Search Query(Optional) field. This allows you to filter venues by name. The default value is empty if not specified.

  • The endpoint uses GET requests to https://api.foursquare.com/v2/venues/search?limit=50&near={ll}&intent={intent}&query={query}&v=20200324&client_id={client_id}&client_secret={client_secret} where {ll} is the Search Near Lat,Long, {intent} is the Intent, {query} is the Search Query, {client_id} is your Client ID from the credential configuration, and {client_secret} is your Client Secret from the credential configuration. The endpoint URL is automatically constructed based on the Foursquare API base URL and all the parameters.
  • The endpoint does not use pagination and returns up to 50 venues in a single request.
  • The endpoint will return a list of venues near the specified coordinates. The response data is extracted from the venues array in the API response ($.response.venues[*]), with each venue record processed individually.

Latitude and longitude values should be in decimal degrees format, with latitude first, followed by a comma, then longitude (e.g., 40.74224,-73.99386). The Intent parameter determines how the search is performed: checkin finds venues suitable for check-ins, global searches globally, browse searches within a specific area, and match attempts to match a specific venue. The endpoint uses a static URL (iteration.type: static.url) and does not require pagination. The response data path is $.response.venues[*], which extracts all items from the venues array in the API response. For detailed information about searching for venues, see the Foursquare Places API documentation.

Get Venue Categories

Returns a hierarchical list of categories applied to venues.

  • This endpoint automatically retrieves all venue categories from the Foursquare Places API. No additional configuration is required beyond selecting this endpoint template.
  • The endpoint uses GET requests to https://api.foursquare.com/v2/venues/categories?v=20200324&client_id={client_id}&client_secret={client_secret} where {client_id} is your Client ID from the credential configuration and {client_secret} is your Client Secret from the credential configuration. The endpoint URL is automatically constructed based on the Foursquare API base URL and the API version.
  • The endpoint does not use pagination and returns all venue categories in a single request.
  • The endpoint will return a hierarchical list of all venue categories. The response data is extracted from the categories array in the API response ($.response.categories[*]), with each category record processed individually.

This endpoint returns the complete hierarchical category structure used by Foursquare to classify venues. Categories are organized in a tree structure with parent and child categories. The endpoint uses a static URL (iteration.type: static.url) and does not require pagination. The response data path is $.response.categories[*], which extracts all items from the categories array in the API response. For detailed information about venue categories, see the Foursquare Places API documentation.

Details for Venues in Lookup

Get venue details for venue IDs stored in a Nexla lookup table.

  • Select the Nexla lookup table that contains venue IDs from the Lookup for fetching Venue Ids dropdown menu. This lookup table should contain a column with venue IDs that you want to retrieve details for.

  • Enter the name of the column in the lookup table that contains the venue IDs in the Venue Id Column Name in Lookup field. This should match the exact column name in your lookup table.

  • The endpoint uses a two-step process: first, it iterates over the Nexla lookup to retrieve venue IDs, then it makes GET requests to https://api.foursquare.com/v2/venues/{venue_id}?v=20200324&client_id={client_id}&client_secret={client_secret} for each venue ID from the lookup. The endpoint URL is automatically constructed based on the Foursquare API base URL, the venue ID from the lookup, and the API version.
  • The endpoint does not use pagination and returns complete venue details for each venue ID in a single request per venue.
  • The endpoint will return detailed information for each venue ID found in the lookup table. The response data is extracted from the root-level object in the API response ($), and Nexla will process the entire response structure for each venue.

This endpoint requires a Nexla lookup table containing venue IDs. The endpoint iterates over the lookup table and makes API requests for each venue ID found in the lookup. The Venue Id Column Name should match the exact column name in your lookup table. The endpoint uses a lookup iteration (iteration.type: data.map.key.queue) followed by a static URL (iteration.type: static.url) for each lookup entry. The response data path is $, which extracts the entire root-level object from the API response. For detailed information about getting venue details, see the Foursquare Places API documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

Foursquare data sources can also be manually configured to ingest data from any valid Foursquare Places API endpoint, including endpoints not covered by the pre-built templates. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Foursquare Places API endpoints typically follow the pattern https://api.foursquare.com/v2/{endpoint_path}?v=20200324&client_id={client_id}&client_secret={client_secret}. All requests must include the API version parameter (v=20200324), and authentication is handled via the client_id and client_secret query parameters from your credential configuration. For detailed information about Foursquare Places API endpoints and available APIs, see the Foursquare Places API documentation.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Foursquare data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.