Flight Info API

FREEMIUM
Par OAG Aviation Worldwide Limited | Mise à jour 2달 전 | Travel
Popularité

9.5 / 10

Latence

544ms

Niveau de service

100%

Health Check

N/A

Retour à toutes les discussions

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

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires