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
| Name | Type | Required | Description |
|---|---|---|---|
query | string | no | Free-text query |
near | string | no | Place name anchor (“Brooklyn, NY”, “Tokyo”) |
latitude | number | no | Center latitude (pair with longitude) |
longitude | number | no | Center longitude |
radius_m | number | no | 1-100000 metres (only with lat/lon) |
categories | string | no | OPTIONAL. 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. |
sort | string | no | RELEVANCE (default) | DISTANCE | RATING | POPULARITY |
limit | number | no | Results (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
| Field | Type | Description |
|---|---|---|
count | number | Number of results returned |
results | array |
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.