Search Locations
Places matching a name, with their ids.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
query?stringThe words to match, as a search box takes them (berlin, microsoft).
maxAge?integerHow old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.
Format
int64Range
0 <= valueThe answer.
application/json- response
A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.
data*array<>pagination*import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.linkedin.searchLocations({ query: "berlin" });Example Response
{ "data": [ { "id": "106967730", "name": "Berlin, Berlin, Germany" }, { "id": "90009712", "name": "Berlin Metropolitan Area" } ], "pagination": { "nextCursor": null, "hasMore": false }}