âShow Table of Contents
Foursquare Search Tool
The Foursquare Search tool allows you to search the Foursquare Venues API by a location, with multiple options to enhance the returned data.
Before you can use this macro, you must register an application with Foursquare. This can be set up by visiting https://foursquare.com/login and selecting âCreate a New Appâ. The only required fields are the âDownload/welcome page urlâ and âRedirect URL(s)â, but http://www.foursquare.com is accepted as a placeholder in those fieldshttps://foursquare.com/login. Once you have submitted your application form you will be provided a âClient
IDâ and âClient Secretâ token, which are needed to configure the macro.
There are 3 tabs: Authentication, Specification, Location
- Client ID: Enter your Foursquare Application Client ID.
- Client Secret: Enter your Foursquare Application Client Secret.
- Foursquare API Terms and Conditions: In order to run this macro, you must read and agree to the Foursquare API Terms and Conditions.
- Specify the Search type:
- Standard Search: Returns a list of venues near the specified location.
Add keywords: When checked, the venues will be filtered to return only those relevant to the search terms entered.
Keywords: Specify keyword search terms, separated by commas. A single âsearch termâ can be 1 or more words, and a maximum of 10 search terms may be specified at a time. (e.g. burgers,ice cream,steak) Each comma-separated search term will have a maximum of 50 venues returned. (So in the previous example, you can get up to 150 records in totalâ50 for each search term.)
- Trending Search: Returns a list of up to 50 venues near the specified location with the most people currently checked in. (Keywords are not available in Trending searches.)
Secondary Output: Select one of these options to generate a âSecondaryâ output stream of data associated with the primary venues output. Join the secondary data output to the primary venues output by the FoursquareVenueID column thatâs found in both the primary and secondary output data streams. Choices include:
- The Foursquare macro allows you to enhance the primary venue-related data returned, by enhancing the primary output and/or producing an additional secondary output. Be aware that selecting these options mayâto varying degreesâadd significant runtime to your process due to awaiting responses from the Foursquare API.
- Include âLikesâ: Check this box to populate the Foursquare âLikesâ column in the primary Venues output.
- None: No secondary output is generated.
- Next Venues: Returns venues that people often check in to after the current (i.e. âprimaryâ) venue. Up to 5 ânextâ venues are returned for each âprimaryâ venue.
- Tips: Tips that members have posted to Foursquare.
- Photos: Photos related to the venue. Up to 200 photo records are returned for each venue.
Include actual image data: By default, the Photos output contains URL information and other metadata (user name, photo width/height, etc) related to the photo, but not the actual image. Check this box to include the image.
Including the actual image greatly increases both the time required to run the macro and the volume of data returned.
- Enter the search location in 1 of 2 ways:
Radius Size: Specify a radius for the venue search.
- Address: Specify a Street Address, City , State and ZIP Code.
To search based on an address, you must have licensed CASS and Geocoder.
- Latitude/Longitude: Specify a latitude and longitude point.
The maximum radius search supported by Foursquare is 100km (~60 miles) for a standard venues search, or 20km (~12 miles) for a trending search. If the radius entered is larger, it will be automatically shortened to the appropriate limit.
Radius Units: Specify Miles, Kilometers, Meters or Feet as the unit of measure of the radius.
The Foursquare Tool produces 2 outputs:
- P: Primary output. This is the list of venues that fit the criteria selected in the interface, returned via the âPâ macro output.
- S: Secondary output. This optional output returns via the âSâ macro output and contains either the NextVenues, Tips, or Photos if one of those options is selected in the interface; it will be empty if no secondary output is selected.
For further information about the data returned by the macro, visit the Foursquare API documentation site.
Â©2017 Alteryx, Inc., all rights reserved. AllocateÂ®, AlteryxÂ®, GuzzlerÂ®, and Solocast