Flight Info API

부분 유료
분류별 OAG Aviation Worldwide Limited | 업데이트됨 2 months ago | Travel
인기

9.5 / 10

지연 시간

548ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

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

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입