maps
Retrieve Google Maps listings for any keyword and location, returning names, ratings, reviews, addresses, phone numbers, websites, hours, GPS coordinates, and categories.
Instructions
Get Google Maps results for a keyword and location. Returns names, place IDs, ratings, reviews, addresses, phone numbers, websites, hours, GPS coordinates, and categories. Costs 1 credit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | Search keyword (e.g. "dentist") | |
| location | Yes | City and state (e.g. "Orchard Park, NY") | |
| limit | No | Number of results. Default: 20, max: 100 |
Implementation Reference
- src/tools/serp.ts:69-77 (handler)The handler function for the 'maps' tool. It calls the API at /v1/serp/maps with keyword, location, and optional limit parameters, then formats the result as text content.
withErrorHandling(async ({ keyword, location, limit }) => { const result = await callApi( "/v1/serp/maps", { keyword, location, ...(limit && { limit }) }, getAuth() ); return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] }; }) ); - src/tools/serp.ts:63-67 (schema)The input schema for the 'maps' tool using Zod: keyword (string), location (string), and optional limit (integer 1-100).
{ keyword: z.string().describe('Search keyword (e.g. "dentist")'), location: z.string().describe('City and state (e.g. "Orchard Park, NY")'), limit: z.number().int().min(1).max(100).optional().describe("Number of results. Default: 20, max: 100"), }, - src/tools/serp.ts:60-77 (registration)The registration of the 'maps' tool via server.tool() inside registerSerpTools(), which is called from server.ts (line 35).
server.tool( "maps", "Get Google Maps results for a keyword and location. Returns names, place IDs, ratings, reviews, addresses, phone numbers, websites, hours, GPS coordinates, and categories. Costs 1 credit.", { keyword: z.string().describe('Search keyword (e.g. "dentist")'), location: z.string().describe('City and state (e.g. "Orchard Park, NY")'), limit: z.number().int().min(1).max(100).optional().describe("Number of results. Default: 20, max: 100"), }, READ_ONLY, withErrorHandling(async ({ keyword, location, limit }) => { const result = await callApi( "/v1/serp/maps", { keyword, location, ...(limit && { limit }) }, getAuth() ); return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] }; }) ); - src/server.ts:35-35 (registration)The call to registerSerpTools(server, getAuth) in createMcpServer() which registers the 'maps' tool (among other SERP tools).
registerSerpTools(server, getAuth);