Provide latitude and logitude of the given place.
Method | Full Url |
---|---|
POST | https://json.apireports.com/v1/geo_details |
{
"status_code": 200,
"status": true,
"data": [
{
"place": "Panjim, Goa, IN",
"place_name": "Panjim",
"state_name": "Goa",
"latitude": "15.48330000000",
"longitude": "73.83330000000",
"timezone_id": "Asia/Kolkata",
"country_name": "India",
"country_code": "IN"
},
{
"place": "Curchorem, Goa, IN",
"place_name": "Curchorem",
"state_name": "Goa",
"latitude": "15.25000000000",
"longitude": "74.10000000000",
"timezone_id": "Asia/Kolkata",
"country_name": "India",
"country_code": "IN"
},
{
"place": "Vasco Da Gama, Goa, IN",
"place_name": "Vasco Da Gama",
"state_name": "Goa",
"latitude": "15.40000000000",
"longitude": "73.83330000000",
"timezone_id": "Asia/Kolkata",
"country_name": "India",
"country_code": "IN"
},
{
"place": "Panaji, Goa, IN",
"place_name": "Panaji",
"state_name": "Goa",
"latitude": "15.48330000000",
"longitude": "73.83330000000",
"timezone_id": "Asia/Kolkata",
"country_name": "India",
"country_code": "IN"
},
{
"place": "Tivim, Goa, IN",
"place_name": "Tivim",
"state_name": "Goa",
"latitude": "15.60000000000",
"longitude": "73.83330000000",
"timezone_id": "Asia/Kolkata",
"country_name": "India",
"country_code": "IN"
},
{
"place": "Dona Paula, Goa, IN",
"place_name": "Dona Paula",
"state_name": "Goa",
"latitude": "15.45000000000",
"longitude": "73.80000000000",
"timezone_id": "Asia/Kolkata",
"country_name": "India",
"country_code": "IN"
},
{
"place": "Verna, Goa, IN",
"place_name": "Verna",
"state_name": "Goa",
"latitude": "15.35000000000",
"longitude": "73.91670000000",
"timezone_id": "Asia/Kolkata",
"country_name": "India",
"country_code": "IN"
},
{
"place": "Navelim, Goa, IN",
"place_name": "Navelim",
"state_name": "Goa",
"latitude": "15.25000000000",
"longitude": "73.91670000000",
"timezone_id": "Asia/Kolkata",
"country_name": "India",
"country_code": "IN"
},
{
"place": "Varca, Goa, IN",
"place_name": "Varca",
"state_name": "Goa",
"latitude": "15.21670000000",
"longitude": "73.91670000000",
"timezone_id": "Asia/Kolkata",
"country_name": "India",
"country_code": "IN"
},
{
"place": "Bambolim, Goa, IN",
"place_name": "Bambolim",
"state_name": "Goa",
"latitude": "15.45000000000",
"longitude": "73.85000000000",
"timezone_id": "Asia/Kolkata",
"country_name": "India",
"country_code": "IN"
}
]
}
Params | Data Type | Description | Example |
---|---|---|---|
place | String | Place Name | goa |
max_rows | int | Max Rows (Default 15) | 10 |
# cURL Request Example
curl --location --request POST 'https://json.apireports.com/v1/geo_details' \
-u '{YourUserID}:{YourApiKey}'\
--header 'Accept-Language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"place": "goa",
"max_rows": 10
}'
# END
/* JavaScript Request Example */
var apiEndPoint = "geo_details";
var userId = "{YourUserID}";
var apiKey = "{YourApiKey}";
var language = "en";
var data = {
"place": "goa",
"max_rows": 10
};
var url = 'https://json.apireports.com/v1/'+apiEndPoint;
var request = $.ajax({
url: url,
method: "POST",
dataType:'json',
headers: {
"Authorization": "Basic " + btoa(userId+":"+apiKey),
"Accept-Language": "en",
"Content-Type":'application/json'
},
data:JSON.stringify(data)
});
request.then(
function(resp){
console.log(resp);
},
function(err){
console.log(err);
}
);
/* END */
<?php
/* PHP Request Example */
$apiEndPoint = "geo_details";
$userId = "{YourUserID}";
$apiKey = "{YourApiKey}";
$url = "https://json.apireports.com/v1/";
$data = array(
"place" => "goa",
"max_rows" => 10
);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url.$apiEndPoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$header[] = 'Authorization: Basic '. base64_encode($userId.":".$apiKey);
$header[] = 'Accept-Language: en';
$header[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
$error = curl_error($ch);
$http_code = curl_getinfo($ch ,CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
/* END */
# Python Request Example
import requests
import json
apiEndPoint = "geo_details";
userId = "{YourUserID}";
apiKey = "{YourApiKey}";
url = "https://json.apireports.com/v1/"+apiEndPoint
data = json.dumps({
"place": "goa",
"max_rows": 10
})
headers = {
'Accept-Language': 'en',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, auth=(userId, apiKey),data=data)
print(response.text)
# END
/* NodeJS Request Example */
var request = require('request');
var apiEndPoint = "geo_details";
var userId = "{YourUserID}";
var apiKey = "{YourApiKey}";
var url = 'https://json.apireports.com/v1/'+apiEndPoint;
var options = {
'method': 'POST',
'url': url,
'auth': {
'user': userId,
'password': apiKey
},
'headers': {
'Accept-Language': 'en',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"place": "goa",
"max_rows": 10
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
/* END */