Flight Info API

FREEMIUM
Door OAG Aviation Worldwide Limited | Bijgewerkt 2 months ago | Travel
Populariteit

9.5 / 10

Latency

548ms

Serviceniveau

100%

Health Check

N/A

Terug naar alle discussies

Totally SCAM

Rapid account: 89 Transfers
89transfers
4 months ago

package main

import (
“fmt”
“net/http”
“io”
)

func main() {

url := "https://flight-info-api.p.rapidapi.com/schedules?version=v2&DepartureDateTime=2024-02-01T00%3A00&ArrivalDateTime=2024-02-05T00%3A00&DepartureAirport=PMI&FlightType=SCHEDULED&CodeType=IATA&ServiceType=PASSENGER"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-RapidAPI-Key", "2e44178b7dmsh2090ef045b2c7b9p1bd7dejsnc02342b7370c")
req.Header.Add("X-RapidAPI-Host", "flight-info-api.p.rapidapi.com")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(res)
fmt.Println(string(body))

}

RESULTS

{
“data”: [],
“paging”: {
“limit”: 100,
“totalCount”: 0,
“totalPages”: 0,
“next”: “”
}
}

Really bad developers.

Rapid account: Donatas Mazeika OAG
DonatasMazeikaOAG Commented 4 months ago

Hi, thank you for your question. Please make sure that you are specifying either DepartureDateTime or ArrivalDateTime. The API query you have constructed is searching for flights departing on 2024-02-01, and the same flight should arrive four days later, which is unlikely.
If you would like to retrieve all flights departing from 2024-02-01 to 2024-02-05, please use the following format for the DepartureDateTime parameter: 2024-02-01/2024-01-05.
Please let us know if you have more questions

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen