Search airports
curl --request GET \
--url https://attend.hackclub.com/api/v1/travel/search_airports \
--cookie _attend_session=import requests
url = "https://attend.hackclub.com/api/v1/travel/search_airports"
headers = {"cookie": "_attend_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: '_attend_session='}};
fetch('https://attend.hackclub.com/api/v1/travel/search_airports', 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://attend.hackclub.com/api/v1/travel/search_airports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "_attend_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://attend.hackclub.com/api/v1/travel/search_airports"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "_attend_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://attend.hackclub.com/api/v1/travel/search_airports")
.header("cookie", "_attend_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://attend.hackclub.com/api/v1/travel/search_airports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = '_attend_session='
response = http.request(request)
puts response.read_body{
"airports": [
{
"iata": "JFK",
"icao": "KJFK",
"name": "New York John F. Kennedy",
"city": "New York",
"country": "US",
"location": {
"lat": 123,
"lon": 123
}
}
]
}Travel
Search airports
Search airports by keyword. Authenticated with the web session cookie, not a bearer token. Returns an empty list for terms shorter than 2 characters.
GET
/
travel
/
search_airports
Search airports
curl --request GET \
--url https://attend.hackclub.com/api/v1/travel/search_airports \
--cookie _attend_session=import requests
url = "https://attend.hackclub.com/api/v1/travel/search_airports"
headers = {"cookie": "_attend_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: '_attend_session='}};
fetch('https://attend.hackclub.com/api/v1/travel/search_airports', 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://attend.hackclub.com/api/v1/travel/search_airports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "_attend_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://attend.hackclub.com/api/v1/travel/search_airports"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "_attend_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://attend.hackclub.com/api/v1/travel/search_airports")
.header("cookie", "_attend_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://attend.hackclub.com/api/v1/travel/search_airports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = '_attend_session='
response = http.request(request)
puts response.read_body{
"airports": [
{
"iata": "JFK",
"icao": "KJFK",
"name": "New York John F. Kennedy",
"city": "New York",
"country": "US",
"location": {
"lat": 123,
"lon": 123
}
}
]
}Was this page helpful?