OPENPOI API: v0.1 [ALPHA]
/poi/nearby Return set of nearby POI.
/checkin/get Return set of check-ins to a specified POI or by a specified user.
/checkin/add Check user into a POI.
/tags/get Get most recent category tag for a POI.
/tags/add Add tags to a specified POI.
Get a set of nearby POI ranked by distance from query geographic coordinates
Name
Required
Type
Description
lat
true
float
Latitude of query location
lng
true
float
Longitude of query location
limit
true
int
Number of POI to return (default: 50)
offset
true
int
Offset for pagination (default: 0)
key
false
float
API Key (currently not enforced)
q
false
string
Optional query parameter
Name
Type
Description
message
string
Success message.
code
integer
Response code.
data
Array
Set of POIs ordered by distance (closest to farthest)
* id
int
OpenPOI unique identifier
* osm_id
string
OpenStreetMap unique identifier (if available)
* osm_lat
float
OpenStreetMap POI latitude
* osm_lng
float
OpenStreetMap POI longitude
* osm_name
string
OpenStreetMap POI name
* osm_cat
int
OpenStreetMap category identifier
* osm_type
string
OpenStreetMap category name
* distance
int
Distance from query location in feet
* direction
string
Direction from query location
* avatar
string
URL of base category icon
Name
Type
Description
message
string
Error message.
code
integer
Response code.
https://openpoi.org/poi/nearby?lat=38.9117609&lng=-77.0187946&key=abc123&offset=0&limit=50&q=
{
"message" :" success" ,
"code" :200 ,
"data" :[
{
"osm_type" :" School" ,
"id" :366 ,
"osm_id" :" N358954913" ,
"osm_cat" :21 ,
"osm_lat" :38.9123337 ,
"osm_lng" :-77.018032 ,
"osm_name" :" Morse School" ,
"distance" :301 ,
"direction" :" Northeast" ,
"avatar" :" https://openpoi.org/img/04.jpg"
}
]
}
Get a set of check-ins for a specified POI ID or specified USER ID.
Name
Required
Type
Description
poi or user
true
int
OpenPOI unique POI or USER identifier
limit
false
int
Number of check-ins to return (default: 50)
offset
false
int
Offset for pagination (default: 0)
key
false
float
API Key (currently not enforced)
Name
Type
Description
message
string
Success message.
code
integer
Response code.
data
Array
Set of Check-Ins (oldest to most recent)
* poi
int
OpenPOI unique POI identifier
* user
int
OpenPOI unique USER identifier
* ts
timestamp with timezone
Date and time of check-in
* details
Object
User details Object
** name
string
Full name of OpenPOI user
** photo
int
Photo of OpenPOI User
Name
Type
Description
message
string
Error message.
code
integer
Response code.
https://openpoi.org/checkin/get?poi=366&key=abc123
https://openpoi.org/checkin/get?user=1&key=abc123
{
"message" :" success" ,
"code" :200 ,
"data" :[
{
"poi" :366 ,
"user" :1 ,
"ts" :" Wed Jan 31 2018 04:32:35 GMT+0000 (UTC)" ,
"details" : {
"name" : " Luke Skywalker" ,
"photo" : " https://abc123.jpg"
}
}
]
}
Check user into POI.
Name
Required
Type
Description
user
true
int
OpenPOI unique USER identifier
poi
true
int
OpenPOI unique POI identifier
lat
false
float
Latitude of device
lng
false
float
Longitude of device
key
false
float
API Key (currently not enforced)
Name
Type
Description
message
string
Success message.
code
integer
Response code.
Name
Type
Description
message
string
Error message.
code
integer
Response code.
https://openpoi.org/checkin/add?poi=366&user=1&key=abc123
{
"message" :" success" ,
"code" :200
}
Get most recent category tag for a POI.
Name
Required
Type
Description
poi
true
int
OpenPOI unique POI identifier
key
false
float
API Key (currently not enforced)
Name
Type
Description
message
string
Success message.
code
integer
Response code.
data
Array
Set of Check-Ins (oldest to most recent)
* poi
int
OpenPOI unique POI identifier
* user
int
OpenPOI unique USER identifier
* cat
string
Category string
* ts
timestamp without time zone
Timestamp that the category tag was added.
Name
Type
Description
message
string
Error message.
code
integer
Response code.
https://openpoi.org/tags/get?poi=6690&key=abc123
{
"code" : 200 ,
"data" : [
{
"user" : 2 ,
"poi" : 6690 ,
"cat" : " Beer Garden" ,
"ts" : " Tue Mar 13 2018 02:42:09 GMT+0000 (UTC)"
}
],
"message" : " success"
}
Add tags to a specified POI.
Name
Required
Type
Description
poi
true
int
OpenPOI unique POI identifier
user
true
int
OpenPOI unique USER identifier
<key>
false
any
Any number of key value pair tags.
key
false
float
API Key (currently not enforced)
Name
Type
Description
message
string
Success message.
code
integer
Response code.
data
Array
Set of Check-Ins (oldest to most recent)
* ok
int
temp status
* n
int
temp rows impacted
Name
Type
Description
message
string
Error message.
code
integer
Response code.
https://openpoi.org/tags/add?poi=366&user=1&cat=Beer Garden&closed=true&key=abc123
{
"code" : 200 ,
"data" : {
"ok" :1 ,
"n" :1
},
"message" : " success"
}