Skip to main content
Glama
ravinwebsurgeon

DataForSEO MCP Server

business_data_business_listings_search

Search Google Maps business listings by category, location, or name to retrieve contact details, addresses, ratings, and operating hours for market research or lead generation.

Instructions

Business Listings Search API provides results containing information about business entities listed on Google Maps in the specified categories. You will receive the address, contacts, rating, working hours, and other relevant data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNodescription of the element in SERP optional field the description of the business entity for which the results are collected; can contain up to 200 characters
titleNotitle of the element in SERP optional field the name of the business entity for which the results are collected; can contain up to 200 characters
categoriesNobusiness categories the categories you specify are used to search for business listings; if you don’t use this field, we will return business listings found in the specified location; you can specify up to 10 categories
location_coordinateNoGPS coordinates of a location optional field location_coordinate parameter should be specified in the “latitude,longitude,radius” format the maximum number of decimal digits for “latitude” and “longitude”: 7 the value of “radius” is specified in kilometres (km) the minimum value for “radius”: 1 the maximum value for “radius”: 100000 example: 53.476225,-2.243572,200
limitNothe maximum number of returned businesses
offsetNooffset in the results array of returned businesses optional field default value: 0 if you specify the 10 value, the first ten entities in the results array will be omitted and the data will be provided for the successive entities
filtersNoarray of results filtering parameters optional field you can add several filters at once (8 filters maximum) you should set a logical operator and, or between the conditions the following operators are supported: regex, not_regex, <, <=, >, >=, =, <>, in, not_in, like, not_like, match, not_match you can use the % operator with like and not_like to match any string of zero or more characters example: ["rating.value",">",3]
order_byNoresults sorting rules optional field you can use the same values as in the filters array to sort the results possible sorting types: asc – results will be sorted in the ascending order desc – results will be sorted in the descending order you should use a comma to set up a sorting parameter example: ["rating.value,desc"]note that you can set no more than three sorting rules in a single request you should use a comma to separate several sorting rules example: ["rating.value,desc","rating.votes_count,desc"]
is_claimedNoindicates whether the business is verified by its owner on Google Maps

Implementation Reference

  • The main handler function that executes the tool logic: formats parameters, makes POST request to DataForSEO Business Listings Search API endpoint, validates and formats the response.
    async handle(params: any): Promise<any> {
      try {
        const response = await this.client.makeRequest('/v3/business_data/business_listings/search/live', 'POST', [{
          description: params.description,
          title: params.title,
          categories: params.categories,
          limit: params.limit,
          offset: params.offset,
          filters: this.formatFilters(params.filters),
          order_by: this.formatOrderBy(params.order_by),
          location_coordinate: params.location_coordinate
        }]);
        return this.validateAndFormatResponse(response);
      } catch (error) {
        return this.formatErrorResponse(error);
      }
    }
  • Zod schema defining input parameters for the tool, including descriptions, categories, location, filters, sorting, etc.
      getParams(): z.ZodRawShape {
        return {
          description: z.string().optional().describe(`description of the element in SERP
    optional field
    the description of the business entity for which the results are collected;
    can contain up to 200 characters`),
          title: z.string().optional().describe(`title of the element in SERP
    optional field
    the name of the business entity for which the results are collected;
    can contain up to 200 characters`),
          categories: z.array(z.string()).optional().describe(`business categories
    the categories you specify are used to search for business listings;
    if you don’t use this field, we will return business listings found in the specified location;
    you can specify up to 10 categories`),
          location_coordinate: z.string().optional().describe(`GPS coordinates of a location
    optional field
    location_coordinate parameter should be specified in the “latitude,longitude,radius” format
    the maximum number of decimal digits for “latitude” and “longitude”: 7
    the value of “radius” is specified in kilometres (km)
    the minimum value for “radius”: 1
    the maximum value for “radius”: 100000
    example:
    53.476225,-2.243572,200`),
          limit: z.number().min(1).max(1000).default(10).optional().describe("the maximum number of returned businesses"),
          offset: z.number().min(0).optional().describe(
            `offset in the results array of returned businesses
    optional field
    default value: 0
    if you specify the 10 value, the first ten entities in the results array will be omitted and the data will be provided for the successive entities`
          ),
          filters: z.array(
            z.union([
              z.array(z.union([z.string(), z.number(), z.boolean()])).length(3),
              z.enum(["and", "or"])
            ])
          ).max(8).optional().describe(
            `array of results filtering parameters
    optional field
    you can add several filters at once (8 filters maximum)
    you should set a logical operator and, or between the conditions
    the following operators are supported:
    regex, not_regex, <, <=, >, >=, =, <>, in, not_in, like, not_like, match, not_match
    you can use the % operator with like and not_like to match any string of zero or more characters
    example:
    ["rating.value",">",3]`
          ),
          order_by: z.array(z.string()).optional().describe(
            `results sorting rules
    optional field
    you can use the same values as in the filters array to sort the results
    possible sorting types:
    asc – results will be sorted in the ascending order
    desc – results will be sorted in the descending order
    you should use a comma to set up a sorting parameter
    example:
    ["rating.value,desc"]note that you can set no more than three sorting rules in a single request
    you should use a comma to separate several sorting rules
    example:
    ["rating.value,desc","rating.votes_count,desc"]`
          ),
          is_claimed: z.boolean().optional().describe(`indicates whether the business is verified by its owner on Google Maps`).default(true)
        };
      }
  • Tool registration within the BusinessDataApiModule's getTools method, instantiates the tool and registers its name, description, params, and handler.
    getTools(): Record<string, ToolDefinition> {
      const tools = [
        new BusinessDataBusinessListingsSearchTool(this.dataForSEOClient),
        // Add more tools here
      ];
    
      return tools.reduce((acc, tool) => ({
        ...acc,
        [tool.getName()]: {
          description: tool.getDescription(),
          params: tool.getParams(),
          handler: (params: any) => tool.handle(params),
        },
      }), {});
    }
  • Helper mapping for filter paths associated with the business_data_business_listings_search tool in the filters tool.
    private static readonly TOOL_TO_FILTER_MAP: { [key: string]: string } = {
      'business_data_business_listings_search': 'search',
      'business_data_business_listings_categories_aggregation': 'categories_aggregation'
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but provides minimal behavioral information. It mentions the API returns results but doesn't disclose rate limits, authentication requirements, pagination behavior beyond offset/limit parameters, error conditions, or whether this is a read-only operation. The description is insufficient for a search tool with 9 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two sentences that efficiently convey the core functionality. It's front-loaded with the main purpose and follows with the data returned. No wasted words, though it could be slightly more structured with bullet points for the returned data fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 9 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the response format, error handling, rate limits, authentication requirements, or how results are structured. The agent would need to rely heavily on the input schema alone without sufficient context about the tool's behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 9 parameters. The description adds no parameter-specific information beyond mentioning 'specified categories' and the types of data returned. It doesn't explain parameter interactions or provide examples beyond what's in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches for business listings on Google Maps and returns specific data fields like address, contacts, rating, and working hours. It specifies the resource (business entities on Google Maps) and verb (search), but doesn't differentiate from sibling tools, which appear unrelated to business listings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description mentions searching 'in the specified categories' but doesn't explain when categories should be used versus location-based searches or how this tool relates to other search tools in the sibling list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ravinwebsurgeon/seo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server