Map
Postal map
Find any Liberty County postal and the road it is on.
GEThttps://api.samplebot.app/v1/postal
Prefer a button to click? This tool also works in your browser at samplebot.app/postal-map.
Parameters
| Name | Description | Default |
|---|---|---|
code | Postal number. Leave out to list every postal. |
Send them as query parameters.
Example request
curl
curl "https://api.samplebot.app/v1/postal?code=218" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
JavaScript (Node 18+)
const res = await fetch("https://api.samplebot.app/v1/postal?code=218", {
headers: { Authorization: `Bearer ${process.env.SAMPLE_API_KEY}` },
});
const { ok, data, text, error } = await res.json();
if (!ok) throw new Error(error.message);
console.log(data);
Python
import os, requests
res = requests.get(
"https://api.samplebot.app/v1/postal",
params={"code":"218"},
headers={"Authorization": f"Bearer {os.environ['SAMPLE_API_KEY']}"},
)
print(res.json()["data"])
Example reply
This is the real reply to the example request. Long lists are shortened here.
{
"ok": true,
"tool": "postal",
"data": {
"code": "218",
"x": 2124,
"z": 3710,
"street": "Freedom Avenue"
},
"text": null
}
Using it in your app
Read data for the values. Check ok first: when it is false, error.message says what went wrong in words you can show your users. Keep your key on your server, never in a web page or a Roblox game.