api_key. It is sent as Authorization: Bearer <key>.
Things to know before you call:
- Two headers are required, not one. Besides the Bearer token, every request must send
X-Places-Api-Version. Without it the API answers400 "Please provide a valid version."even with a valid key, which reads like an auth failure. The plugin always sends the documented version. - The host is
places-api.foursquare.com, notapi.foursquare.com. The v3 paths on the old host answer401 Invalid request tokenfor every request;api.foursquare.com/v2is the separate legacy API and is not wrapped here. fieldsdecides the response. Omit it and every Pro field comes back; pass a list and only those fields do, so almost every output field is optional. The identifier a response needs is always added back to your selection, because Foursquare returns exactly what you ask for:fields: ['name']alone answers{"results":[{"name":"..."}]}with nofsq_place_id.- Pagination.
places.searchreturnsnextCursor, taken from thelinkresponse header. Pass it back ascursorto continue the same search; it is absent on the last page. This is the only operation that pages, because Foursquare paginates by cursor and the other list endpoints take onlylimit. places.matchhas four required fields:name,address,cityandcc, a 2-letter country code. Foursquare states that only English-speaking countries are supported. Its reference lists 422Unsupported countryfor a code outside that set, and the call can also answer 404Match not found, a 400 asking for a latitude and longitude, or a 500.- Rate limits are 50 QPS pay-as-you-go and 100 QPS enterprise, counted across all endpoints. A 429 is retried three times using
Retry-Afterwhen present. - No inbound webhooks. The Places API does not send any, so this plugin registers none.
- 6 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
No setup required yet. When you make your first request as a tenant, Corsair prompts for the API key.More: API Key
4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Find coffee shops near a pointWhat’s next
API reference
Every
foursquare.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.