高德地图 icon

高德地图

高德地图API,位置转换、定位等

Overview

The node integrates with a map service API to perform Point of Interest (POI) keyword searches. It allows users to find locations or places based on a specific keyword, optionally filtered by city and POI categories. This is useful for applications needing location-based search capabilities, such as finding restaurants, hotels, or landmarks in a given area.

Typical use cases include:

  • Searching for nearby amenities or businesses by keyword.
  • Filtering results by POI type categories like dining, shopping, or transportation.
  • Restricting search results to a specific city or administrative region.
  • Paginating through large sets of POI data.
  • Choosing the level of detail returned about each POI.

For example, a travel app could use this node to let users search for "coffee shops" within "Shanghai" and get detailed information about each shop including address, contact info, and location coordinates.

Properties

Name Meaning
查询关键字 The keyword to search for POIs. Only one keyword is supported. If no city is specified and the keyword is generic, results may be broad.
查询POI类型 One or more POI category codes or Chinese category names to filter the search. Multiple categories can be selected. Categories must follow the official classification codes or names from the linked POI classification table.
查询城市 Optional city filter. Can be a city name in Chinese, city code, or administrative code. Limits search scope geographically.
仅返回指定城市数据 Boolean flag indicating whether to restrict results strictly to the specified city. If true, only POIs within the city are returned.
选项 Additional options:
- 按照层级展示子POI数据: Whether to display child POIs hierarchically under parent POIs or as a flat list.
- 页码: Page number of results to return, starting at 1.
- 每页行数: Number of results per page.
- 返回结果详略: Level of detail in results, either basic info or all available info.

Output

The node outputs JSON data containing the search results from the POI API. The main output field json includes an array of POI objects matching the query parameters. Each POI object typically contains:

  • Name and address of the POI.
  • Location coordinates (latitude and longitude).
  • Category/type information.
  • Contact details if available.
  • Additional metadata depending on the chosen detail level (base or all).

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for the map service provider.
  • The node expects the base URL and authentication credentials to be configured in n8n credentials securely.
  • Internet access to the external map API endpoint.

Troubleshooting

  • Empty results: May occur if the keyword is too generic without specifying a city or if the POI types do not match any entries. Try refining the keyword or adding a city filter.
  • Invalid category codes: Using incorrect or unsupported POI category codes will result in no matches or errors. Refer to the official POI classification documentation linked in the property description.
  • API quota limits: Exceeding the allowed number of requests per day/hour may cause errors or blocked requests. Monitor usage and apply for higher quotas if needed.
  • Incorrect city codes: Providing invalid city names or codes may lead to unexpected results or empty responses.
  • Pagination issues: Requesting pages beyond the available range will return empty results; ensure the page number is valid.

Links and References

Discussion