A state's LGAs
curl --request GET \
--url https://api.loci.ng/v1/lgasimport requests
url = "https://api.loci.ng/v1/lgas"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.loci.ng/v1/lgas', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.loci.ng/v1/lgas",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.loci.ng/v1/lgas"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.loci.ng/v1/lgas")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loci.ng/v1/lgas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"level": "lga",
"units": [
{
"level": "lga",
"name": "BAKORI",
"code": "170",
"state": "KATSINA",
"zone": "NORTH WEST",
"frames": 992,
"bbox": [
7.28415,
11.49179,
7.64336,
11.85925
]
},
{
"level": "lga",
"name": "BATAGARAWA",
"code": "151",
"state": "KATSINA",
"zone": "NORTH WEST",
"frames": 763,
"bbox": [
7.41164,
12.6981,
7.75059,
13.04203
]
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Frames
A state's LGAs
The local government areas of one state, by name, each with its code, frame count and extent. No key is needed: the hierarchy is reference data about the grid, not anyone’s dataset, and the response is cacheable for an hour. The same answer is on GET /v1/frames/admin for a key holder.
GET
/
v1
/
lgas
A state's LGAs
curl --request GET \
--url https://api.loci.ng/v1/lgasimport requests
url = "https://api.loci.ng/v1/lgas"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.loci.ng/v1/lgas', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.loci.ng/v1/lgas",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.loci.ng/v1/lgas"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.loci.ng/v1/lgas")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loci.ng/v1/lgas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"level": "lga",
"units": [
{
"level": "lga",
"name": "BAKORI",
"code": "170",
"state": "KATSINA",
"zone": "NORTH WEST",
"frames": 992,
"bbox": [
7.28415,
11.49179,
7.64336,
11.85925
]
},
{
"level": "lga",
"name": "BATAGARAWA",
"code": "151",
"state": "KATSINA",
"zone": "NORTH WEST",
"frames": 763,
"bbox": [
7.41164,
12.6981,
7.75059,
13.04203
]
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}