Places Service
The places
service can be used to retrieve the list of supported places. The ids for the places are then used in the other services to indicate the location to be queried.
This service can be tested with the Query Builder.
Request parameters
Name | Description | Required |
---|---|---|
geo | Return longitude and latitude for the Type: Accepted values: Default value: | No |
lang | The preferred language for the texts. An error will be raised if the language code cannot be recognized. In case the text for a specific event cannot be retrieved in the requested language it will be returned in English instead. This is also the default language. In case you have specific needs for a certain language/translation, please contact us. Type: Default value: | No |
See also the section “General Parameters”.
Response elements
Name | Description |
---|---|
places | This element contains a list of all currently known places, their identifiers and their geographical location (if requested). Type: |
Example JSON request
https://api.xmltime.com/places?version=3&out=json&prettyprint=1&accesskey={KEY}&expires={TIMESTAMP}&signature={SIGNATURE}
Example JSON response
{
"version": 3,
"billing": {
"credits": 1
},
"places": [{
"id": 1,
"urlid": "cote-divoire/abidjan",
"geo": {
"name": "Abidjan",
"country": {
"id": "ci",
"name": "Cote d'Ivoire"
},
"latitude": 5.320,
"longitude": -4.020
}
},{
"id": 2,
"urlid": "united-arab-emirates/abu-dhabi",
"geo": {
"name": "Abu Dhabi",
"state": "Abu Dhabi",
"country": {
"id": "ae",
"name": "United Arab Emirates"
},
"latitude": 24.475,
"longitude": 54.371
}
},{
"id": 3,
"urlid": "mexico/acapulco",
"geo": {
"name": "Acapulco",
"state": "Guerrero",
"country": {
"id": "mx",
"name": "Mexico"
},
"latitude": 16.860,
"longitude": -99.877
}
}]
}
Example XML request
https://api.xmltime.com/places?version=3&out=xml&prettyprint=1&accesskey={KEY}&expires={TIMESTAMP}&signature={SIGNATURE}
Example XML response
<data version="3">
<billing>
<credits>1</credits>
</billing>
<places>
<place id="1" urlid="cote-divoire/abidjan">
<geo>
<name>Abidjan</name>
<country id="ci">Cote d'Ivoire</country>
<latitude>5.320</latitude>
<longitude>-4.020</longitude>
</geo>
</place>
<place id="2" urlid="united-arab-emirates/abu-dhabi">
<geo>
<name>Abu Dhabi</name>
<state>Abu Dhabi</state>
<country id="ae">United Arab Emirates</country>
<latitude>24.475</latitude>
<longitude>54.371</longitude>
</geo>
</place>
<place id="3" urlid="mexico/acapulco">
<geo>
<name>Acapulco</name>
<state>Guerrero</state>
<country id="mx">Mexico</country>
<latitude>16.860</latitude>
<longitude>-99.877</longitude>
</geo>
</place>
</places>
</data>