Flight Info API

FREEMIUM
(Ким) OAG Aviation Worldwide Limited | Оновлено 2ヶ月前 | Travel
Популярність

9.5 / 10

Затримки

548ms

Рівень обслуговування

100%

Health Check

N/A

Повернутися до всіх обговорень

Totally SCAM

Rapid account: 89 Transfers
89transfers
4ヶ月前

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ヶ月前

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

Приєднуйтесь до обговорення — додайте повідомлення нижче:

Вхід / Реєстрація, щоб публікувати нові повідомлення