Documentation

Getting started

Maps API aims to make you have the much cheaper option than google maps API with a slightly different in performance. This API is in staging in environment, if you want to use our production url, please contact us.

V1 Reverse Geocode

Returns a list of locations search based on long lat

post

This endpoint search nearest location based on long lat

body
Query parameters
limitintegerOptional

Limit locations retrieved

Example: 5
Responses
200

A JSON array of location

application/json
post
/maps/revgeocode
const raw = JSON.stringify({
    "longitude": 106.8536213,
    "latitude": -6.157215
});

const requestOptions = {
  method: "POST",
  headers: Header,
  body: raw,
  redirect: "follow"
};

fetch("https://api-stg.oppna.dev/v1/maps/revgeocode", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
.catch((error) => console.error(error));
{
  "data": [
    {
      "geolocation_id": "67769bXBnMDE6Q2hJSkViMlplckV1QURJUjdqT29OTVlVUWFN",
      "country": "Indonesia",
      "province": "Kalimantan Barat",
      "city": "Kapuas Hulu",
      "district": null,
      "subdistrict": null,
      "title": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
      "latitude": 0.3457623,
      "longitude": 112.7152125,
      "street_name": null,
      "formatted_address": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
      "postal_code": 78762,
      "distance": 7783
    },
    {
      "geolocation_id": "67769bXBnMDE6Q2hJSkViMlplckV1QURJUjdqT29OTVlVUWFN",
      "country": "Indonesia",
      "province": "Kalimantan Barat",
      "city": "Kapuas Hulu",
      "district": null,
      "subdistrict": null,
      "title": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
      "latitude": 0.3457623,
      "longitude": 112.7152125,
      "street_name": null,
      "formatted_address": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
      "postal_code": 78762,
      "distance": 7783
    }
  ],
  "message": "SUCCESS",
  "code": "01",
  "processed_time": 1.2314
}

V1 Autocomplete

Returns a list of locations search based on query text

get

This endpoint search nearest location based on query text

Query parameters
qstringRequired

Query string from location

Example: menara+tendean
lngnumberOptional

Your longitude

Example: 106.827205
latnumberOptional

Your latitude

Example: -6.168287
limitintegerOptional

Limit locations retrieved

Example: 5
Responses
200

A JSON array of address with cluster and subcluster

application/json
get
/maps/autocomplete
const requestOptions = {
  method: "GET",
  headers: Header,
  redirect: "follow"
};

fetch("https://api-stg.oppna.dev/v1/maps/autocomplete?q=menara+tendean", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
.catch((error) => console.error(error));
{
  "data": [
    {
      "geolocation_id": "67769bXBnMDE6Q2hJSkViMlplckV1QURJUjdqT29OTVlVUWFN",
      "title": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
      "formatted_address": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762"
    },
    {
      "geolocation_id": "67769bXBnMDE6Q2hJSkViMlplckV1QURJUjdqT29OTVlVUWFN",
      "title": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
      "formatted_address": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762"
    }
  ],
  "message": "SUCCESS",
  "code": "01",
  "processed_time": 1.2314
}

Last updated

Was this helpful?