curl --request POST \
--url https://api.anysite.io/api/omio/stations \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"station": "<string>",
"timeout": 300
}
'import requests
url = "https://api.anysite.io/api/omio/stations"
payload = {
"station": "<string>",
"timeout": 300
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({station: '<string>', timeout: 300})
};
fetch('https://api.anysite.io/api/omio/stations', 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.anysite.io/api/omio/stations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'station' => '<string>',
'timeout' => 300
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/omio/stations"
payload := strings.NewReader("{\n \"station\": \"<string>\",\n \"timeout\": 300\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/omio/stations")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"station\": \"<string>\",\n \"timeout\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/omio/stations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"station\": \"<string>\",\n \"timeout\": 300\n}"
response = http.request(request)
puts response.read_body[
{
"@type": "OmioStation",
"id": "<string>",
"name": "<string>",
"type": "<string>",
"address": "<string>",
"latitude": 123,
"longitude": 123,
"distance_to_center_km": 123,
"iata_code": "<string>",
"phones": [],
"public_transport_connections": [],
"ticket_office_hours": [],
"link": "<string>",
"facilities": {
"@type": "OmioStationFacilities",
"has_wifi": true,
"wifi": [],
"has_atm": true,
"atm": [],
"has_parking": true,
"parking": [],
"has_taxi": true,
"has_toilet": true,
"has_accessibility": true,
"accessibility": [],
"has_dining": true,
"dining": [],
"has_luggage_storage": true,
"luggage_storage": [],
"has_shopping": true,
"shopping": [],
"has_hotel": true,
"hotel": [],
"has_lounge": true,
"has_ticket_office": true,
"ticket_office": [],
"has_information_desk": true,
"information_desk": [],
"has_waiting_room": true,
"has_lost_and_found_office": true,
"has_businesses": true,
"businesses": [],
"has_shower": true,
"has_bike_parking": true,
"has_bike_rental": true,
"has_car_rental": true
}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/omio/stations
Get details for an Omio station by its station page path. Returns the station id, name, type, address, coordinates, distance to the city centre, IATA code (airports), phone numbers, public transport connections, ticket office opening hours and a full facilities breakdown (wifi, ATMs, parking, taxi, toilets, accessibility, dining, luggage storage, shops, hotels, lounges, ticket and information desks, bike and car services and more) with descriptive details where available. The station path is the link returned by the route and journey endpoints, e.g. train-stations/spain/barcelona/barcelona-sants.
Price: 10 credits
⚠️ Common errors: 412: No station found for the given station page path
curl --request POST \
--url https://api.anysite.io/api/omio/stations \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"station": "<string>",
"timeout": 300
}
'import requests
url = "https://api.anysite.io/api/omio/stations"
payload = {
"station": "<string>",
"timeout": 300
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({station: '<string>', timeout: 300})
};
fetch('https://api.anysite.io/api/omio/stations', 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.anysite.io/api/omio/stations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'station' => '<string>',
'timeout' => 300
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/omio/stations"
payload := strings.NewReader("{\n \"station\": \"<string>\",\n \"timeout\": 300\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/omio/stations")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"station\": \"<string>\",\n \"timeout\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/omio/stations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"station\": \"<string>\",\n \"timeout\": 300\n}"
response = http.request(request)
puts response.read_body[
{
"@type": "OmioStation",
"id": "<string>",
"name": "<string>",
"type": "<string>",
"address": "<string>",
"latitude": 123,
"longitude": 123,
"distance_to_center_km": 123,
"iata_code": "<string>",
"phones": [],
"public_transport_connections": [],
"ticket_office_hours": [],
"link": "<string>",
"facilities": {
"@type": "OmioStationFacilities",
"has_wifi": true,
"wifi": [],
"has_atm": true,
"atm": [],
"has_parking": true,
"parking": [],
"has_taxi": true,
"has_toilet": true,
"has_accessibility": true,
"accessibility": [],
"has_dining": true,
"dining": [],
"has_luggage_storage": true,
"luggage_storage": [],
"has_shopping": true,
"shopping": [],
"has_hotel": true,
"hotel": [],
"has_lounge": true,
"has_ticket_office": true,
"ticket_office": [],
"has_information_desk": true,
"information_desk": [],
"has_waiting_room": true,
"has_lost_and_found_office": true,
"has_businesses": true,
"businesses": [],
"has_shower": true,
"has_bike_parking": true,
"has_bike_rental": true,
"has_car_rental": true
}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
Response
Successful Response
Show child attributes
Show child attributes