Points of Interest

Service for finding structured attributes and geographical coordinates for points of interest (POI).

Process

Process chart

Name Type Explanation
Is request valid? Gateway Application verifies request parameters
Error response Message End Application creates error response according to "Verification" chapter
Request POI information from database Action API queries database with request parameters
Response message Message End Application creates response message according to "Response message" chapter

Request parameters

Request consists of the following URI parameters:

Parameter Possible values Default value Required Description
q string - Yes The object you want to search/geocode
apikey string - Yes Your authorisation key
type xml, json json No The format in which output should be generated
lat double - No Latitude of the center point of prioritised area.
If used, results nearer to the specified point are ranked higher in the list of results.
lon double - No Longitude of the center point of prioritised area.
If used, results nearer to the specified point are ranked higher in the list of results.
limit integer 15 No Maximum number of address point candidates returned.
Max value is 15.
city string - No Populated place the object is located for filtering purposes.
street string - No Street, where the object is located for filtering purposes.
Works in combination with "city" parameter.
cat accommodation
border_checkpoint
car_fuel
cultural_institution
cultural_landmark
education_institution
entertainment
finance_insurance
food_catering
health_care
lighthouse
natural_landmark
place_of_worship
postoffice
public\
institution
shopping
sport_recreation
transport
- No Category of the object, for filtering purposes.
subcat adventist
airport_int
airport_nat
apartment
atm
autogas
bandstand
bank
baptist
bar
border_checkpoint
border_crossing
building
bus_station
cafe
camping
campsite
castle
castle_mound
catholic
cave
cemetery
christian
cinema
cliff
clinic
college
concert_hall
crucifix
cultural
elementary
embassy
farm
fast_food
fire_station
garden
guest_house
heritage_tree
holiday_home
hospital
hostel
hotel
kindergarden
library
lighthouse
lutheran
market
monument
motel
municipality
museum
music_art_school
old_believer
orthodox
other_accommodation
other_cultural
other_institution
other_natural
parking
peak
pentacoastal
petrol
pharmacy
post_office
primary
quarry
race_track
railway_halt
railway_station
recreation_centre
rehabilitation_centre
resort
restaurant
ruins
secondary
shopping
ski_resort
source
special
sports_facility
sports_school
stone
stop
swimming
synagogue
theatre_opera
tower
trail
university
viewpoint
visitor_centre
vocational
waterfall<brwindmill
workshop
zoo
- No Subcategory of the object, for filtering purposes.

Request URL example

https://api.geodatahub.eu/poi?q=[poi to search]&apikey=[your API key]&limit=5&cat=[category]&type=[response type]

Verification

Verification errorCode errorName errorDescription
Is q present in request? 400 Bad Request Required String parameter 'q' is not present
Is API key in request? 400 Bad Request No API key found in request
Is API key correct in request? 401 Unauthorized Invalid authentication credentials
Is API key active? 403 Forbidden Inactive API key found in request
Is output format defined correctly in request? 400 Bad Request Incorrect output format(type) requested
Are 'lat' and 'lon' both in request (if one of them is)? 400 Bad Request lat and lon can't be null
Is limit defined correctly in request? 400 Bad Request Incorrect 'limit' parameter defined in the request

Response parameters

  • HTTP status = 200;
  • Body consists of the following values:
Parameter Type Value
TABLE_NAME.COLUMN_NAME
Description
name string Name
short_name string Shortened name
cat string POI category
sub_cat string POI subcategory
country string Country name
level0...level[n] string Address components by levels. Real content depends on country specifics and can be understood by conversion table.
apartment string Apartment number
postal string Postal code
phone string Phone number
contacts string Additional information
height float Height information in meters (only for peaks, castle mounds)
webpage string Web page
hours_on string Working hours. Day names are coded as Mo, Tu, We, Th, Fr, Sa, Su.

Examples:
-- "24/7" - working any time
-- "Mo-Su 08:00-22:00" - working every day from 8 to 22
-- "Mo-Fr 09:00-20:00, Sa 09:00-18:00, Su 10:00-18:00" - working from 9 to 20 from Monday to Friday; from 9 to 18 on Saturday, from 10 to 18 on Sunday
extended_data
  crs string Spatial Reference (EPSG) code of query and response.
If not specified by request parameter, default value "EPSG:4326" is given.
  centroid double Center coordinates of the output object
geometry
  type string Geometry type
  coordinates Geographical coordinates for each object.
If not specified by request parameter, coordinates are given in EPSG:4326.
bbox double Corner coordinates of the output object

Response examples

{
  "type": "FeatureCollection",
  "name": "tallink hotel",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "country": "Latvija",
        "extended_data": {
          "crs": "EPSG:4326",
          "centroid": "24.122473,56.948697"
        },
        "subtype": "hotel",
        "phone": "6709 9760",
        "display": "0",
        "name": "Tallink Hotel Riga",
        "short_name": "Tallink Hotel Riga",
        "type": "accommodation",
        "contacts": "****",
        "hours_on": "****",
        "height": "0.0"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          24.122473,
          56.948697
        ]
      },
      "bbox": [
        24.122473,
        56.948697,
        24.122473,
        56.948697
      ]
    }
  ]
}
<ns2:kml xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:ns2="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
<ns2:Document>
<ns2:name>tallink hotel</ns2:name>
<ns2:Placemark>
<ns2:name>Tallink Hotel Riga</ns2:name>
<xal:AddressDetails>
<xal:AddressLines>
<xal:AddressLine Type="country">Latvija</xal:AddressLine>
</xal:AddressLines>
</xal:AddressDetails>
<ns2:ExtendedData>
<ns2:Data name="short_name">
<ns2:value>Tallink Hotel Riga</ns2:value>
</ns2:Data>
<ns2:Data name="type">
<ns2:value>accommodation</ns2:value>
</ns2:Data>
<ns2:Data name="subtype">
<ns2:value>hotel</ns2:value>
</ns2:Data>
<ns2:Data name="phone">
<ns2:value>6709 9760</ns2:value>
</ns2:Data>
<ns2:Data name="contacts">
<ns2:value>****</ns2:value>
</ns2:Data>
<ns2:Data name="hours_on">
<ns2:value>****</ns2:value>
</ns2:Data>
<ns2:Data name="bbox">
<ns2:value>24.122473,56.948697,24.122473,56.948697</ns2:value>
</ns2:Data>
<ns2:Data name="centroid">
<ns2:value>24.122473,56.948697</ns2:value>
</ns2:Data>
<ns2:Data name="crs">
<ns2:value>EPSG:4326</ns2:value>
</ns2:Data>
</ns2:ExtendedData>
<ns2:Point>
<ns2:coordinates>24.122473,56.948697</ns2:coordinates>
</ns2:Point>
</ns2:Placemark>
</ns2:Document>
</ns2:kml>

Data sources

POI data used in POI Service API are based on various sources according to the data provider.
Jāņa sēta data are based on Jāņa sēta POI database and OpenStreetMap contributors' data. Reach-U data are based on the OpenStreetMap contributors' data.