TMaps API examples / 08

Nearby places search

Find restaurants or schools around a point in Tunisia. The TMaps Nearby Search API returns the places sorted by distance, with their address.

Click the map to search around another point.

    API request
    GET https://api.tmaps.tn/geocoding/nearby?lat=36.8002&lng=10.1815&radius=1500&categories=restaurant&api_key=YOUR_API_KEY

    How it works

    1. The page sends GET /geocoding/nearby with the center (lat, lng), a radius in meters and categories.
    2. Several categories separated by commas are combined with OR: restaurant,education.
    3. Results come back sorted by distance. Click one to show it on the map.

    Good to know

    • The radius goes up to 10,000 m and limit up to 100 results.
    • Add q to filter by name, for example q=carrefour.
    • phone and opening_hours are optional: check they exist before showing them.

    Nearby Search docs · Source on GitHub