# Map Matching
Source: https://maps.vietmap.vn/docs/map-api/match-tolls/
Map Matching API
=======
* * *
!!! info "Match vs Route"
Match snaps a GPS trace a vehicle **has already driven** onto the road network — use it for trip reconstruction, mileage and toll reconciliation. For a route **to be driven** (including truck and container, with `toll_cost`), use [Route v4](https://maps.vietmap.vn/docs/map-api/route-version/route-v4/).
POST a JSON array of `[longitude, latitude]` points recorded from a phone or vehicle tracker. The API snaps them to the road network and returns the matched route, its length, and the toll stations along it priced for the given `vehicle` class.
!!! tip "Try it in the Playground"
Call Map Matching with real data, no code required: **[Open Playground](https://tools.vietmap.vn/playground/map-matching)**
!!! tip "AI Agent Integration :sparkles: NEW"
Download the optimized doc for AI agent integration: **Routing Agent Doc** · Machine-readable schema: **[OpenAPI 3.1](/docs/openapi.json)**
Or try it in [Postman](https://app.getpostman.com/run-collection/10912981-433d17b2-76d7-416e-beb2-468b9682b7a7?action=collection%2Ffork).
URL
---
```swift
https://maps.vietmap.vn/api/match-tolls?api-version=1.1&apikey={your-apikey}&vehicle={vehicle}
```
Method
------
**POST**
Parameters
----------
|Parameter|Type|Required|Default|Description|
|--- |--- |--- |--- |--- |
|apikey|array string|yes|none|API key provided by VIETMAP for your account. [Register here](https://maps.vietmap.vn/console-v2/register)|
|vehicle|number|no|1|