Foursquare API

Social / OAuth Advanced HTTPS
Varies by plan (check documentation)

Overview

Foursquare is a location intelligence platform that lets you access venue data, user check-ins, photos, and tips from millions of real-world places. You can build apps that recommend nearby spots, track visits, or display location-based social activity. It uses OAuth 2.0, so users authenticate through Foursquare before your app can act on their behalf.

💡

Beginner Tip

Start with the Places API to search for venues without needing user authentication — you only need an OAuth app token. Use the venue search endpoint with a latitude/longitude pair to quickly get nearby results.

Available Data

IP address details
latitude and longitude
city and country
timezone
ISP information
event dates and names

Example Response

JSON Response
{
  "id": "Dwu85P9SOIk",
  "urls": {
    "full": "https://images.unsplash.com/photo-...",
    "regular": "https://images.unsplash.com/photo-...?w=1080",
    "thumb": "https://images.unsplash.com/photo-...?w=200"
  },
  "width": 4000,
  "height": 3000,
  "user": {
    "name": "John Doe",
    "username": "johndoe"
  }
}

Field Reference

fsq_id Unique Foursquare identifier for the venue
name Display name of the place or venue
location Address details including address, city, country, and formatted_address
categories List of category objects describing the type of venue such as Coffee Shop or Restaurant
distance Distance in meters from the search location to the venue
geocodes Latitude and longitude of the venue under geocodes.main.latitude and geocodes.main.longitude

Implementation Example

const url = "https://developer.foursquare.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "Authorization": "Bearer YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Missing or invalid API key in the Authorization header
Ensure you pass your Foursquare API key as the value of the Authorization header (not Bearer, just the key itself for v3)
400 Bad Request on ll param Latitude/longitude formatted incorrectly or missing
Use the format ll=lat,lng with a comma and no spaces, e.g., ll=40.7128,-74.0060
429 Too Many Requests Exceeded free tier rate limit
Implement exponential backoff and cache venue results locally to reduce repeated calls

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 3/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth OAuth
HTTPS REQUIRED
CORS UNKNOWN
Category Social
Difficulty Advanced
Verified: 2026-04-07

Similar APIs

View All →