canonical: https://jentic.com/apis/map.longdo.com/longdo-main

# Map Longdo Longdo Map API

Jentic publishes the only available OpenAPI specification for Longdo Map API, keeping it validated and agent-ready. Longdo Map is a Thailand-focused mapping service that also covers global addresses, with a REST surface for search, suggest, geocoding, reverse geocoding, address extraction, routing, traffic, TSP route planning, and POI lookups. Endpoints sit under /mapsearch, /smartsearch, /addresslookup, `/map/services`, /POIService, and /RouteService, and every call carries an API key as the 'key' query parameter. The service is the most reliable provider of Thai-language address parsing and place data, returning coordinates and POIs that other global providers often miss inside Thailand.

## For AI agents

Geocode addresses, search places, and plan routes in Thailand and globally with the Longdo Map API, using a key query parameter for authentication.

## Scope

Does not handle satellite imagery, indoor venue maps, or non-driving (transit/cycling) routing - use for Thai geocoding, POI search, and driving routes only.

## Capabilities

- Geocode a Thai or English address into latitude and longitude
- Reverse geocode coordinates back to a structured Thai address
- Extract structured address fields from a free-text Thai paragraph
- Search for points of interest by name and location with POIService
- Calculate driving routes and turn-by-turn paths via RouteService
- Solve a multi-stop TSP route plan for delivery sequencing
- Suggest place names while a user types in the search box

## Use cases

### Thai-language address normalisation

E-commerce and logistics teams operating in Thailand receive shipping addresses written in mixed Thai and English with non-standard ordering. GET `/smartsearch/json/extract_address/v2` parses the free-text address into structured fields (sub-district, district, province, postal code), and `/addresslookup/api/addr/geocoding` turns the cleaned address into coordinates. The result is a normalised address ready for warehouse routing and delivery.

Example prompt: Given a free-text Thai shipping address, call `/smartsearch/json/extract_address/v2`, then geocode the cleaned address to coordinates.

### Delivery TSP for Bangkok riders

Last-mile delivery operators in Bangkok need to sequence multi-stop runs to minimise time on congested roads. GET `/RouteService/json/route/matrix` returns a distance/time matrix between stops, and the TSP route endpoint returns an ordered visiting plan plus per-leg paths. The result is a rider-ready route shaped by Longdo's local traffic and street data.

Example prompt: Given 8 delivery coordinates, call the Longdo route matrix and TSP endpoints to return an ordered route with per-leg drive times.

### POI search for a travel app

Travel and concierge apps targeting Thailand need rich place data - restaurants, temples, transport hubs - beyond what global providers offer. GET `/POIService/json/search` returns places near a coordinate filtered by category, with names in Thai and English. Pair with `/POIService/json/address` to attach structured addresses for booking flows.

Example prompt: Find the top 10 temples within 2km of a given Bangkok coordinate using `/POIService/json/search` and return them with Thai and English names.

### Agent-driven Thai geocoder

An AI agent helping a Thai user complete a checkout needs to resolve free-text addresses into structured data without rolling its own parser. Through Jentic, the agent searches by intent, calls `/smartsearch/json/extract_address/v2` followed by the geocoding endpoint, and returns the structured address plus coordinates. The Longdo API key is held in the vault, never in the agent's prompt.

Example prompt: Given a Thai free-text address from a checkout form, return the structured fields and coordinates using the Longdo Map API via Jentic.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/mapsearch/json/search` | Search the Longdo Map index |
| GET | `/mapsearch/json/suggest` | Suggest place names while typing |
| GET | `/smartsearch/json/extract_address/v2` | Extract structured address fields from free text |
| GET | `/addresslookup/api/addr/geocoding` | Geocode a Thai address to coordinates |
| GET | `/POIService/json/search` | Search POIs near a coordinate |
| GET | `/RouteService/json/route/guide` | Get a driving route with turn-by-turn guidance |
| GET | `/RouteService/json/route/matrix` | Get a distance and time matrix between stops |
| GET | `/RouteService/json/route/path` | Get a route polyline path between stops |

## Key resources

- **Search** — Place name search and suggest endpoints
- **Geocoding** — Forward and reverse address geocoding
- **Address** — Structured Thai address parsing and lookup
- **Routing** — Driving routes, distance matrix, and TSP planning
- **Traffic** — Live traffic data along routes
- **POI** — Points of interest search and address resolution
- **Area** — Administrative-area filtering and lookups

## Why Jentic

- **Setup:** Wiring Longdo Map by hand means appending its key query parameter, choosing between the search.longdo.com and api.longdo.com hosts, and learning the separate mapsearch, geocoding, and RouteService paths yourself. Through Jentic you install once, import the Longdo Map API from the API Directory, store the developer key once, and your agent calls it.
- **Permission scoping:** The Longdo endpoints are read-only lookups keyed on query parameters, so scoping is by operation: you limit the agent to the operations it needs, such as geocoding a Thai address, searching POIs, or requesting a driving route, and leave out the rest. Every operation you allow is one you have chosen, so the agent stays inside that set.
- **Credential handling:** Your Longdo Map key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'geocode a Thai address' or 'find a driving route', and Jentic returns the matching Longdo operation with its query schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **HERE Maps** — Global mapping and routing API with weaker Thai-language address coverage than Longdo.
- **TomTom Maps** — Global maps, search, and routing API.
- **OpenCage Geocoding** — Global geocoding aggregator with predictable pricing.
- **Positionstack** — Forward and reverse geocoding API with a free tier.

## FAQ

### Why is there no official OpenAPI spec for Longdo Map API?

Longdo Map does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Longdo Map API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Longdo Map API use?

Longdo Map uses an API key passed as the 'key' query parameter on every request. Keys are issued from the Longdo Map developer console. Through Jentic the key is stored encrypted in the vault and appended to the request at call time, so the raw key never appears in the agent's transcript.

### Can the Longdo Map API parse a Thai-language free-text address?

Yes. GET `/smartsearch/json/extract_address/v2` parses a free-text string (commonly a mix of Thai and English with informal ordering) into structured fields - sub-district, district, province, postal code. Pair it with `/addresslookup/api/addr/geocoding` to convert the parsed address into coordinates.

### What are the rate limits for the Longdo Map API?

Longdo applies per-key quotas tied to the developer plan rather than a single global QPS. Free keys have a daily call cap; paid plans raise the quota. Quota status is visible in the Longdo developer console; throttle client-side requests to stay under the daily cap.

### How do I geocode a Thai address through Jentic?

Run pip install jentic, then search Jentic for 'geocode a thai address'. Jentic returns the GET `/addresslookup/api/addr/geocoding` operation along with the optional address-extract step, which you execute with the address string to retrieve latitude and longitude.

### Does the Longdo Map API plan multi-stop delivery routes?

Yes. GET `/RouteService/json/route/matrix` returns the distance/time matrix between stops, and the TSP route endpoints sequence the stops into an ordered visiting plan. This is the recommended pattern for last-mile delivery routing inside Thailand.

### Can I limit what my agent is allowed to do with the Longdo Map API?

Yes. Because you run Jentic One yourself, your own rules decide which Longdo operations and which developer key the agent may use. The Longdo endpoints are read-only lookups, so you scope by operation: allow only what the agent needs, such as geocoding a Thai address, searching POIs, or requesting a driving route, and leave the rest out. Every operation the agent can call is one you have chosen, so it stays inside that set.
