search_places

Pack: foursquare · Endpoint: https://gateway.pipeworx.io/foursquare/mcp

Search Foursquare places. Combine query (e.g., “coffee”, “hardware store”) with a location anchor — either near (“Brooklyn, NY”) or latitude+longitude. Returns name, fsq_place_id, categories, address, distance, lat/lon, popularity.

Parameters

NameTypeRequiredDescription
querystringnoFree-text query
nearstringnoPlace name anchor (“Brooklyn, NY”, “Tokyo”)
latitudenumbernoCenter latitude (pair with longitude)
longitudenumbernoCenter longitude
radius_mnumberno1-100000 metres (only with lat/lon)
categoriesstringnoOPTIONAL. Comma-separated numeric fsq_category_id values ONLY (e.g. from a prior search_places result). Do NOT invent IDs or pass category names — use the query text for that (e.g. query:“coffee”). Unknown IDs are ignored.
sortstringnoRELEVANCE (default) | DISTANCE | RATING | POPULARITY
limitnumbernoResults (1-50, default 10)

Example call

Arguments

{
  "query": "coffee",
  "near": "Brooklyn, NY",
  "limit": 10,
  "sort": "RELEVANCE"
}

curl

curl -X POST https://gateway.pipeworx.io/foursquare/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_places","arguments":{"query":"coffee","near":"Brooklyn, NY","limit":10,"sort":"RELEVANCE"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('search_places', {
  "query": "coffee",
  "near": "Brooklyn, NY",
  "limit": 10,
  "sort": "RELEVANCE"
});

More examples

{
  "query": "hardware store",
  "latitude": 40.7128,
  "longitude": -74.006,
  "radius_m": 1000,
  "limit": 20,
  "sort": "DISTANCE"
}

Response shape

Always returns: count, results

FieldTypeDescription
countnumberNumber of results returned
resultsarray
Full JSON Schema
{
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of results returned"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fsq_place_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Foursquare place ID"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Place name"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Place category names"
          },
          "category_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Foursquare category IDs"
          },
          "address": {
            "type": [
              "string",
              "null"
            ],
            "description": "Formatted address"
          },
          "locality": {
            "type": [
              "string",
              "null"
            ],
            "description": "City or locality name"
          },
          "region": {
            "type": [
              "string",
              "null"
            ],
            "description": "State or region"
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "Country name"
          },
          "postcode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Postal code"
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ],
            "description": "Latitude coordinate"
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ],
            "description": "Longitude coordinate"
          },
          "distance_m": {
            "type": [
              "number",
              "null"
            ],
            "description": "Distance in metres from search centre"
          },
          "popularity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Popularity score"
          },
          "rating": {
            "type": [
              "number",
              "null"
            ],
            "description": "Place rating"
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price level"
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "description": "Place website URL"
          },
          "tel": {
            "type": [
              "string",
              "null"
            ],
            "description": "Phone number"
          },
          "hours": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hours of operation display text"
          },
          "open_now": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether place is open now"
          },
          "chain": {
            "type": [
              "string",
              "null"
            ],
            "description": "Chain name if applicable"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Time zone"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Place description"
          },
          "foursquare_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Foursquare profile URL"
          }
        }
      }
    }
  },
  "required": [
    "count",
    "results"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "foursquare": {
      "url": "https://gateway.pipeworx.io/foursquare/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026