Upload folder using huggingface_hub (part 25)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +1 -0
- toolbench/toolenv/tools/Travel/hotel_collection.json +44 -0
- toolbench/toolenv/tools/Travel/hotels.json +0 -0
- toolbench/toolenv/tools/Travel/hotels/api.py +455 -0
- toolbench/toolenv/tools/Travel/hotels_com_free.json +236 -0
- toolbench/toolenv/tools/Travel/hotels_com_free/api.py +30 -0
- toolbench/toolenv/tools/Travel/hotels_com_provider.json +472 -0
- toolbench/toolenv/tools/Travel/hotels_com_provider/api.py +297 -0
- toolbench/toolenv/tools/Travel/iata_airport_codes.json +37 -0
- toolbench/toolenv/tools/Travel/iata_airport_codes/api.py +31 -0
- toolbench/toolenv/tools/Travel/iata_and_icao_codes/api.py +51 -0
- toolbench/toolenv/tools/Travel/iatacodes.json +1380 -0
- toolbench/toolenv/tools/Travel/iatacodes/api.py +285 -0
- toolbench/toolenv/tools/Travel/indian_railway_pnr_status.json +126 -0
- toolbench/toolenv/tools/Travel/irail.json +83 -0
- toolbench/toolenv/tools/Travel/irail/api.py +56 -0
- toolbench/toolenv/tools/Travel/irctc.json +1334 -0
- toolbench/toolenv/tools/Travel/irctc/api.py +311 -0
- toolbench/toolenv/tools/Travel/kayak_flights.json +44 -0
- toolbench/toolenv/tools/Travel/kayak_flights/api.py +29 -0
- toolbench/toolenv/tools/Travel/live_traffic_images.json +0 -0
- toolbench/toolenv/tools/Travel/live_traffic_images/api.py +65 -0
- toolbench/toolenv/tools/Travel/madrid_barajas_airport_flights.json +46 -0
- toolbench/toolenv/tools/Travel/madrid_barajas_airport_flights/api.py +50 -0
- toolbench/toolenv/tools/Travel/makcorps_hotel_price_comparison.json +24 -0
- toolbench/toolenv/tools/Travel/makcorps_hotel_price_comparison/api.py +71 -0
- toolbench/toolenv/tools/Travel/manston_metar/api.py +29 -0
- toolbench/toolenv/tools/Travel/mohawk_language/api.py +31 -0
- toolbench/toolenv/tools/Travel/motoka_ug/api.py +152 -0
- toolbench/toolenv/tools/Travel/multimodal_trip_planner.json +1655 -0
- toolbench/toolenv/tools/Travel/multimodal_trip_planner/api.py +31 -0
- toolbench/toolenv/tools/Travel/next_charging_station.json +75 -0
- toolbench/toolenv/tools/Travel/next_charging_station/api.py +54 -0
- toolbench/toolenv/tools/Travel/next_parking_lot.json +81 -0
- toolbench/toolenv/tools/Travel/next_parking_lot/api.py +54 -0
- toolbench/toolenv/tools/Travel/nomad_list_cities.json +321 -0
- toolbench/toolenv/tools/Travel/nomad_list_cities/api.py +272 -0
- toolbench/toolenv/tools/Travel/online_travel_booking_solution.json +30 -0
- toolbench/toolenv/tools/Travel/online_travel_booking_solution/api.py +64 -0
- toolbench/toolenv/tools/Travel/otrams_airline_reservation_system_work.json +30 -0
- toolbench/toolenv/tools/Travel/otrams_airline_reservation_system_work/api.py +29 -0
- toolbench/toolenv/tools/Travel/pikme.json +31 -0
- toolbench/toolenv/tools/Travel/pikme/api.py +31 -0
- toolbench/toolenv/tools/Travel/pnr_converter.json +30 -0
- toolbench/toolenv/tools/Travel/pnr_status_indian_railway.json +225 -0
- toolbench/toolenv/tools/Travel/pnr_status_indian_railway/api.py +29 -0
- toolbench/toolenv/tools/Travel/popular_us_cities_api.json +113 -0
- toolbench/toolenv/tools/Travel/popular_us_cities_api/api.py +71 -0
- toolbench/toolenv/tools/Travel/priceline_com.json +0 -0
- toolbench/toolenv/tools/Travel/priceline_com/api.py +194 -0
.gitattributes
CHANGED
|
@@ -91,3 +91,4 @@ toolbench/toolenv/tools/Sports/sportscore.json filter=lfs diff=lfs merge=lfs -te
|
|
| 91 |
toolbench/toolenv/tools/Sports/surebets_2.json filter=lfs diff=lfs merge=lfs -text
|
| 92 |
toolbench/toolenv/tools/Sports/transfermarkt_db.json filter=lfs diff=lfs merge=lfs -text
|
| 93 |
toolbench/toolenv/tools/Transportation/travel_advisor.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 91 |
toolbench/toolenv/tools/Sports/surebets_2.json filter=lfs diff=lfs merge=lfs -text
|
| 92 |
toolbench/toolenv/tools/Sports/transfermarkt_db.json filter=lfs diff=lfs merge=lfs -text
|
| 93 |
toolbench/toolenv/tools/Transportation/travel_advisor.json filter=lfs diff=lfs merge=lfs -text
|
| 94 |
+
toolbench/toolenv/tools/Visual_Recognition/mantis_object_detection.json filter=lfs diff=lfs merge=lfs -text
|
toolbench/toolenv/tools/Travel/hotel_collection.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"Hotel Collection",
|
| 3 |
+
"tool_description":"Collection of Hotels",
|
| 4 |
+
"title":"Hotel Collection",
|
| 5 |
+
"pricing":"FREEMIUM",
|
| 6 |
+
"score":null,
|
| 7 |
+
"home_url":"https://rapidapi.com/kaushiksheel9/api/hotel-collection/",
|
| 8 |
+
"host":"hotel-collection.p.rapidapi.com",
|
| 9 |
+
"api_list":[
|
| 10 |
+
{
|
| 11 |
+
"name":"Get specific Hotel by Slug",
|
| 12 |
+
"url":"https://hotel-collection.p.rapidapi.com/hotels/{slug}",
|
| 13 |
+
"description":"Use slug to get the specific Hotel",
|
| 14 |
+
"method":"GET",
|
| 15 |
+
"required_parameters":[
|
| 16 |
+
{
|
| 17 |
+
"name":"slug",
|
| 18 |
+
"type":"string",
|
| 19 |
+
"description":"",
|
| 20 |
+
"default":"zion-kolob-canyon-farm-stay-cows-goats-alpaca"
|
| 21 |
+
}
|
| 22 |
+
],
|
| 23 |
+
"optional_parameters":[],
|
| 24 |
+
"code":"import requests\n\nurl = \"https://hotel-collection.p.rapidapi.com/hotels/{slug}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotel-collection.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 25 |
+
"statuscode":111,
|
| 26 |
+
"body":"",
|
| 27 |
+
"headers":"",
|
| 28 |
+
"schema":""
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"name":"Get all the Hotels",
|
| 32 |
+
"url":"https://hotel-collection.p.rapidapi.com/hotels",
|
| 33 |
+
"description":"This endpoint return the collection of Hotels available",
|
| 34 |
+
"method":"GET",
|
| 35 |
+
"required_parameters":[],
|
| 36 |
+
"optional_parameters":[],
|
| 37 |
+
"code":"import requests\n\nurl = \"https://hotel-collection.p.rapidapi.com/hotels\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotel-collection.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 38 |
+
"statuscode":111,
|
| 39 |
+
"body":"",
|
| 40 |
+
"headers":"",
|
| 41 |
+
"schema":""
|
| 42 |
+
}
|
| 43 |
+
]
|
| 44 |
+
}
|
toolbench/toolenv/tools/Travel/hotels.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
toolbench/toolenv/tools/Travel/hotels/api.py
ADDED
|
@@ -0,0 +1,455 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def reviews_list_deprecated(is_id: int, loc: str='en_US', page: int=1, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Get all reviews of specific property"
|
| 12 |
+
id: The value of id field that received from .../properties/list endpoint
|
| 13 |
+
loc: The language code
|
| 14 |
+
page: For paging purpose
|
| 15 |
+
|
| 16 |
+
"""
|
| 17 |
+
url = f"https://hotels4.p.rapidapi.com/reviews/list"
|
| 18 |
+
querystring = {'id': is_id, }
|
| 19 |
+
if loc:
|
| 20 |
+
querystring['loc'] = loc
|
| 21 |
+
if page:
|
| 22 |
+
querystring['page'] = page
|
| 23 |
+
|
| 24 |
+
headers = {
|
| 25 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 26 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 31 |
+
try:
|
| 32 |
+
observation = response.json()
|
| 33 |
+
except:
|
| 34 |
+
observation = response.text
|
| 35 |
+
return observation
|
| 36 |
+
|
| 37 |
+
def reviews_v2_list_deprecated(hotelid: str, revieworder: str='date_newest_first', paginationurl: str=None, triptypefilter: str='all', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 38 |
+
"""
|
| 39 |
+
"Get all reviews of specific property"
|
| 40 |
+
hotelid: The value of id field that received from …/properties/list endpoint
|
| 41 |
+
revieworder: One of the following : rating_highest_first|rating_lowest_first|date_newest_first
|
| 42 |
+
paginationurl: The value of nextURL field returned right in this endpoint, used to load next page.
|
| 43 |
+
triptypefilter: One of the following : all|romance|family|with-friends|other
|
| 44 |
+
|
| 45 |
+
"""
|
| 46 |
+
url = f"https://hotels4.p.rapidapi.com/reviews/v2/list"
|
| 47 |
+
querystring = {'hotelId': hotelid, }
|
| 48 |
+
if revieworder:
|
| 49 |
+
querystring['reviewOrder'] = revieworder
|
| 50 |
+
if paginationurl:
|
| 51 |
+
querystring['paginationURL'] = paginationurl
|
| 52 |
+
if triptypefilter:
|
| 53 |
+
querystring['tripTypeFilter'] = triptypefilter
|
| 54 |
+
|
| 55 |
+
headers = {
|
| 56 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 57 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 62 |
+
try:
|
| 63 |
+
observation = response.json()
|
| 64 |
+
except:
|
| 65 |
+
observation = response.text
|
| 66 |
+
return observation
|
| 67 |
+
|
| 68 |
+
def properties_get_details_deprecated(is_id: int, children6: str=None, children1: str=None, adults3: int=None, adults4: int=None, adults6: int=None, children3: str=None, adults2: int=None, adults7: int=None, currency: str='USD', locale: str='en_US', children7: str=None, children4: str=None, children8: str=None, children5: str=None, children2: str=None, adults8: int=None, adults5: int=None, adults1: int=1, checkout: str='2020-01-15', checkin: str='2020-01-08', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 69 |
+
"""
|
| 70 |
+
"Get all available information of a property"
|
| 71 |
+
id: The value of id field that returned in properties/list endpoint
|
| 72 |
+
children6: The age of every children separated by comma in the sixth room
|
| 73 |
+
children1: The age of every children separated by comma in the first room. Ex : 5,11
|
| 74 |
+
adults3: The number of adults in the third room
|
| 75 |
+
adults4: The number of adults in the fourth room
|
| 76 |
+
adults6: The number of adults in the sixth room
|
| 77 |
+
children3: The age of every children separated by comma in the third room
|
| 78 |
+
adults2: The number of adults in the second room
|
| 79 |
+
adults7: The number of adults in the seventh room
|
| 80 |
+
currency: The currency code
|
| 81 |
+
locale: The language code
|
| 82 |
+
children7: The age of every children separated by comma in the seventh room
|
| 83 |
+
children4: The age of every children separated by comma in the fourth room
|
| 84 |
+
children8: The age of every children separated by comma in the eighth room
|
| 85 |
+
children5: The age of every children separated by comma in the fifth room
|
| 86 |
+
children2: The age of every children separated by comma in the second room
|
| 87 |
+
adults8: The number of adults in the eighth room
|
| 88 |
+
adults5: The number of adults in the fifth room
|
| 89 |
+
adults1: The number of adults in the first room
|
| 90 |
+
checkout: The check-out date at hotel
|
| 91 |
+
checkin: The check-in date at hotel
|
| 92 |
+
|
| 93 |
+
"""
|
| 94 |
+
url = f"https://hotels4.p.rapidapi.com/properties/get-details"
|
| 95 |
+
querystring = {'id': is_id, }
|
| 96 |
+
if children6:
|
| 97 |
+
querystring['children6'] = children6
|
| 98 |
+
if children1:
|
| 99 |
+
querystring['children1'] = children1
|
| 100 |
+
if adults3:
|
| 101 |
+
querystring['adults3'] = adults3
|
| 102 |
+
if adults4:
|
| 103 |
+
querystring['adults4'] = adults4
|
| 104 |
+
if adults6:
|
| 105 |
+
querystring['adults6'] = adults6
|
| 106 |
+
if children3:
|
| 107 |
+
querystring['children3'] = children3
|
| 108 |
+
if adults2:
|
| 109 |
+
querystring['adults2'] = adults2
|
| 110 |
+
if adults7:
|
| 111 |
+
querystring['adults7'] = adults7
|
| 112 |
+
if currency:
|
| 113 |
+
querystring['currency'] = currency
|
| 114 |
+
if locale:
|
| 115 |
+
querystring['locale'] = locale
|
| 116 |
+
if children7:
|
| 117 |
+
querystring['children7'] = children7
|
| 118 |
+
if children4:
|
| 119 |
+
querystring['children4'] = children4
|
| 120 |
+
if children8:
|
| 121 |
+
querystring['children8'] = children8
|
| 122 |
+
if children5:
|
| 123 |
+
querystring['children5'] = children5
|
| 124 |
+
if children2:
|
| 125 |
+
querystring['children2'] = children2
|
| 126 |
+
if adults8:
|
| 127 |
+
querystring['adults8'] = adults8
|
| 128 |
+
if adults5:
|
| 129 |
+
querystring['adults5'] = adults5
|
| 130 |
+
if adults1:
|
| 131 |
+
querystring['adults1'] = adults1
|
| 132 |
+
if checkout:
|
| 133 |
+
querystring['checkOut'] = checkout
|
| 134 |
+
if checkin:
|
| 135 |
+
querystring['checkIn'] = checkin
|
| 136 |
+
|
| 137 |
+
headers = {
|
| 138 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 139 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 144 |
+
try:
|
| 145 |
+
observation = response.json()
|
| 146 |
+
except:
|
| 147 |
+
observation = response.text
|
| 148 |
+
return observation
|
| 149 |
+
|
| 150 |
+
def properties_list_deprecated(checkout: str, destinationid: int, pagenumber: int, checkin: str, adults1: int, pagesize: int, accommodationids: str=None, guestratingmin: int=None, children4: str=None, children8: str=None, locale: str='en_US', pricemin: int=None, pricemax: int=None, adults8: int=None, adults6: int=None, adults4: int=None, starratings: str=None, sortorder: str='PRICE', children2: str=None, adults2: int=None, adults3: int=None, adults5: int=None, currency: str='USD', amenityids: str=None, children6: str=None, children5: str=None, children1: str=None, children3: str=None, children7: str=None, landmarkids: str=None, themeids: str=None, adults7: int=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 151 |
+
"""
|
| 152 |
+
"List properties with options and filters"
|
| 153 |
+
checkout: The check-out date at hotel, formated as yyyy-MM-dd
|
| 154 |
+
destinationid: The value of destinationId returned in locations/search endpoint
|
| 155 |
+
pagenumber: The page number in which data is display
|
| 156 |
+
checkin: The check-in date at hotel, formated as yyyy-MM-dd
|
| 157 |
+
adults1: The number of adults in first room
|
| 158 |
+
pagesize: Total items returned in every requests (max 25)
|
| 159 |
+
accommodationids: Check for suitable value (separated by comma to specify multiple values) in accommodationType field returned right in this endpoint
|
| 160 |
+
guestratingmin: Check for suitable min rating in filters/guestRating/range/min field returned right in this endpoint. Please use integer value.
|
| 161 |
+
children4: The age of every children separated by comma in the fourth room
|
| 162 |
+
children8: The age of every children separated by comma in the eighth room
|
| 163 |
+
locale: The language code, get all supported language code from .../get-meta-data endpoint
|
| 164 |
+
pricemin: Check for suitable min price in filters/price/range/min field returned right in this endpoint
|
| 165 |
+
pricemax: Check for suitable max price in filters/price/range/max field returned right in this endpoint
|
| 166 |
+
adults8: The number of adults in the eighth room
|
| 167 |
+
adults6: The number of adults in the sixth room
|
| 168 |
+
adults4: The number of adults in the fourth room
|
| 169 |
+
starratings: Check for suitable value (separated by comma to specify multiple values) in starRating returned right in this endpoint. Ex : 2,3
|
| 170 |
+
sortorder: One of the following is allowed BEST_SELLER|STAR_RATING_HIGHEST_FIRST|STAR_RATING_LOWEST_FIRST|DISTANCE_FROM_LANDMARK|GUEST_RATING|PRICE_HIGHEST_FIRST|PRICE
|
| 171 |
+
children2: The age of every children separated by comma in the second room
|
| 172 |
+
adults2: The number of adults in the second room
|
| 173 |
+
adults3: The number of adults in the third room
|
| 174 |
+
adults5: The number of adults in the fifth room
|
| 175 |
+
currency: The currency code
|
| 176 |
+
amenityids: Check for suitable value (separated by comma to specify multiple values) in facilities field returned right in this endpoint
|
| 177 |
+
children6: The age of every children separated by comma in the sixth room
|
| 178 |
+
children5: The age of every children separated by comma in the fifth room
|
| 179 |
+
children1: The age of every children separated by comma in the first room. Ex : 5,11
|
| 180 |
+
children3: The age of every children separated by comma in the third room
|
| 181 |
+
children7: The age of every children separated by comma in the seventh room
|
| 182 |
+
landmarkids: Check for suitable value (separated by comma to specify multiple values) in landmarks field returned right in this endpoint
|
| 183 |
+
themeids: Check for suitable value (separated by comma to specify multiple values) in themesAndTypes field returned right in this endpoint
|
| 184 |
+
adults7: The number of adults in the seventh room
|
| 185 |
+
|
| 186 |
+
"""
|
| 187 |
+
url = f"https://hotels4.p.rapidapi.com/properties/list"
|
| 188 |
+
querystring = {'checkOut': checkout, 'destinationId': destinationid, 'pageNumber': pagenumber, 'checkIn': checkin, 'adults1': adults1, 'pageSize': pagesize, }
|
| 189 |
+
if accommodationids:
|
| 190 |
+
querystring['accommodationIds'] = accommodationids
|
| 191 |
+
if guestratingmin:
|
| 192 |
+
querystring['guestRatingMin'] = guestratingmin
|
| 193 |
+
if children4:
|
| 194 |
+
querystring['children4'] = children4
|
| 195 |
+
if children8:
|
| 196 |
+
querystring['children8'] = children8
|
| 197 |
+
if locale:
|
| 198 |
+
querystring['locale'] = locale
|
| 199 |
+
if pricemin:
|
| 200 |
+
querystring['priceMin'] = pricemin
|
| 201 |
+
if pricemax:
|
| 202 |
+
querystring['priceMax'] = pricemax
|
| 203 |
+
if adults8:
|
| 204 |
+
querystring['adults8'] = adults8
|
| 205 |
+
if adults6:
|
| 206 |
+
querystring['adults6'] = adults6
|
| 207 |
+
if adults4:
|
| 208 |
+
querystring['adults4'] = adults4
|
| 209 |
+
if starratings:
|
| 210 |
+
querystring['starRatings'] = starratings
|
| 211 |
+
if sortorder:
|
| 212 |
+
querystring['sortOrder'] = sortorder
|
| 213 |
+
if children2:
|
| 214 |
+
querystring['children2'] = children2
|
| 215 |
+
if adults2:
|
| 216 |
+
querystring['adults2'] = adults2
|
| 217 |
+
if adults3:
|
| 218 |
+
querystring['adults3'] = adults3
|
| 219 |
+
if adults5:
|
| 220 |
+
querystring['adults5'] = adults5
|
| 221 |
+
if currency:
|
| 222 |
+
querystring['currency'] = currency
|
| 223 |
+
if amenityids:
|
| 224 |
+
querystring['amenityIds'] = amenityids
|
| 225 |
+
if children6:
|
| 226 |
+
querystring['children6'] = children6
|
| 227 |
+
if children5:
|
| 228 |
+
querystring['children5'] = children5
|
| 229 |
+
if children1:
|
| 230 |
+
querystring['children1'] = children1
|
| 231 |
+
if children3:
|
| 232 |
+
querystring['children3'] = children3
|
| 233 |
+
if children7:
|
| 234 |
+
querystring['children7'] = children7
|
| 235 |
+
if landmarkids:
|
| 236 |
+
querystring['landmarkIds'] = landmarkids
|
| 237 |
+
if themeids:
|
| 238 |
+
querystring['themeIds'] = themeids
|
| 239 |
+
if adults7:
|
| 240 |
+
querystring['adults7'] = adults7
|
| 241 |
+
|
| 242 |
+
headers = {
|
| 243 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 244 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 249 |
+
try:
|
| 250 |
+
observation = response.json()
|
| 251 |
+
except:
|
| 252 |
+
observation = response.text
|
| 253 |
+
return observation
|
| 254 |
+
|
| 255 |
+
def get_meta_data_deprecated(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 256 |
+
"""
|
| 257 |
+
"Get locale meta data"
|
| 258 |
+
|
| 259 |
+
"""
|
| 260 |
+
url = f"https://hotels4.p.rapidapi.com/get-meta-data"
|
| 261 |
+
querystring = {}
|
| 262 |
+
|
| 263 |
+
headers = {
|
| 264 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 265 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 270 |
+
try:
|
| 271 |
+
observation = response.json()
|
| 272 |
+
except:
|
| 273 |
+
observation = response.text
|
| 274 |
+
return observation
|
| 275 |
+
|
| 276 |
+
def locations_v2_search_deprecated(query: str, locale: str='en_US', currency: str='USD', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 277 |
+
"""
|
| 278 |
+
"Search for related locations and suggestions"
|
| 279 |
+
query: Name of countries, cities, districts, places, etc...
|
| 280 |
+
locale: The language code
|
| 281 |
+
currency: The currency code
|
| 282 |
+
|
| 283 |
+
"""
|
| 284 |
+
url = f"https://hotels4.p.rapidapi.com/locations/v2/search"
|
| 285 |
+
querystring = {'query': query, }
|
| 286 |
+
if locale:
|
| 287 |
+
querystring['locale'] = locale
|
| 288 |
+
if currency:
|
| 289 |
+
querystring['currency'] = currency
|
| 290 |
+
|
| 291 |
+
headers = {
|
| 292 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 293 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 294 |
+
}
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 298 |
+
try:
|
| 299 |
+
observation = response.json()
|
| 300 |
+
except:
|
| 301 |
+
observation = response.text
|
| 302 |
+
return observation
|
| 303 |
+
|
| 304 |
+
def properties_get_hotel_photos_deprecated(is_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 305 |
+
"""
|
| 306 |
+
"Get all available photos of property"
|
| 307 |
+
id: The value of id field that received from .../properties/list endpoint
|
| 308 |
+
|
| 309 |
+
"""
|
| 310 |
+
url = f"https://hotels4.p.rapidapi.com/properties/get-hotel-photos"
|
| 311 |
+
querystring = {'id': is_id, }
|
| 312 |
+
|
| 313 |
+
headers = {
|
| 314 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 315 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 320 |
+
try:
|
| 321 |
+
observation = response.json()
|
| 322 |
+
except:
|
| 323 |
+
observation = response.text
|
| 324 |
+
return observation
|
| 325 |
+
|
| 326 |
+
def properties_get_hotel_photos_deprecated(is_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 327 |
+
"""
|
| 328 |
+
"Get all available photos of property"
|
| 329 |
+
id: The value of id field that received from .../properties/list endpoint
|
| 330 |
+
|
| 331 |
+
"""
|
| 332 |
+
url = f"https://hotels4.p.rapidapi.com/properties/get-hotel-photos"
|
| 333 |
+
querystring = {'id': is_id, }
|
| 334 |
+
|
| 335 |
+
headers = {
|
| 336 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 337 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 342 |
+
try:
|
| 343 |
+
observation = response.json()
|
| 344 |
+
except:
|
| 345 |
+
observation = response.text
|
| 346 |
+
return observation
|
| 347 |
+
|
| 348 |
+
def properties_v2_resolve_url(is_id: str, siteid: int=300000001, locale: str='en_US', langid: int=1033, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 349 |
+
"""
|
| 350 |
+
"Hotels system is being merged with Expedia. This endpoint helps to convert the old hotel ID (embedded in the shared link, Ex : "ho133528" in hotels.com/ho133528/) to the new one (423818)."
|
| 351 |
+
id: The id (started with ho...) extracted from the shared link. Ex : 'ho546370' from https://www.hoteles.com/ho546370
|
| 352 |
+
siteid: The value of siteId field returned in …/v2/get-meta-data endpoint
|
| 353 |
+
locale: The language code
|
| 354 |
+
langid: The value of languageIdentifier field returned in …/v2/get-meta-data endpoint
|
| 355 |
+
|
| 356 |
+
"""
|
| 357 |
+
url = f"https://hotels4.p.rapidapi.com/properties/v2/resolve-url"
|
| 358 |
+
querystring = {'id': is_id, }
|
| 359 |
+
if siteid:
|
| 360 |
+
querystring['siteid'] = siteid
|
| 361 |
+
if locale:
|
| 362 |
+
querystring['locale'] = locale
|
| 363 |
+
if langid:
|
| 364 |
+
querystring['langid'] = langid
|
| 365 |
+
|
| 366 |
+
headers = {
|
| 367 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 368 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 373 |
+
try:
|
| 374 |
+
observation = response.json()
|
| 375 |
+
except:
|
| 376 |
+
observation = response.text
|
| 377 |
+
return observation
|
| 378 |
+
|
| 379 |
+
def v2_get_meta_data(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 380 |
+
"""
|
| 381 |
+
"Get locale meta data"
|
| 382 |
+
|
| 383 |
+
"""
|
| 384 |
+
url = f"https://hotels4.p.rapidapi.com/v2/get-meta-data"
|
| 385 |
+
querystring = {}
|
| 386 |
+
|
| 387 |
+
headers = {
|
| 388 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 389 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
|
| 393 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 394 |
+
try:
|
| 395 |
+
observation = response.json()
|
| 396 |
+
except:
|
| 397 |
+
observation = response.text
|
| 398 |
+
return observation
|
| 399 |
+
|
| 400 |
+
def locations_search_deprecated(query: str, locale: str='en_US', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 401 |
+
"""
|
| 402 |
+
"Search for related locations and suggestions"
|
| 403 |
+
query: Name of countries, cities, districts, places, etc...
|
| 404 |
+
locale: The language code
|
| 405 |
+
|
| 406 |
+
"""
|
| 407 |
+
url = f"https://hotels4.p.rapidapi.com/locations/search"
|
| 408 |
+
querystring = {'query': query, }
|
| 409 |
+
if locale:
|
| 410 |
+
querystring['locale'] = locale
|
| 411 |
+
|
| 412 |
+
headers = {
|
| 413 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 414 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
|
| 418 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 419 |
+
try:
|
| 420 |
+
observation = response.json()
|
| 421 |
+
except:
|
| 422 |
+
observation = response.text
|
| 423 |
+
return observation
|
| 424 |
+
|
| 425 |
+
def locations_v3_search(q: str, langid: int=1033, siteid: int=300000001, locale: str='en_US', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 426 |
+
"""
|
| 427 |
+
"Search for related locations and suggestions"
|
| 428 |
+
q: Name of countries, cities, districts, places, etc...
|
| 429 |
+
langid: The value of languageIdentifier field returned in .../v2/get-meta-data endpoint
|
| 430 |
+
siteid: The value of siteId field returned in .../v2/get-meta-data endpoint
|
| 431 |
+
locale: The language code
|
| 432 |
+
|
| 433 |
+
"""
|
| 434 |
+
url = f"https://hotels4.p.rapidapi.com/locations/v3/search"
|
| 435 |
+
querystring = {'q': q, }
|
| 436 |
+
if langid:
|
| 437 |
+
querystring['langid'] = langid
|
| 438 |
+
if siteid:
|
| 439 |
+
querystring['siteid'] = siteid
|
| 440 |
+
if locale:
|
| 441 |
+
querystring['locale'] = locale
|
| 442 |
+
|
| 443 |
+
headers = {
|
| 444 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 445 |
+
"X-RapidAPI-Host": "hotels4.p.rapidapi.com"
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
|
| 449 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 450 |
+
try:
|
| 451 |
+
observation = response.json()
|
| 452 |
+
except:
|
| 453 |
+
observation = response.text
|
| 454 |
+
return observation
|
| 455 |
+
|
toolbench/toolenv/tools/Travel/hotels_com_free.json
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"Hotels.com FREE",
|
| 3 |
+
"tool_description":"Real time Hotels.com prices, reviews, meta data",
|
| 4 |
+
"title":"Hotels.com FREE",
|
| 5 |
+
"pricing":"FREE",
|
| 6 |
+
"score":{
|
| 7 |
+
"avgServiceLevel":0,
|
| 8 |
+
"avgLatency":1012334,
|
| 9 |
+
"avgSuccessRate":0,
|
| 10 |
+
"popularityScore":0.1,
|
| 11 |
+
"__typename":"Score"
|
| 12 |
+
},
|
| 13 |
+
"home_url":"https://rapidapi.com/yahoo.finance.low.latency/api/hotels-com-free/",
|
| 14 |
+
"host":"hotels-com-free.p.rapidapi.com",
|
| 15 |
+
"api_list":[
|
| 16 |
+
{
|
| 17 |
+
"name":"suggest",
|
| 18 |
+
"url":"https://hotels-com-free.p.rapidapi.com/suggest/v1.7/json",
|
| 19 |
+
"description":"Get suggestions",
|
| 20 |
+
"method":"GET",
|
| 21 |
+
"required_parameters":[
|
| 22 |
+
{
|
| 23 |
+
"name":"locale",
|
| 24 |
+
"type":"STRING",
|
| 25 |
+
"description":"`ar_AE` `cs_CZ` `da_DK` `de_AT` `de_BE` `de_CH` `de_DE` `el_GR` `en_AS` `en_AU` `en_CA` `en_CN` `en_GB` `en_HK` `en_ID` `en_IE` `en_IL` `en_IN` `en_JP` `en_KR` `en_LA` `en_MX` `en_MY` `en_NZ` `en_PH` `en_SG` `en_TH` `en_TW` `en_US` `en_VN` `en_ZA` `es_AR` `es_BO` `es_BZ` `es_CL` `es_CO` `es_CR` `es_EC` `es_ES` `es_GT` `es_GY` `es_HN` `es_MX` `es_NI` `es_PA` `es_PE` `es_PY` `es_SV` `es_US` `es_UY` `es_VE` `et_EE` `fi_FI` `fr_BE` `fr_CA` `fr_CH` `fr_FR` `fr_GF` `hr_HR` `hu_HU` `in_ID` `is_IS` `it_CH` `it_IT` `iw_IL` `ja_JP` `ko_KR` `lt_LT` `lv_LV` `ms_MY` `nl_BE` `nl_NL` `nl_SR` `no_NO` `pl_PL` `pt_BR` `pt_PT` `ru_RU` `sk_SK` `sv_SE` `th_TH` `tr_TR` `uk_UA` `vi_VN` `zh_CN` `zh_HK` `zh_TW`",
|
| 26 |
+
"default":"en_US"
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"name":"query",
|
| 30 |
+
"type":"STRING",
|
| 31 |
+
"description":"",
|
| 32 |
+
"default":"San Francisco"
|
| 33 |
+
}
|
| 34 |
+
],
|
| 35 |
+
"optional_parameters":[],
|
| 36 |
+
"code":"import requests\n\nurl = \"https://hotels-com-free.p.rapidapi.com/suggest/v1.7/json\"\nquerystring = {\"locale\": locale, \"query\": query}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-free.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 37 |
+
"statuscode":200,
|
| 38 |
+
"body":{
|
| 39 |
+
"autoSuggestInstance":null,
|
| 40 |
+
"misspellingfallback":false,
|
| 41 |
+
"moresuggestions":1946,
|
| 42 |
+
"suggestions":[
|
| 43 |
+
{
|
| 44 |
+
"entities":[
|
| 45 |
+
{
|
| 46 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span>, California, United States of America",
|
| 47 |
+
"destinationId":"1493604",
|
| 48 |
+
"geoId":"1000000000000003132",
|
| 49 |
+
"landmarkCityDestinationId":null,
|
| 50 |
+
"latitude":37.7874,
|
| 51 |
+
"longitude":-122.4082,
|
| 52 |
+
"name":"San Francisco",
|
| 53 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 54 |
+
"type":"CITY"
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"caption":"South <span class='highlighted'>San</span> <span class='highlighted'>Francisco</span>, California, United States of America",
|
| 58 |
+
"destinationId":"1490656",
|
| 59 |
+
"geoId":"1000000000000006773",
|
| 60 |
+
"landmarkCityDestinationId":null,
|
| 61 |
+
"latitude":37.655145,
|
| 62 |
+
"longitude":-122.420114,
|
| 63 |
+
"name":"South San Francisco",
|
| 64 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 65 |
+
"type":"CITY"
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span> County, California, United States of America",
|
| 69 |
+
"destinationId":"12677021",
|
| 70 |
+
"geoId":"553248635996709347",
|
| 71 |
+
"landmarkCityDestinationId":null,
|
| 72 |
+
"latitude":37.759736,
|
| 73 |
+
"longitude":-122.693858,
|
| 74 |
+
"name":"San Francisco County",
|
| 75 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 76 |
+
"type":"REGION"
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"caption":"Downtown <span class='highlighted'>San</span> <span class='highlighted'>Francisco</span>, San Francisco, California, United States of America",
|
| 80 |
+
"destinationId":"1704726",
|
| 81 |
+
"geoId":"1000000000006151902",
|
| 82 |
+
"landmarkCityDestinationId":null,
|
| 83 |
+
"latitude":37.787394,
|
| 84 |
+
"longitude":-122.408265,
|
| 85 |
+
"name":"Downtown San Francisco",
|
| 86 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 87 |
+
"type":"NEIGHBORHOOD"
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span>, Mexico",
|
| 91 |
+
"destinationId":"1713071",
|
| 92 |
+
"geoId":"1000000000006053408",
|
| 93 |
+
"landmarkCityDestinationId":null,
|
| 94 |
+
"latitude":20.908244,
|
| 95 |
+
"longitude":-105.385027,
|
| 96 |
+
"name":"San Francisco",
|
| 97 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 98 |
+
"type":"CITY"
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span> del Rincon, Mexico",
|
| 102 |
+
"destinationId":"859097",
|
| 103 |
+
"geoId":"1000000000006348321",
|
| 104 |
+
"landmarkCityDestinationId":null,
|
| 105 |
+
"latitude":20.919124,
|
| 106 |
+
"longitude":-101.78852,
|
| 107 |
+
"name":"San Francisco del Rincon",
|
| 108 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 109 |
+
"type":"CITY"
|
| 110 |
+
}
|
| 111 |
+
],
|
| 112 |
+
"group":"CITY_GROUP"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"entities":[
|
| 116 |
+
{
|
| 117 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span> Zoo, San Francisco, California, United States of America",
|
| 118 |
+
"destinationId":"1652933",
|
| 119 |
+
"geoId":"1000000000000502587",
|
| 120 |
+
"landmarkCityDestinationId":"1493604",
|
| 121 |
+
"latitude":37.734052,
|
| 122 |
+
"longitude":-122.505863,
|
| 123 |
+
"name":"San Francisco Zoo",
|
| 124 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 125 |
+
"type":"LANDMARK"
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span> City Hall, San Francisco, California, United States of America",
|
| 129 |
+
"destinationId":"1652930",
|
| 130 |
+
"geoId":"1000000000000502549",
|
| 131 |
+
"landmarkCityDestinationId":"1493604",
|
| 132 |
+
"latitude":37.779225,
|
| 133 |
+
"longitude":-122.419887,
|
| 134 |
+
"name":"San Francisco City Hall",
|
| 135 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 136 |
+
"type":"LANDMARK"
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"caption":"University of <span class='highlighted'>San</span> <span class='highlighted'>Francisco</span>, San Francisco, California, United States of America",
|
| 140 |
+
"destinationId":"1652937",
|
| 141 |
+
"geoId":"1000000000000502586",
|
| 142 |
+
"landmarkCityDestinationId":"1493604",
|
| 143 |
+
"latitude":37.777782,
|
| 144 |
+
"longitude":-122.451208,
|
| 145 |
+
"name":"University of San Francisco",
|
| 146 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 147 |
+
"type":"LANDMARK"
|
| 148 |
+
}
|
| 149 |
+
],
|
| 150 |
+
"group":"LANDMARK_GROUP"
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"entities":[
|
| 154 |
+
{
|
| 155 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span> International Airport (SFO), United States of America",
|
| 156 |
+
"destinationId":"1425211",
|
| 157 |
+
"geoId":"1000000000005195347",
|
| 158 |
+
"landmarkCityDestinationId":null,
|
| 159 |
+
"latitude":37.61594,
|
| 160 |
+
"longitude":-122.387996,
|
| 161 |
+
"name":"San Francisco International Airport (SFO)",
|
| 162 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 163 |
+
"type":"AIRPORT"
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span> Intl. Airport Station, San Francisco, California, United States of America",
|
| 167 |
+
"destinationId":"1726802",
|
| 168 |
+
"geoId":"1000000000006176497",
|
| 169 |
+
"landmarkCityDestinationId":null,
|
| 170 |
+
"latitude":37.615971,
|
| 171 |
+
"longitude":-122.39238,
|
| 172 |
+
"name":"San Francisco Intl. Airport Station",
|
| 173 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 174 |
+
"type":"METRO_STATION"
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span> Station, San Francisco, California, United States of America",
|
| 178 |
+
"destinationId":"1725529",
|
| 179 |
+
"geoId":"1000000000006176639",
|
| 180 |
+
"landmarkCityDestinationId":null,
|
| 181 |
+
"latitude":37.776819,
|
| 182 |
+
"longitude":-122.394591,
|
| 183 |
+
"name":"San Francisco Station",
|
| 184 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 185 |
+
"type":"TRAIN_STATION"
|
| 186 |
+
}
|
| 187 |
+
],
|
| 188 |
+
"group":"TRANSPORT_GROUP"
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"entities":[
|
| 192 |
+
{
|
| 193 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span> Airport Marriott Waterfront, Burlingame, California, United States of America",
|
| 194 |
+
"destinationId":"105573",
|
| 195 |
+
"geoId":"1100000000000105573",
|
| 196 |
+
"landmarkCityDestinationId":null,
|
| 197 |
+
"latitude":37.60169,
|
| 198 |
+
"longitude":-122.370208,
|
| 199 |
+
"name":"San Francisco Airport Marriott Waterfront",
|
| 200 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 201 |
+
"type":"HOTEL"
|
| 202 |
+
},
|
| 203 |
+
{
|
| 204 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span> Marriott Marquis, San Francisco, California, United States of America",
|
| 205 |
+
"destinationId":"120243",
|
| 206 |
+
"geoId":"1100000000000120243",
|
| 207 |
+
"landmarkCityDestinationId":null,
|
| 208 |
+
"latitude":37.78506,
|
| 209 |
+
"longitude":-122.40479,
|
| 210 |
+
"name":"San Francisco Marriott Marquis",
|
| 211 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 212 |
+
"type":"HOTEL"
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"caption":"<span class='highlighted'>San</span> <span class='highlighted'>Francisco</span> Proper Hotel, San Francisco, California, United States of America",
|
| 216 |
+
"destinationId":"600144064",
|
| 217 |
+
"geoId":"1100000000600144064",
|
| 218 |
+
"landmarkCityDestinationId":null,
|
| 219 |
+
"latitude":37.78087,
|
| 220 |
+
"longitude":-122.41242,
|
| 221 |
+
"name":"San Francisco Proper Hotel",
|
| 222 |
+
"redirectPage":"DEFAULT_PAGE",
|
| 223 |
+
"type":"HOTEL"
|
| 224 |
+
}
|
| 225 |
+
],
|
| 226 |
+
"group":"HOTEL_GROUP"
|
| 227 |
+
}
|
| 228 |
+
],
|
| 229 |
+
"term":"San Francisco",
|
| 230 |
+
"trackingID":"419ee5b3-35e4-4f28-9027-55956efb796e"
|
| 231 |
+
},
|
| 232 |
+
"headers":{},
|
| 233 |
+
"schema":{}
|
| 234 |
+
}
|
| 235 |
+
]
|
| 236 |
+
}
|
toolbench/toolenv/tools/Travel/hotels_com_free/api.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def suggest(locale: str, query: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Get suggestions"
|
| 12 |
+
locale: `ar_AE` `cs_CZ` `da_DK` `de_AT` `de_BE` `de_CH` `de_DE` `el_GR` `en_AS` `en_AU` `en_CA` `en_CN` `en_GB` `en_HK` `en_ID` `en_IE` `en_IL` `en_IN` `en_JP` `en_KR` `en_LA` `en_MX` `en_MY` `en_NZ` `en_PH` `en_SG` `en_TH` `en_TW` `en_US` `en_VN` `en_ZA` `es_AR` `es_BO` `es_BZ` `es_CL` `es_CO` `es_CR` `es_EC` `es_ES` `es_GT` `es_GY` `es_HN` `es_MX` `es_NI` `es_PA` `es_PE` `es_PY` `es_SV` `es_US` `es_UY` `es_VE` `et_EE` `fi_FI` `fr_BE` `fr_CA` `fr_CH` `fr_FR` `fr_GF` `hr_HR` `hu_HU` `in_ID` `is_IS` `it_CH` `it_IT` `iw_IL` `ja_JP` `ko_KR` `lt_LT` `lv_LV` `ms_MY` `nl_BE` `nl_NL` `nl_SR` `no_NO` `pl_PL` `pt_BR` `pt_PT` `ru_RU` `sk_SK` `sv_SE` `th_TH` `tr_TR` `uk_UA` `vi_VN` `zh_CN` `zh_HK` `zh_TW`
|
| 13 |
+
|
| 14 |
+
"""
|
| 15 |
+
url = f"https://hotels-com-free.p.rapidapi.com/suggest/v1.7/json"
|
| 16 |
+
querystring = {'locale': locale, 'query': query, }
|
| 17 |
+
|
| 18 |
+
headers = {
|
| 19 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 20 |
+
"X-RapidAPI-Host": "hotels-com-free.p.rapidapi.com"
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 25 |
+
try:
|
| 26 |
+
observation = response.json()
|
| 27 |
+
except:
|
| 28 |
+
observation = response.text
|
| 29 |
+
return observation
|
| 30 |
+
|
toolbench/toolenv/tools/Travel/hotels_com_provider.json
ADDED
|
@@ -0,0 +1,472 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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c9c06",
|
| 3 |
+
"tool_description": "Search hotels, see prices, photos of the hotels, reviews. **Site:** www.hotels.com **Support**: [tipsters@rapi.one](mailto:tipsters@rapi.one) / t.me/api_tipsters **Other travel api:** https://rapi.one",
|
| 4 |
+
"home_url": "https://rapidapi.com/tipsters/api/hotels-com-provider/",
|
| 5 |
+
"name": "Hotels com Provider",
|
| 6 |
+
"title": "Hotels com Provider",
|
| 7 |
+
"pricing": "FREEMIUM",
|
| 8 |
+
"tool_name": "Hotels com Provider",
|
| 9 |
+
"score": {
|
| 10 |
+
"avgServiceLevel": 100,
|
| 11 |
+
"avgLatency": 1366,
|
| 12 |
+
"avgSuccessRate": 96,
|
| 13 |
+
"popularityScore": 9.9,
|
| 14 |
+
"__typename": "Score"
|
| 15 |
+
},
|
| 16 |
+
"host": "hotels-com-provider.p.rapidapi.com",
|
| 17 |
+
"api_list": [
|
| 18 |
+
{
|
| 19 |
+
"name": "Hotel Details",
|
| 20 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/hotels/details",
|
| 21 |
+
"description": "Get hotel details",
|
| 22 |
+
"method": "GET",
|
| 23 |
+
"required_parameters": [
|
| 24 |
+
{
|
| 25 |
+
"name": "domain",
|
| 26 |
+
"type": "STRING",
|
| 27 |
+
"description": "",
|
| 28 |
+
"default": "AE"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"name": "locale",
|
| 32 |
+
"type": "STRING",
|
| 33 |
+
"description": "",
|
| 34 |
+
"default": "en_GB"
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"name": "hotel_id",
|
| 38 |
+
"type": "NUMBER",
|
| 39 |
+
"description": "Hotel ID",
|
| 40 |
+
"default": "1105156"
|
| 41 |
+
}
|
| 42 |
+
],
|
| 43 |
+
"optional_parameters": [],
|
| 44 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/details\"\nquerystring = {\"domain\": \"AE\", \"locale\": \"en_GB\", \"hotel_id\": \"1105156\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 45 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/details\"\nquerystring = {\"domain\": \"AE\", \"locale\": \"en_GB\", \"hotel_id\": \"1105156\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 46 |
+
"test_endpoint": {
|
| 47 |
+
"message": "You are not subscribed to this API."
|
| 48 |
+
},
|
| 49 |
+
"statuscode": 1,
|
| 50 |
+
"schema": ""
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"name": "Hotel Info",
|
| 54 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/hotels/info",
|
| 55 |
+
"description": "Get hotel info",
|
| 56 |
+
"method": "GET",
|
| 57 |
+
"required_parameters": [
|
| 58 |
+
{
|
| 59 |
+
"name": "hotel_id",
|
| 60 |
+
"type": "NUMBER",
|
| 61 |
+
"description": "Hotel ID",
|
| 62 |
+
"default": "1105156"
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"name": "locale",
|
| 66 |
+
"type": "STRING",
|
| 67 |
+
"description": "",
|
| 68 |
+
"default": "en_GB"
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"name": "domain",
|
| 72 |
+
"type": "STRING",
|
| 73 |
+
"description": "",
|
| 74 |
+
"default": "AE"
|
| 75 |
+
}
|
| 76 |
+
],
|
| 77 |
+
"optional_parameters": [],
|
| 78 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/info\"\nquerystring = {\"hotel_id\": \"1105156\", \"locale\": \"en_GB\", \"domain\": \"AE\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 79 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/info\"\nquerystring = {\"hotel_id\": \"1105156\", \"locale\": \"en_GB\", \"domain\": \"AE\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 80 |
+
"test_endpoint": "",
|
| 81 |
+
"statuscode": 1,
|
| 82 |
+
"schema": ""
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"name": "Regions Search",
|
| 86 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/regions",
|
| 87 |
+
"description": "Search region, locations, city or hotel by name",
|
| 88 |
+
"method": "GET",
|
| 89 |
+
"required_parameters": [
|
| 90 |
+
{
|
| 91 |
+
"name": "locale",
|
| 92 |
+
"type": "STRING",
|
| 93 |
+
"description": "",
|
| 94 |
+
"default": "en_GB"
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"name": "query",
|
| 98 |
+
"type": "STRING",
|
| 99 |
+
"description": "Query. Live search",
|
| 100 |
+
"default": "Prag"
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"name": "domain",
|
| 104 |
+
"type": "STRING",
|
| 105 |
+
"description": "",
|
| 106 |
+
"default": "AE"
|
| 107 |
+
}
|
| 108 |
+
],
|
| 109 |
+
"optional_parameters": [],
|
| 110 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/regions\"\nquerystring = {\"locale\": \"en_GB\", \"query\": \"Prag\", \"domain\": \"AE\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 111 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/regions\"\nquerystring = {\"locale\": \"en_GB\", \"query\": \"Prag\", \"domain\": \"AE\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 112 |
+
"test_endpoint": "",
|
| 113 |
+
"statuscode": 1,
|
| 114 |
+
"schema": ""
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
"name": "Hotel Slug convert",
|
| 118 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/meta/convert/slug-id",
|
| 119 |
+
"description": "Get Hotel ID from Hotel Site slug, (https://hotels.com/ho219115) `ho219115` -> `1105156`",
|
| 120 |
+
"method": "GET",
|
| 121 |
+
"required_parameters": [
|
| 122 |
+
{
|
| 123 |
+
"name": "slug",
|
| 124 |
+
"type": "STRING",
|
| 125 |
+
"description": "Hotels Slug",
|
| 126 |
+
"default": "ho219115"
|
| 127 |
+
}
|
| 128 |
+
],
|
| 129 |
+
"optional_parameters": [],
|
| 130 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/meta/convert/slug-id\"\nquerystring = {\"slug\": \"ho219115\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 131 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/meta/convert/slug-id\"\nquerystring = {\"slug\": \"ho219115\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 132 |
+
"test_endpoint": "",
|
| 133 |
+
"statuscode": 1,
|
| 134 |
+
"schema": ""
|
| 135 |
+
},
|
| 136 |
+
{
|
| 137 |
+
"name": "Domains List",
|
| 138 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/domains",
|
| 139 |
+
"description": "Get a list of Domains, available domains code, currencies and locales",
|
| 140 |
+
"method": "GET",
|
| 141 |
+
"required_parameters": [],
|
| 142 |
+
"optional_parameters": [],
|
| 143 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/domains\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())\n",
|
| 144 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/domains\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())\n",
|
| 145 |
+
"test_endpoint": "",
|
| 146 |
+
"statuscode": 200,
|
| 147 |
+
"schema": {}
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"name": "Hotels Search",
|
| 151 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/hotels/search",
|
| 152 |
+
"description": "Get hotels by the filter. Set the `domain`, it is necessary for localization at the currency setting. (meta / Domains List). `accessibility` parameter, needed to get ONLY available hotels. Indicate the `region_id` -> use `Region Search`, check-in and check-out date, number of adults and children",
|
| 153 |
+
"method": "GET",
|
| 154 |
+
"required_parameters": [
|
| 155 |
+
{
|
| 156 |
+
"name": "domain",
|
| 157 |
+
"type": "STRING",
|
| 158 |
+
"description": "",
|
| 159 |
+
"default": "AE"
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"name": "sort_order",
|
| 163 |
+
"type": "STRING",
|
| 164 |
+
"description": "",
|
| 165 |
+
"default": "REVIEW"
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"name": "locale",
|
| 169 |
+
"type": "STRING",
|
| 170 |
+
"description": "",
|
| 171 |
+
"default": "en_GB"
|
| 172 |
+
},
|
| 173 |
+
{
|
| 174 |
+
"name": "checkout_date",
|
| 175 |
+
"type": "STRING",
|
| 176 |
+
"description": "Checkout Date",
|
| 177 |
+
"default": "2023-09-27"
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"name": "region_id",
|
| 181 |
+
"type": "NUMBER",
|
| 182 |
+
"description": "Region Id -> use `Regions Search`",
|
| 183 |
+
"default": "2872"
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"name": "adults_number",
|
| 187 |
+
"type": "NUMBER",
|
| 188 |
+
"description": "Number of adults",
|
| 189 |
+
"default": 1
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"name": "checkin_date",
|
| 193 |
+
"type": "STRING",
|
| 194 |
+
"description": "Checkin Date",
|
| 195 |
+
"default": "2023-09-26"
|
| 196 |
+
}
|
| 197 |
+
],
|
| 198 |
+
"optional_parameters": [
|
| 199 |
+
{
|
| 200 |
+
"name": "accessibility",
|
| 201 |
+
"type": "STRING",
|
| 202 |
+
"description": "Accessibility. List: `SIGN_LANGUAGE_INTERPRETER`,`STAIR_FREE_PATH`,`SERVICE_ANIMAL`,`IN_ROOM_ACCESSIBLE`,`ROLL_IN_SHOWER`,`ACCESSIBLE_BATHROOM`,`ELEVATOR`,`ACCESSIBLE_PARKING`",
|
| 203 |
+
"default": ""
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"name": "available_filter",
|
| 207 |
+
"type": "STRING",
|
| 208 |
+
"description": "Available filter. List: `SHOW_AVAILABLE_ONLY`",
|
| 209 |
+
"default": "SHOW_AVAILABLE_ONLY"
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"name": "meal_plan",
|
| 213 |
+
"type": "STRING",
|
| 214 |
+
"description": "Meal plan. List: `ALL_INCLUSIVE`,`FULL_BOARD`,`HALF_BOARD`,`FREE_BREAKFAST`",
|
| 215 |
+
"default": "FREE_BREAKFAST"
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"name": "guest_rating_min",
|
| 219 |
+
"type": "NUMBER",
|
| 220 |
+
"description": "Minimal guest rating. Ex. `9` -> +9",
|
| 221 |
+
"default": 8
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"name": "price_min",
|
| 225 |
+
"type": "NUMBER",
|
| 226 |
+
"description": "Price min",
|
| 227 |
+
"default": 10
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"name": "page_number",
|
| 231 |
+
"type": "NUMBER",
|
| 232 |
+
"description": "Number of page",
|
| 233 |
+
"default": 1
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"name": "children_ages",
|
| 237 |
+
"type": "STRING",
|
| 238 |
+
"description": "The age of every child. Indicate their ages separated by commas. `4,0,15` -> three kids. `0` - less than a year",
|
| 239 |
+
"default": "4,0,15"
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"name": "amenities",
|
| 243 |
+
"type": "STRING",
|
| 244 |
+
"description": "Amenities. List: `SPA_ON_SITE`,`WIFI`,`HOT_TUB`,`FREE_AIRPORT_TRANSPORTATION`,`POOL`,`GYM`,`OCEAN_VIEW`,`WATER_PARK`,`BALCONY_OR_TERRACE`,`KITCHEN_KITCHENETTE`,`ELECTRIC_CAR`,`PARKING`,`CRIB`,`RESTAURANT_IN_HOTEL`,`PETS`,`WASHER_DRYER`,`CASINO`,`AIR_CONDITIONING`",
|
| 245 |
+
"default": "WIFI,PARKING"
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"name": "price_max",
|
| 249 |
+
"type": "NUMBER",
|
| 250 |
+
"description": "Price max",
|
| 251 |
+
"default": 500
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"name": "lodging_type",
|
| 255 |
+
"type": "STRING",
|
| 256 |
+
"description": "Lodging type. List: `HOSTAL`,`APARTMENT`,`APART_HOTEL`,`CHALET`,`HOTEL`,`RYOKAN`,`BED_AND_BREAKFAST`,`HOSTEL`",
|
| 257 |
+
"default": "HOTEL,HOSTEL,APART_HOTEL"
|
| 258 |
+
},
|
| 259 |
+
{
|
| 260 |
+
"name": "payment_type",
|
| 261 |
+
"type": "STRING",
|
| 262 |
+
"description": "Payment type. List: `GIFT_CARD`,`PAY_LATER`,`FREE_CANCELLATION`",
|
| 263 |
+
"default": "PAY_LATER,FREE_CANCELLATION"
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"name": "star_rating_ids",
|
| 267 |
+
"type": "STRING",
|
| 268 |
+
"description": "Hotel Star ratings",
|
| 269 |
+
"default": "3,4,5"
|
| 270 |
+
}
|
| 271 |
+
],
|
| 272 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/search\"\nquerystring = {\"domain\": \"AE\", \"accessibility\": \"\", \"sort_order\": \"REVIEW\", \"locale\": \"en_GB\", \"available_filter\": \"SHOW_AVAILABLE_ONLY\", \"meal_plan\": \"FREE_BREAKFAST\", \"guest_rating_min\": 8, \"checkout_date\": \"2023-09-27\", \"price_min\": 10, \"region_id\": \"2872\", \"adults_number\": 1, \"checkin_date\": \"2023-09-26\", \"page_number\": 1, \"children_ages\": \"4,0,15\", \"amenities\": \"WIFI,PARKING\", \"price_max\": 500, \"lodging_type\": \"HOTEL,HOSTEL,APART_HOTEL\", \"payment_type\": \"PAY_LATER,FREE_CANCELLATION\", \"star_rating_ids\": \"3,4,5\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 273 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/search\"\nquerystring = {\"domain\": \"AE\", \"accessibility\": \"\", \"sort_order\": \"REVIEW\", \"locale\": \"en_GB\", \"available_filter\": \"SHOW_AVAILABLE_ONLY\", \"meal_plan\": \"FREE_BREAKFAST\", \"guest_rating_min\": 8, \"checkout_date\": \"2023-09-27\", \"price_min\": 10, \"region_id\": \"2872\", \"adults_number\": 1, \"checkin_date\": \"2023-09-26\", \"page_number\": 1, \"children_ages\": \"4,0,15\", \"amenities\": \"WIFI,PARKING\", \"price_max\": 500, \"lodging_type\": \"HOTEL,HOSTEL,APART_HOTEL\", \"payment_type\": \"PAY_LATER,FREE_CANCELLATION\", \"star_rating_ids\": \"3,4,5\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 274 |
+
"test_endpoint": "",
|
| 275 |
+
"statuscode": 1,
|
| 276 |
+
"schema": ""
|
| 277 |
+
},
|
| 278 |
+
{
|
| 279 |
+
"name": "Hotel Rooms (offers)",
|
| 280 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/hotels/offers",
|
| 281 |
+
"description": "Get available rooms at the hotel",
|
| 282 |
+
"method": "GET",
|
| 283 |
+
"required_parameters": [
|
| 284 |
+
{
|
| 285 |
+
"name": "adults_number",
|
| 286 |
+
"type": "NUMBER",
|
| 287 |
+
"description": "Number of adults",
|
| 288 |
+
"default": 1
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"name": "checkout_date",
|
| 292 |
+
"type": "STRING",
|
| 293 |
+
"description": "Checkout date",
|
| 294 |
+
"default": "2023-09-27"
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"name": "domain",
|
| 298 |
+
"type": "STRING",
|
| 299 |
+
"description": "",
|
| 300 |
+
"default": "AE"
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"name": "locale",
|
| 304 |
+
"type": "STRING",
|
| 305 |
+
"description": "",
|
| 306 |
+
"default": "en_GB"
|
| 307 |
+
},
|
| 308 |
+
{
|
| 309 |
+
"name": "hotel_id",
|
| 310 |
+
"type": "NUMBER",
|
| 311 |
+
"description": "Hotel ID",
|
| 312 |
+
"default": "1105156"
|
| 313 |
+
},
|
| 314 |
+
{
|
| 315 |
+
"name": "checkin_date",
|
| 316 |
+
"type": "STRING",
|
| 317 |
+
"description": "Checkin date",
|
| 318 |
+
"default": "2023-09-26"
|
| 319 |
+
}
|
| 320 |
+
],
|
| 321 |
+
"optional_parameters": [
|
| 322 |
+
{
|
| 323 |
+
"name": "children_ages",
|
| 324 |
+
"type": "STRING",
|
| 325 |
+
"description": "The age of every child. If children will be staying in the room, please indicate their ages separated by commas. 0-less than a year",
|
| 326 |
+
"default": "4,0"
|
| 327 |
+
}
|
| 328 |
+
],
|
| 329 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/offers\"\nquerystring = {\"adults_number\": 1, \"checkout_date\": \"2023-09-27\", \"domain\": \"AE\", \"locale\": \"en_GB\", \"children_ages\": \"4,0\", \"hotel_id\": \"1105156\", \"checkin_date\": \"2023-09-26\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 330 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/offers\"\nquerystring = {\"adults_number\": 1, \"checkout_date\": \"2023-09-27\", \"domain\": \"AE\", \"locale\": \"en_GB\", \"children_ages\": \"4,0\", \"hotel_id\": \"1105156\", \"checkin_date\": \"2023-09-26\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 331 |
+
"test_endpoint": "",
|
| 332 |
+
"statuscode": 1,
|
| 333 |
+
"schema": ""
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"name": "Reviews scores",
|
| 337 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/scores",
|
| 338 |
+
"description": "Get hotel overall score",
|
| 339 |
+
"method": "GET",
|
| 340 |
+
"required_parameters": [
|
| 341 |
+
{
|
| 342 |
+
"name": "domain",
|
| 343 |
+
"type": "STRING",
|
| 344 |
+
"description": "",
|
| 345 |
+
"default": "AE"
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"name": "hotel_id",
|
| 349 |
+
"type": "NUMBER",
|
| 350 |
+
"description": "Hotel ID",
|
| 351 |
+
"default": "1105156"
|
| 352 |
+
},
|
| 353 |
+
{
|
| 354 |
+
"name": "locale",
|
| 355 |
+
"type": "STRING",
|
| 356 |
+
"description": "",
|
| 357 |
+
"default": "en_GB"
|
| 358 |
+
}
|
| 359 |
+
],
|
| 360 |
+
"optional_parameters": [],
|
| 361 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/scores\"\nquerystring = {\"domain\": \"AE\", \"hotel_id\": \"1105156\", \"locale\": \"en_GB\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 362 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/scores\"\nquerystring = {\"domain\": \"AE\", \"hotel_id\": \"1105156\", \"locale\": \"en_GB\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 363 |
+
"test_endpoint": "",
|
| 364 |
+
"statuscode": 1,
|
| 365 |
+
"schema": ""
|
| 366 |
+
},
|
| 367 |
+
{
|
| 368 |
+
"name": "Reviews list",
|
| 369 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/list",
|
| 370 |
+
"description": "Get hotel reviews list",
|
| 371 |
+
"method": "GET",
|
| 372 |
+
"required_parameters": [
|
| 373 |
+
{
|
| 374 |
+
"name": "domain",
|
| 375 |
+
"type": "STRING",
|
| 376 |
+
"description": "",
|
| 377 |
+
"default": "AE"
|
| 378 |
+
},
|
| 379 |
+
{
|
| 380 |
+
"name": "locale",
|
| 381 |
+
"type": "STRING",
|
| 382 |
+
"description": "",
|
| 383 |
+
"default": "en_GB"
|
| 384 |
+
},
|
| 385 |
+
{
|
| 386 |
+
"name": "hotel_id",
|
| 387 |
+
"type": "NUMBER",
|
| 388 |
+
"description": "Hotel ID",
|
| 389 |
+
"default": "1105156"
|
| 390 |
+
}
|
| 391 |
+
],
|
| 392 |
+
"optional_parameters": [
|
| 393 |
+
{
|
| 394 |
+
"name": "page_number",
|
| 395 |
+
"type": "NUMBER",
|
| 396 |
+
"description": "Number of page",
|
| 397 |
+
"default": 1
|
| 398 |
+
}
|
| 399 |
+
],
|
| 400 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/list\"\nquerystring = {\"domain\": \"AE\", \"locale\": \"en_GB\", \"hotel_id\": \"1105156\", \"page_number\": 1}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 401 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/list\"\nquerystring = {\"domain\": \"AE\", \"locale\": \"en_GB\", \"hotel_id\": \"1105156\", \"page_number\": 1}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 402 |
+
"test_endpoint": "",
|
| 403 |
+
"statuscode": 1,
|
| 404 |
+
"schema": ""
|
| 405 |
+
},
|
| 406 |
+
{
|
| 407 |
+
"name": "Reviews summary",
|
| 408 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/summary",
|
| 409 |
+
"description": "Get hotel reviews summary",
|
| 410 |
+
"method": "GET",
|
| 411 |
+
"required_parameters": [
|
| 412 |
+
{
|
| 413 |
+
"name": "locale",
|
| 414 |
+
"type": "STRING",
|
| 415 |
+
"description": "",
|
| 416 |
+
"default": "en_GB"
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"name": "domain",
|
| 420 |
+
"type": "STRING",
|
| 421 |
+
"description": "",
|
| 422 |
+
"default": "AE"
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"name": "hotel_id",
|
| 426 |
+
"type": "NUMBER",
|
| 427 |
+
"description": "Hotel ID",
|
| 428 |
+
"default": "1105156"
|
| 429 |
+
}
|
| 430 |
+
],
|
| 431 |
+
"optional_parameters": [],
|
| 432 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/summary\"\nquerystring = {\"locale\": \"en_GB\", \"domain\": \"AE\", \"hotel_id\": \"1105156\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 433 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/summary\"\nquerystring = {\"locale\": \"en_GB\", \"domain\": \"AE\", \"hotel_id\": \"1105156\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 434 |
+
"test_endpoint": "",
|
| 435 |
+
"statuscode": 1,
|
| 436 |
+
"schema": ""
|
| 437 |
+
},
|
| 438 |
+
{
|
| 439 |
+
"name": "Hotel Summary",
|
| 440 |
+
"url": "https://hotels-com-provider.p.rapidapi.com/v2/hotels/summary",
|
| 441 |
+
"description": "Get hotel summary",
|
| 442 |
+
"method": "GET",
|
| 443 |
+
"required_parameters": [
|
| 444 |
+
{
|
| 445 |
+
"name": "domain",
|
| 446 |
+
"type": "STRING",
|
| 447 |
+
"description": "",
|
| 448 |
+
"default": "AE"
|
| 449 |
+
},
|
| 450 |
+
{
|
| 451 |
+
"name": "locale",
|
| 452 |
+
"type": "STRING",
|
| 453 |
+
"description": "",
|
| 454 |
+
"default": "en_GB"
|
| 455 |
+
},
|
| 456 |
+
{
|
| 457 |
+
"name": "hotel_id",
|
| 458 |
+
"type": "NUMBER",
|
| 459 |
+
"description": "Hotel ID",
|
| 460 |
+
"default": "1105156"
|
| 461 |
+
}
|
| 462 |
+
],
|
| 463 |
+
"optional_parameters": [],
|
| 464 |
+
"code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/summary\"\nquerystring = {\"domain\": \"AE\", \"locale\": \"en_GB\", \"hotel_id\": \"1105156\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 465 |
+
"convert_code": "import requests\n\nurl = \"https://hotels-com-provider.p.rapidapi.com/v2/hotels/summary\"\nquerystring = {\"domain\": \"AE\", \"locale\": \"en_GB\", \"hotel_id\": \"1105156\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"hotels-com-provider.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 466 |
+
"test_endpoint": "",
|
| 467 |
+
"statuscode": 1,
|
| 468 |
+
"schema": ""
|
| 469 |
+
}
|
| 470 |
+
],
|
| 471 |
+
"standardized_name": "hotels_com_provider"
|
| 472 |
+
}
|
toolbench/toolenv/tools/Travel/hotels_com_provider/api.py
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def hotel_details(domain: str, locale: str, hotel_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Get hotel details"
|
| 12 |
+
hotel_id: Hotel ID
|
| 13 |
+
|
| 14 |
+
"""
|
| 15 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/hotels/details"
|
| 16 |
+
querystring = {'domain': domain, 'locale': locale, 'hotel_id': hotel_id, }
|
| 17 |
+
|
| 18 |
+
headers = {
|
| 19 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 20 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 25 |
+
try:
|
| 26 |
+
observation = response.json()
|
| 27 |
+
except:
|
| 28 |
+
observation = response.text
|
| 29 |
+
return observation
|
| 30 |
+
|
| 31 |
+
def hotel_info(hotel_id: int, locale: str, domain: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 32 |
+
"""
|
| 33 |
+
"Get hotel info"
|
| 34 |
+
hotel_id: Hotel ID
|
| 35 |
+
|
| 36 |
+
"""
|
| 37 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/hotels/info"
|
| 38 |
+
querystring = {'hotel_id': hotel_id, 'locale': locale, 'domain': domain, }
|
| 39 |
+
|
| 40 |
+
headers = {
|
| 41 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 42 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 47 |
+
try:
|
| 48 |
+
observation = response.json()
|
| 49 |
+
except:
|
| 50 |
+
observation = response.text
|
| 51 |
+
return observation
|
| 52 |
+
|
| 53 |
+
def regions_search(locale: str, query: str, domain: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 54 |
+
"""
|
| 55 |
+
"Search region, locations, city or hotel by name"
|
| 56 |
+
query: Query. Live search
|
| 57 |
+
|
| 58 |
+
"""
|
| 59 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/regions"
|
| 60 |
+
querystring = {'locale': locale, 'query': query, 'domain': domain, }
|
| 61 |
+
|
| 62 |
+
headers = {
|
| 63 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 64 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 69 |
+
try:
|
| 70 |
+
observation = response.json()
|
| 71 |
+
except:
|
| 72 |
+
observation = response.text
|
| 73 |
+
return observation
|
| 74 |
+
|
| 75 |
+
def hotel_slug_convert(slug: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 76 |
+
"""
|
| 77 |
+
"Get Hotel ID from Hotel Site slug, (https://hotels.com/ho219115) `ho219115` -> `1105156`"
|
| 78 |
+
slug: Hotels Slug
|
| 79 |
+
|
| 80 |
+
"""
|
| 81 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/meta/convert/slug-id"
|
| 82 |
+
querystring = {'slug': slug, }
|
| 83 |
+
|
| 84 |
+
headers = {
|
| 85 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 86 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 91 |
+
try:
|
| 92 |
+
observation = response.json()
|
| 93 |
+
except:
|
| 94 |
+
observation = response.text
|
| 95 |
+
return observation
|
| 96 |
+
|
| 97 |
+
def domains_list(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 98 |
+
"""
|
| 99 |
+
"Get a list of Domains, available domains code, currencies and locales"
|
| 100 |
+
|
| 101 |
+
"""
|
| 102 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/domains"
|
| 103 |
+
querystring = {}
|
| 104 |
+
|
| 105 |
+
headers = {
|
| 106 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 107 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 112 |
+
try:
|
| 113 |
+
observation = response.json()
|
| 114 |
+
except:
|
| 115 |
+
observation = response.text
|
| 116 |
+
return observation
|
| 117 |
+
|
| 118 |
+
def hotels_search(domain: str, sort_order: str, locale: str, checkout_date: str, region_id: int, adults_number: int, checkin_date: str, accessibility: str=None, available_filter: str='SHOW_AVAILABLE_ONLY', meal_plan: str='FREE_BREAKFAST', guest_rating_min: int=8, price_min: int=10, page_number: int=1, children_ages: str='4,0,15', amenities: str='WIFI,PARKING', price_max: int=500, lodging_type: str='HOTEL,HOSTEL,APART_HOTEL', payment_type: str='PAY_LATER,FREE_CANCELLATION', star_rating_ids: str='3,4,5', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 119 |
+
"""
|
| 120 |
+
"Get hotels by the filter. Set the `domain`, it is necessary for localization at the currency setting. (meta / Domains List). `accessibility` parameter, needed to get ONLY available hotels. Indicate the `region_id` -> use `Region Search`, check-in and check-out date, number of adults and children"
|
| 121 |
+
checkout_date: Checkout Date
|
| 122 |
+
region_id: Region Id -> use `Regions Search`
|
| 123 |
+
adults_number: Number of adults
|
| 124 |
+
checkin_date: Checkin Date
|
| 125 |
+
accessibility: Accessibility. List: `SIGN_LANGUAGE_INTERPRETER`,`STAIR_FREE_PATH`,`SERVICE_ANIMAL`,`IN_ROOM_ACCESSIBLE`,`ROLL_IN_SHOWER`,`ACCESSIBLE_BATHROOM`,`ELEVATOR`,`ACCESSIBLE_PARKING`
|
| 126 |
+
available_filter: Available filter. List: `SHOW_AVAILABLE_ONLY`
|
| 127 |
+
meal_plan: Meal plan. List: `ALL_INCLUSIVE`,`FULL_BOARD`,`HALF_BOARD`,`FREE_BREAKFAST`
|
| 128 |
+
guest_rating_min: Minimal guest rating. Ex. `9` -> +9
|
| 129 |
+
price_min: Price min
|
| 130 |
+
page_number: Number of page
|
| 131 |
+
children_ages: The age of every child. Indicate their ages separated by commas. `4,0,15` -> three kids. `0` - less than a year
|
| 132 |
+
amenities: Amenities. List: `SPA_ON_SITE`,`WIFI`,`HOT_TUB`,`FREE_AIRPORT_TRANSPORTATION`,`POOL`,`GYM`,`OCEAN_VIEW`,`WATER_PARK`,`BALCONY_OR_TERRACE`,`KITCHEN_KITCHENETTE`,`ELECTRIC_CAR`,`PARKING`,`CRIB`,`RESTAURANT_IN_HOTEL`,`PETS`,`WASHER_DRYER`,`CASINO`,`AIR_CONDITIONING`
|
| 133 |
+
price_max: Price max
|
| 134 |
+
lodging_type: Lodging type. List: `HOSTAL`,`APARTMENT`,`APART_HOTEL`,`CHALET`,`HOTEL`,`RYOKAN`,`BED_AND_BREAKFAST`,`HOSTEL`
|
| 135 |
+
payment_type: Payment type. List: `GIFT_CARD`,`PAY_LATER`,`FREE_CANCELLATION`
|
| 136 |
+
star_rating_ids: Hotel Star ratings
|
| 137 |
+
|
| 138 |
+
"""
|
| 139 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/hotels/search"
|
| 140 |
+
querystring = {'domain': domain, 'sort_order': sort_order, 'locale': locale, 'checkout_date': checkout_date, 'region_id': region_id, 'adults_number': adults_number, 'checkin_date': checkin_date, }
|
| 141 |
+
if accessibility:
|
| 142 |
+
querystring['accessibility'] = accessibility
|
| 143 |
+
if available_filter:
|
| 144 |
+
querystring['available_filter'] = available_filter
|
| 145 |
+
if meal_plan:
|
| 146 |
+
querystring['meal_plan'] = meal_plan
|
| 147 |
+
if guest_rating_min:
|
| 148 |
+
querystring['guest_rating_min'] = guest_rating_min
|
| 149 |
+
if price_min:
|
| 150 |
+
querystring['price_min'] = price_min
|
| 151 |
+
if page_number:
|
| 152 |
+
querystring['page_number'] = page_number
|
| 153 |
+
if children_ages:
|
| 154 |
+
querystring['children_ages'] = children_ages
|
| 155 |
+
if amenities:
|
| 156 |
+
querystring['amenities'] = amenities
|
| 157 |
+
if price_max:
|
| 158 |
+
querystring['price_max'] = price_max
|
| 159 |
+
if lodging_type:
|
| 160 |
+
querystring['lodging_type'] = lodging_type
|
| 161 |
+
if payment_type:
|
| 162 |
+
querystring['payment_type'] = payment_type
|
| 163 |
+
if star_rating_ids:
|
| 164 |
+
querystring['star_rating_ids'] = star_rating_ids
|
| 165 |
+
|
| 166 |
+
headers = {
|
| 167 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 168 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 173 |
+
try:
|
| 174 |
+
observation = response.json()
|
| 175 |
+
except:
|
| 176 |
+
observation = response.text
|
| 177 |
+
return observation
|
| 178 |
+
|
| 179 |
+
def hotel_rooms_offers(adults_number: int, checkout_date: str, domain: str, locale: str, hotel_id: int, checkin_date: str, children_ages: str='4,0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 180 |
+
"""
|
| 181 |
+
"Get available rooms at the hotel"
|
| 182 |
+
adults_number: Number of adults
|
| 183 |
+
checkout_date: Checkout date
|
| 184 |
+
hotel_id: Hotel ID
|
| 185 |
+
checkin_date: Checkin date
|
| 186 |
+
children_ages: The age of every child. If children will be staying in the room, please indicate their ages separated by commas. 0-less than a year
|
| 187 |
+
|
| 188 |
+
"""
|
| 189 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/hotels/offers"
|
| 190 |
+
querystring = {'adults_number': adults_number, 'checkout_date': checkout_date, 'domain': domain, 'locale': locale, 'hotel_id': hotel_id, 'checkin_date': checkin_date, }
|
| 191 |
+
if children_ages:
|
| 192 |
+
querystring['children_ages'] = children_ages
|
| 193 |
+
|
| 194 |
+
headers = {
|
| 195 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 196 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 201 |
+
try:
|
| 202 |
+
observation = response.json()
|
| 203 |
+
except:
|
| 204 |
+
observation = response.text
|
| 205 |
+
return observation
|
| 206 |
+
|
| 207 |
+
def reviews_scores(domain: str, hotel_id: int, locale: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 208 |
+
"""
|
| 209 |
+
"Get hotel overall score"
|
| 210 |
+
hotel_id: Hotel ID
|
| 211 |
+
|
| 212 |
+
"""
|
| 213 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/scores"
|
| 214 |
+
querystring = {'domain': domain, 'hotel_id': hotel_id, 'locale': locale, }
|
| 215 |
+
|
| 216 |
+
headers = {
|
| 217 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 218 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
|
| 222 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 223 |
+
try:
|
| 224 |
+
observation = response.json()
|
| 225 |
+
except:
|
| 226 |
+
observation = response.text
|
| 227 |
+
return observation
|
| 228 |
+
|
| 229 |
+
def reviews_list(domain: str, locale: str, hotel_id: int, page_number: int=1, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 230 |
+
"""
|
| 231 |
+
"Get hotel reviews list"
|
| 232 |
+
hotel_id: Hotel ID
|
| 233 |
+
page_number: Number of page
|
| 234 |
+
|
| 235 |
+
"""
|
| 236 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/list"
|
| 237 |
+
querystring = {'domain': domain, 'locale': locale, 'hotel_id': hotel_id, }
|
| 238 |
+
if page_number:
|
| 239 |
+
querystring['page_number'] = page_number
|
| 240 |
+
|
| 241 |
+
headers = {
|
| 242 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 243 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 248 |
+
try:
|
| 249 |
+
observation = response.json()
|
| 250 |
+
except:
|
| 251 |
+
observation = response.text
|
| 252 |
+
return observation
|
| 253 |
+
|
| 254 |
+
def reviews_summary(locale: str, domain: str, hotel_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 255 |
+
"""
|
| 256 |
+
"Get hotel reviews summary"
|
| 257 |
+
hotel_id: Hotel ID
|
| 258 |
+
|
| 259 |
+
"""
|
| 260 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/hotels/reviews/summary"
|
| 261 |
+
querystring = {'locale': locale, 'domain': domain, 'hotel_id': hotel_id, }
|
| 262 |
+
|
| 263 |
+
headers = {
|
| 264 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 265 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 270 |
+
try:
|
| 271 |
+
observation = response.json()
|
| 272 |
+
except:
|
| 273 |
+
observation = response.text
|
| 274 |
+
return observation
|
| 275 |
+
|
| 276 |
+
def hotel_summary(domain: str, locale: str, hotel_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 277 |
+
"""
|
| 278 |
+
"Get hotel summary"
|
| 279 |
+
hotel_id: Hotel ID
|
| 280 |
+
|
| 281 |
+
"""
|
| 282 |
+
url = f"https://hotels-com-provider.p.rapidapi.com/v2/hotels/summary"
|
| 283 |
+
querystring = {'domain': domain, 'locale': locale, 'hotel_id': hotel_id, }
|
| 284 |
+
|
| 285 |
+
headers = {
|
| 286 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 287 |
+
"X-RapidAPI-Host": "hotels-com-provider.p.rapidapi.com"
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
|
| 291 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 292 |
+
try:
|
| 293 |
+
observation = response.json()
|
| 294 |
+
except:
|
| 295 |
+
observation = response.text
|
| 296 |
+
return observation
|
| 297 |
+
|
toolbench/toolenv/tools/Travel/iata_airport_codes.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"iata_airport_codes",
|
| 3 |
+
"tool_description":"A list of world iata airport codes",
|
| 4 |
+
"title":"iata_airport_codes",
|
| 5 |
+
"pricing":"FREEMIUM",
|
| 6 |
+
"score":{
|
| 7 |
+
"avgServiceLevel":100,
|
| 8 |
+
"avgLatency":745,
|
| 9 |
+
"avgSuccessRate":100,
|
| 10 |
+
"popularityScore":9.1,
|
| 11 |
+
"__typename":"Score"
|
| 12 |
+
},
|
| 13 |
+
"home_url":"https://rapidapi.com/rogerkingdom10/api/iata_airport_codes/",
|
| 14 |
+
"host":"iata_airport_codes.p.rapidapi.com",
|
| 15 |
+
"api_list":[
|
| 16 |
+
{
|
| 17 |
+
"name":"Get All iata airport codes",
|
| 18 |
+
"url":"https://iata_airport_codes.p.rapidapi.com/RRT7bH/world_iata_airport_codes",
|
| 19 |
+
"description":"Get all iata airport codes",
|
| 20 |
+
"method":"GET",
|
| 21 |
+
"required_parameters":[],
|
| 22 |
+
"optional_parameters":[
|
| 23 |
+
{
|
| 24 |
+
"name":"Code",
|
| 25 |
+
"type":"NUMBER",
|
| 26 |
+
"description":"",
|
| 27 |
+
"default":"1"
|
| 28 |
+
}
|
| 29 |
+
],
|
| 30 |
+
"code":"import requests\n\nurl = \"https://iata_airport_codes.p.rapidapi.com/RRT7bH/world_iata_airport_codes\"\nquerystring = {\"Code\": code}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iata_airport_codes.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 31 |
+
"statuscode":111,
|
| 32 |
+
"body":"",
|
| 33 |
+
"headers":"",
|
| 34 |
+
"schema":""
|
| 35 |
+
}
|
| 36 |
+
]
|
| 37 |
+
}
|
toolbench/toolenv/tools/Travel/iata_airport_codes/api.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def get_all_iata_airport_codes(code: int=1, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Get all iata airport codes"
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://iata_airport_codes.p.rapidapi.com/rrt7bh/world_iata_airport_codes"
|
| 15 |
+
querystring = {}
|
| 16 |
+
if code:
|
| 17 |
+
querystring['Code'] = code
|
| 18 |
+
|
| 19 |
+
headers = {
|
| 20 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 21 |
+
"X-RapidAPI-Host": "iata_airport_codes.p.rapidapi.com"
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 26 |
+
try:
|
| 27 |
+
observation = response.json()
|
| 28 |
+
except:
|
| 29 |
+
observation = response.text
|
| 30 |
+
return observation
|
| 31 |
+
|
toolbench/toolenv/tools/Travel/iata_and_icao_codes/api.py
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def airlines(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Returns the list of airlines"
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://iata-and-icao-codes.p.rapidapi.com/airlines"
|
| 15 |
+
querystring = {}
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "iata-and-icao-codes.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
| 30 |
+
def airline(iata_code: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 31 |
+
"""
|
| 32 |
+
"Finds airlines by IATA code"
|
| 33 |
+
iata_code: Airline IATA code
|
| 34 |
+
|
| 35 |
+
"""
|
| 36 |
+
url = f"https://iata-and-icao-codes.p.rapidapi.com/airline?iata_code={iata_code}"
|
| 37 |
+
querystring = {}
|
| 38 |
+
|
| 39 |
+
headers = {
|
| 40 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 41 |
+
"X-RapidAPI-Host": "iata-and-icao-codes.p.rapidapi.com"
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 46 |
+
try:
|
| 47 |
+
observation = response.json()
|
| 48 |
+
except:
|
| 49 |
+
observation = response.text
|
| 50 |
+
return observation
|
| 51 |
+
|
toolbench/toolenv/tools/Travel/iatacodes.json
ADDED
|
@@ -0,0 +1,1380 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"IATACodes",
|
| 3 |
+
"tool_description":"Global Aviation Data API",
|
| 4 |
+
"title":"IATACodes",
|
| 5 |
+
"pricing":"FREEMIUM",
|
| 6 |
+
"score":null,
|
| 7 |
+
"home_url":"https://rapidapi.com/airlabs/api/iatacodes/",
|
| 8 |
+
"host":"iatacodes-iatacodes-v1.p.rapidapi.com",
|
| 9 |
+
"api_list":[
|
| 10 |
+
{
|
| 11 |
+
"name":"Airports Database API",
|
| 12 |
+
"url":"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/airports",
|
| 13 |
+
"description":"Airport data is fundamental to any aviation-related business.\nLearn how to use the Airport Database API in your products.",
|
| 14 |
+
"method":"GET",
|
| 15 |
+
"required_parameters":[],
|
| 16 |
+
"optional_parameters":[
|
| 17 |
+
{
|
| 18 |
+
"name":"iata_code",
|
| 19 |
+
"type":"STRING",
|
| 20 |
+
"description":"Filtering by Airport IATA code.",
|
| 21 |
+
"default":"CDG"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"name":"icao_code",
|
| 25 |
+
"type":"STRING",
|
| 26 |
+
"description":"Filtering by Airport ICAO code.",
|
| 27 |
+
"default":"LFPG"
|
| 28 |
+
}
|
| 29 |
+
],
|
| 30 |
+
"code":"import requests\n\nurl = \"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/airports\"\nquerystring = {\"iata_code\": iata_code, \"icao_code\": icao_code}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iatacodes-iatacodes-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 31 |
+
"statuscode":200,
|
| 32 |
+
"body":{
|
| 33 |
+
"code":"CDG",
|
| 34 |
+
"tch_code":"ЦДГ",
|
| 35 |
+
"city_code":"PAR",
|
| 36 |
+
"country_code":"FR",
|
| 37 |
+
"name":"Charles De Gaulle",
|
| 38 |
+
"alternatenames":"Paris-Charles-de-Gaulle,Charles De Gaulle,Ch. De Gaulle,Ch. De Gaulle,Ch. De Gaulle,Шарль-де-Голль,สนามบินปารีสชาร์ลเดอโกล,Charles Degaulle,巴黎戴高乐机场",
|
| 39 |
+
"lat":49.003197,
|
| 40 |
+
"lng":2.567023,
|
| 41 |
+
"timezone":"Europe/Paris",
|
| 42 |
+
"gmt":120,
|
| 43 |
+
"popularity":182,
|
| 44 |
+
"is_rail_road":0,
|
| 45 |
+
"is_bus_station":0,
|
| 46 |
+
"icao":"LFPG",
|
| 47 |
+
"phone":"(01) 4862 121",
|
| 48 |
+
"site":"http://www.cdgfacile.com",
|
| 49 |
+
"geoname_id":"6269554",
|
| 50 |
+
"routes":42
|
| 51 |
+
},
|
| 52 |
+
"headers":{},
|
| 53 |
+
"schema":{
|
| 54 |
+
"type":"array",
|
| 55 |
+
"items":{
|
| 56 |
+
"type":"object",
|
| 57 |
+
"properties":{
|
| 58 |
+
"code":{
|
| 59 |
+
"type":"string"
|
| 60 |
+
},
|
| 61 |
+
"tch_code":{
|
| 62 |
+
"type":"string"
|
| 63 |
+
},
|
| 64 |
+
"city_code":{
|
| 65 |
+
"type":"string"
|
| 66 |
+
},
|
| 67 |
+
"country_code":{
|
| 68 |
+
"type":"string"
|
| 69 |
+
},
|
| 70 |
+
"name":{
|
| 71 |
+
"type":"string"
|
| 72 |
+
},
|
| 73 |
+
"alternatenames":{
|
| 74 |
+
"type":"string"
|
| 75 |
+
},
|
| 76 |
+
"lat":{
|
| 77 |
+
"type":"number"
|
| 78 |
+
},
|
| 79 |
+
"lng":{
|
| 80 |
+
"type":"number"
|
| 81 |
+
},
|
| 82 |
+
"timezone":{
|
| 83 |
+
"type":"string"
|
| 84 |
+
},
|
| 85 |
+
"gmt":{
|
| 86 |
+
"type":"integer"
|
| 87 |
+
},
|
| 88 |
+
"popularity":{
|
| 89 |
+
"type":"integer"
|
| 90 |
+
},
|
| 91 |
+
"is_rail_road":{
|
| 92 |
+
"type":"integer"
|
| 93 |
+
},
|
| 94 |
+
"is_bus_station":{
|
| 95 |
+
"type":"integer"
|
| 96 |
+
},
|
| 97 |
+
"icao":{
|
| 98 |
+
"type":"string"
|
| 99 |
+
},
|
| 100 |
+
"phone":{
|
| 101 |
+
"type":"string"
|
| 102 |
+
},
|
| 103 |
+
"site":{
|
| 104 |
+
"type":"string"
|
| 105 |
+
},
|
| 106 |
+
"geoname_id":{
|
| 107 |
+
"type":"string"
|
| 108 |
+
},
|
| 109 |
+
"routes":{
|
| 110 |
+
"type":"integer"
|
| 111 |
+
}
|
| 112 |
+
}
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
"name":"Airlines Database API",
|
| 118 |
+
"url":"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/airlines",
|
| 119 |
+
"description":"AirLabs Airline data is the most essential data for any travel startup and companies related to the aviation industry.",
|
| 120 |
+
"method":"GET",
|
| 121 |
+
"required_parameters":[],
|
| 122 |
+
"optional_parameters":[
|
| 123 |
+
{
|
| 124 |
+
"name":"icao_code",
|
| 125 |
+
"type":"STRING",
|
| 126 |
+
"description":"Filtering by Airline ICAO code",
|
| 127 |
+
"default":"AAL"
|
| 128 |
+
},
|
| 129 |
+
{
|
| 130 |
+
"name":"iata_code",
|
| 131 |
+
"type":"STRING",
|
| 132 |
+
"description":"Filtering by Airline IATA code",
|
| 133 |
+
"default":"AA"
|
| 134 |
+
}
|
| 135 |
+
],
|
| 136 |
+
"code":"import requests\n\nurl = \"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/airlines\"\nquerystring = {\"icao_code\": icao_code, \"iata_code\": iata_code}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iatacodes-iatacodes-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 137 |
+
"statuscode":200,
|
| 138 |
+
"body":{
|
| 139 |
+
"code":"AF",
|
| 140 |
+
"icao":"AFR",
|
| 141 |
+
"name":"Air France",
|
| 142 |
+
"alias":"",
|
| 143 |
+
"callsign":"AIRFRANS",
|
| 144 |
+
"country_code":"FR",
|
| 145 |
+
"country_name":"France",
|
| 146 |
+
"account_code":"057",
|
| 147 |
+
"age":9.9,
|
| 148 |
+
"founded":1933,
|
| 149 |
+
"phone":"1-800-375-8723",
|
| 150 |
+
"website":"www.airfrance.fr",
|
| 151 |
+
"carryon_weight":10,
|
| 152 |
+
"carryon_size":"56х36х23",
|
| 153 |
+
"free_luggage_weight":0,
|
| 154 |
+
"on_time_percent":77,
|
| 155 |
+
"late_percent":9,
|
| 156 |
+
"very_late_percent":4,
|
| 157 |
+
"excessive_percent":7,
|
| 158 |
+
"canceled_percent":1,
|
| 159 |
+
"diverted_percent":0,
|
| 160 |
+
"avg_delay":null,
|
| 161 |
+
"observations":102589,
|
| 162 |
+
"min_delay":0,
|
| 163 |
+
"max_delay":967,
|
| 164 |
+
"status":"active",
|
| 165 |
+
"type":"scheduled",
|
| 166 |
+
"city_code":"CDG",
|
| 167 |
+
"facebook":"https://www.facebook.com/airfrance",
|
| 168 |
+
"twitter":"https://www.twitter.com/afnewsroom",
|
| 169 |
+
"wikipedia":"https://en.wikipedia.org/wiki/Air_France"
|
| 170 |
+
},
|
| 171 |
+
"headers":{},
|
| 172 |
+
"schema":{
|
| 173 |
+
"type":"array",
|
| 174 |
+
"items":{
|
| 175 |
+
"type":"object",
|
| 176 |
+
"properties":{
|
| 177 |
+
"code":{
|
| 178 |
+
"type":"string"
|
| 179 |
+
},
|
| 180 |
+
"icao":{
|
| 181 |
+
"type":"string"
|
| 182 |
+
},
|
| 183 |
+
"name":{
|
| 184 |
+
"type":"string"
|
| 185 |
+
},
|
| 186 |
+
"alias":{
|
| 187 |
+
"type":"string"
|
| 188 |
+
},
|
| 189 |
+
"callsign":{
|
| 190 |
+
"type":"string"
|
| 191 |
+
},
|
| 192 |
+
"country_code":{
|
| 193 |
+
"type":"string"
|
| 194 |
+
},
|
| 195 |
+
"country_name":{
|
| 196 |
+
"type":"string"
|
| 197 |
+
},
|
| 198 |
+
"account_code":{
|
| 199 |
+
"type":"string"
|
| 200 |
+
},
|
| 201 |
+
"age":{
|
| 202 |
+
"type":"number"
|
| 203 |
+
},
|
| 204 |
+
"founded":{
|
| 205 |
+
"type":"integer"
|
| 206 |
+
},
|
| 207 |
+
"phone":{
|
| 208 |
+
"type":"string"
|
| 209 |
+
},
|
| 210 |
+
"website":{
|
| 211 |
+
"type":"string"
|
| 212 |
+
},
|
| 213 |
+
"carryon_weight":{
|
| 214 |
+
"type":"integer"
|
| 215 |
+
},
|
| 216 |
+
"carryon_size":{
|
| 217 |
+
"type":"string"
|
| 218 |
+
},
|
| 219 |
+
"free_luggage_weight":{
|
| 220 |
+
"type":"integer"
|
| 221 |
+
},
|
| 222 |
+
"on_time_percent":{
|
| 223 |
+
"type":"integer"
|
| 224 |
+
},
|
| 225 |
+
"late_percent":{
|
| 226 |
+
"type":"integer"
|
| 227 |
+
},
|
| 228 |
+
"very_late_percent":{
|
| 229 |
+
"type":"integer"
|
| 230 |
+
},
|
| 231 |
+
"excessive_percent":{
|
| 232 |
+
"type":"integer"
|
| 233 |
+
},
|
| 234 |
+
"canceled_percent":{
|
| 235 |
+
"type":"integer"
|
| 236 |
+
},
|
| 237 |
+
"diverted_percent":{
|
| 238 |
+
"type":"integer"
|
| 239 |
+
},
|
| 240 |
+
"avg_delay":{
|
| 241 |
+
"type":"null"
|
| 242 |
+
},
|
| 243 |
+
"observations":{
|
| 244 |
+
"type":"integer"
|
| 245 |
+
},
|
| 246 |
+
"min_delay":{
|
| 247 |
+
"type":"integer"
|
| 248 |
+
},
|
| 249 |
+
"max_delay":{
|
| 250 |
+
"type":"integer"
|
| 251 |
+
},
|
| 252 |
+
"status":{
|
| 253 |
+
"type":"string"
|
| 254 |
+
},
|
| 255 |
+
"type":{
|
| 256 |
+
"type":"string"
|
| 257 |
+
},
|
| 258 |
+
"city_code":{
|
| 259 |
+
"type":"string"
|
| 260 |
+
},
|
| 261 |
+
"facebook":{
|
| 262 |
+
"type":"string"
|
| 263 |
+
},
|
| 264 |
+
"twitter":{
|
| 265 |
+
"type":"string"
|
| 266 |
+
},
|
| 267 |
+
"wikipedia":{
|
| 268 |
+
"type":"string"
|
| 269 |
+
}
|
| 270 |
+
}
|
| 271 |
+
}
|
| 272 |
+
}
|
| 273 |
+
},
|
| 274 |
+
{
|
| 275 |
+
"name":"Cities Database API",
|
| 276 |
+
"url":"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/cities",
|
| 277 |
+
"description":"City data complements and enhances airport data, if you need to create features that are independent of airports, you can use cities to replace them, and you can also combine them.",
|
| 278 |
+
"method":"GET",
|
| 279 |
+
"required_parameters":[],
|
| 280 |
+
"optional_parameters":[
|
| 281 |
+
{
|
| 282 |
+
"name":"city_code",
|
| 283 |
+
"type":"STRING",
|
| 284 |
+
"description":"Filtering by IATA City code",
|
| 285 |
+
"default":"SIN"
|
| 286 |
+
}
|
| 287 |
+
],
|
| 288 |
+
"code":"import requests\n\nurl = \"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/cities\"\nquerystring = {\"city_code\": city_code}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iatacodes-iatacodes-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 289 |
+
"statuscode":200,
|
| 290 |
+
"body":{
|
| 291 |
+
"code":"PAR",
|
| 292 |
+
"country_code":"FR",
|
| 293 |
+
"name":"Paris",
|
| 294 |
+
"alternatenames":"Paris,Paris,París,Paris,Parigi,Париж,ปารีส,Paris,巴黎",
|
| 295 |
+
"lat":48.856614,
|
| 296 |
+
"lng":2.3522219,
|
| 297 |
+
"timezone":"Europe/Paris",
|
| 298 |
+
"gmt":1,
|
| 299 |
+
"tch_code":"ПАЖ",
|
| 300 |
+
"popularity":3180,
|
| 301 |
+
"geoname_id":2988507
|
| 302 |
+
},
|
| 303 |
+
"headers":{},
|
| 304 |
+
"schema":{
|
| 305 |
+
"$schema":"http://json-schema.org/draft-04/schema#",
|
| 306 |
+
"type":"array",
|
| 307 |
+
"items":[
|
| 308 |
+
{
|
| 309 |
+
"type":"object",
|
| 310 |
+
"properties":{
|
| 311 |
+
"name":{
|
| 312 |
+
"type":"string"
|
| 313 |
+
},
|
| 314 |
+
"city_code":{
|
| 315 |
+
"type":"string"
|
| 316 |
+
},
|
| 317 |
+
"un_locode":{
|
| 318 |
+
"type":"string"
|
| 319 |
+
},
|
| 320 |
+
"lat":{
|
| 321 |
+
"type":"number"
|
| 322 |
+
},
|
| 323 |
+
"lng":{
|
| 324 |
+
"type":"number"
|
| 325 |
+
},
|
| 326 |
+
"alt":{
|
| 327 |
+
"type":"integer"
|
| 328 |
+
},
|
| 329 |
+
"timezone":{
|
| 330 |
+
"type":"string"
|
| 331 |
+
},
|
| 332 |
+
"country_code":{
|
| 333 |
+
"type":"string"
|
| 334 |
+
},
|
| 335 |
+
"population":{
|
| 336 |
+
"type":"integer"
|
| 337 |
+
},
|
| 338 |
+
"names":{
|
| 339 |
+
"type":"object",
|
| 340 |
+
"properties":{
|
| 341 |
+
"de":{
|
| 342 |
+
"type":"string"
|
| 343 |
+
},
|
| 344 |
+
"hi":{
|
| 345 |
+
"type":"string"
|
| 346 |
+
},
|
| 347 |
+
"fi":{
|
| 348 |
+
"type":"string"
|
| 349 |
+
},
|
| 350 |
+
"ru":{
|
| 351 |
+
"type":"string"
|
| 352 |
+
},
|
| 353 |
+
"lo":{
|
| 354 |
+
"type":"string"
|
| 355 |
+
},
|
| 356 |
+
"pt":{
|
| 357 |
+
"type":"string"
|
| 358 |
+
},
|
| 359 |
+
"yue":{
|
| 360 |
+
"type":"string"
|
| 361 |
+
},
|
| 362 |
+
"fr":{
|
| 363 |
+
"type":"string"
|
| 364 |
+
},
|
| 365 |
+
"hak":{
|
| 366 |
+
"type":"string"
|
| 367 |
+
},
|
| 368 |
+
"gan":{
|
| 369 |
+
"type":"string"
|
| 370 |
+
},
|
| 371 |
+
"wuu":{
|
| 372 |
+
"type":"string"
|
| 373 |
+
},
|
| 374 |
+
"uk":{
|
| 375 |
+
"type":"string"
|
| 376 |
+
},
|
| 377 |
+
"km":{
|
| 378 |
+
"type":"string"
|
| 379 |
+
},
|
| 380 |
+
"sv":{
|
| 381 |
+
"type":"string"
|
| 382 |
+
},
|
| 383 |
+
"ko":{
|
| 384 |
+
"type":"string"
|
| 385 |
+
},
|
| 386 |
+
"mr":{
|
| 387 |
+
"type":"string"
|
| 388 |
+
},
|
| 389 |
+
"el":{
|
| 390 |
+
"type":"string"
|
| 391 |
+
},
|
| 392 |
+
"en":{
|
| 393 |
+
"type":"string"
|
| 394 |
+
},
|
| 395 |
+
"it":{
|
| 396 |
+
"type":"string"
|
| 397 |
+
},
|
| 398 |
+
"my":{
|
| 399 |
+
"type":"string"
|
| 400 |
+
},
|
| 401 |
+
"ta":{
|
| 402 |
+
"type":"string"
|
| 403 |
+
},
|
| 404 |
+
"es":{
|
| 405 |
+
"type":"string"
|
| 406 |
+
},
|
| 407 |
+
"zh":{
|
| 408 |
+
"type":"string"
|
| 409 |
+
},
|
| 410 |
+
"pa":{
|
| 411 |
+
"type":"string"
|
| 412 |
+
},
|
| 413 |
+
"ar":{
|
| 414 |
+
"type":"string"
|
| 415 |
+
},
|
| 416 |
+
"th":{
|
| 417 |
+
"type":"string"
|
| 418 |
+
},
|
| 419 |
+
"ja":{
|
| 420 |
+
"type":"string"
|
| 421 |
+
},
|
| 422 |
+
"fa":{
|
| 423 |
+
"type":"string"
|
| 424 |
+
},
|
| 425 |
+
"da":{
|
| 426 |
+
"type":"string"
|
| 427 |
+
},
|
| 428 |
+
"he":{
|
| 429 |
+
"type":"string"
|
| 430 |
+
}
|
| 431 |
+
},
|
| 432 |
+
"required":[
|
| 433 |
+
"de",
|
| 434 |
+
"hi",
|
| 435 |
+
"fi",
|
| 436 |
+
"ru",
|
| 437 |
+
"lo",
|
| 438 |
+
"pt",
|
| 439 |
+
"yue",
|
| 440 |
+
"fr",
|
| 441 |
+
"hak",
|
| 442 |
+
"gan",
|
| 443 |
+
"wuu",
|
| 444 |
+
"uk",
|
| 445 |
+
"km",
|
| 446 |
+
"sv",
|
| 447 |
+
"ko",
|
| 448 |
+
"mr",
|
| 449 |
+
"el",
|
| 450 |
+
"en",
|
| 451 |
+
"it",
|
| 452 |
+
"my",
|
| 453 |
+
"ta",
|
| 454 |
+
"es",
|
| 455 |
+
"zh",
|
| 456 |
+
"pa",
|
| 457 |
+
"ar",
|
| 458 |
+
"th",
|
| 459 |
+
"ja",
|
| 460 |
+
"fa",
|
| 461 |
+
"da",
|
| 462 |
+
"he"
|
| 463 |
+
]
|
| 464 |
+
},
|
| 465 |
+
"wikipedia":{
|
| 466 |
+
"type":"string"
|
| 467 |
+
},
|
| 468 |
+
"slug":{
|
| 469 |
+
"type":"string"
|
| 470 |
+
}
|
| 471 |
+
},
|
| 472 |
+
"required":[
|
| 473 |
+
"name",
|
| 474 |
+
"city_code",
|
| 475 |
+
"un_locode",
|
| 476 |
+
"lat",
|
| 477 |
+
"lng",
|
| 478 |
+
"alt",
|
| 479 |
+
"timezone",
|
| 480 |
+
"country_code",
|
| 481 |
+
"population",
|
| 482 |
+
"names",
|
| 483 |
+
"wikipedia",
|
| 484 |
+
"slug"
|
| 485 |
+
]
|
| 486 |
+
}
|
| 487 |
+
]
|
| 488 |
+
}
|
| 489 |
+
},
|
| 490 |
+
{
|
| 491 |
+
"name":"Live Flight Schedules API",
|
| 492 |
+
"url":"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/schedules",
|
| 493 |
+
"description":"The live schedules provide an information about the current status of the departure and arrival flights.",
|
| 494 |
+
"method":"GET",
|
| 495 |
+
"required_parameters":[],
|
| 496 |
+
"optional_parameters":[
|
| 497 |
+
{
|
| 498 |
+
"name":"dep_icao",
|
| 499 |
+
"type":"STRING",
|
| 500 |
+
"description":"",
|
| 501 |
+
"default":"KMIA"
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"name":"arr_iata",
|
| 505 |
+
"type":"STRING",
|
| 506 |
+
"description":"",
|
| 507 |
+
"default":"SFO"
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"name":"airline_iata",
|
| 511 |
+
"type":"STRING",
|
| 512 |
+
"description":"",
|
| 513 |
+
"default":"BA"
|
| 514 |
+
},
|
| 515 |
+
{
|
| 516 |
+
"name":"arr_icao",
|
| 517 |
+
"type":"STRING",
|
| 518 |
+
"description":"",
|
| 519 |
+
"default":"KSFO"
|
| 520 |
+
},
|
| 521 |
+
{
|
| 522 |
+
"name":"airline_icao",
|
| 523 |
+
"type":"STRING",
|
| 524 |
+
"description":"",
|
| 525 |
+
"default":"BAW"
|
| 526 |
+
},
|
| 527 |
+
{
|
| 528 |
+
"name":"dep_iata",
|
| 529 |
+
"type":"STRING",
|
| 530 |
+
"description":"",
|
| 531 |
+
"default":"MIA"
|
| 532 |
+
}
|
| 533 |
+
],
|
| 534 |
+
"code":"import requests\n\nurl = \"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/schedules\"\nquerystring = {\"dep_icao\": dep_icao, \"arr_iata\": arr_iata, \"airline_iata\": airline_iata, \"arr_icao\": arr_icao, \"airline_icao\": airline_icao, \"dep_iata\": dep_iata}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iatacodes-iatacodes-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 535 |
+
"statuscode":200,
|
| 536 |
+
"body":{
|
| 537 |
+
"key1":"value",
|
| 538 |
+
"key2":"value"
|
| 539 |
+
},
|
| 540 |
+
"headers":{},
|
| 541 |
+
"schema":{
|
| 542 |
+
"type":"array",
|
| 543 |
+
"items":{
|
| 544 |
+
"type":"object",
|
| 545 |
+
"properties":{
|
| 546 |
+
"airline_iata":{
|
| 547 |
+
"type":"string"
|
| 548 |
+
},
|
| 549 |
+
"airline_icao":{
|
| 550 |
+
"type":"string"
|
| 551 |
+
},
|
| 552 |
+
"flight_iata":{
|
| 553 |
+
"type":"string"
|
| 554 |
+
},
|
| 555 |
+
"flight_icao":{
|
| 556 |
+
"type":"string"
|
| 557 |
+
},
|
| 558 |
+
"flight_number":{
|
| 559 |
+
"type":"string"
|
| 560 |
+
},
|
| 561 |
+
"cs_airline_iata":{
|
| 562 |
+
"type":"string"
|
| 563 |
+
},
|
| 564 |
+
"cs_flight_number":{
|
| 565 |
+
"type":"string"
|
| 566 |
+
},
|
| 567 |
+
"cs_flight_iata":{
|
| 568 |
+
"type":"string"
|
| 569 |
+
},
|
| 570 |
+
"dep_iata":{
|
| 571 |
+
"type":"string"
|
| 572 |
+
},
|
| 573 |
+
"dep_icao":{
|
| 574 |
+
"type":"string"
|
| 575 |
+
},
|
| 576 |
+
"dep_terminal":{
|
| 577 |
+
"type":"string"
|
| 578 |
+
},
|
| 579 |
+
"dep_gate":{
|
| 580 |
+
"type":"string"
|
| 581 |
+
},
|
| 582 |
+
"dep_time":{
|
| 583 |
+
"type":"string"
|
| 584 |
+
},
|
| 585 |
+
"dep_time_ts":{
|
| 586 |
+
"type":"integer"
|
| 587 |
+
},
|
| 588 |
+
"dep_time_utc":{
|
| 589 |
+
"type":"string"
|
| 590 |
+
},
|
| 591 |
+
"dep_estimated":{
|
| 592 |
+
"type":"string"
|
| 593 |
+
},
|
| 594 |
+
"dep_estimated_ts":{
|
| 595 |
+
"type":"integer"
|
| 596 |
+
},
|
| 597 |
+
"dep_estimated_utc":{
|
| 598 |
+
"type":"string"
|
| 599 |
+
},
|
| 600 |
+
"arr_iata":{
|
| 601 |
+
"type":"string"
|
| 602 |
+
},
|
| 603 |
+
"arr_icao":{
|
| 604 |
+
"type":"string"
|
| 605 |
+
},
|
| 606 |
+
"arr_terminal":{
|
| 607 |
+
"type":"string"
|
| 608 |
+
},
|
| 609 |
+
"arr_gate":{
|
| 610 |
+
"type":"string"
|
| 611 |
+
},
|
| 612 |
+
"arr_baggage":{
|
| 613 |
+
"type":"string"
|
| 614 |
+
},
|
| 615 |
+
"arr_time":{
|
| 616 |
+
"type":"string"
|
| 617 |
+
},
|
| 618 |
+
"arr_time_ts":{
|
| 619 |
+
"type":"integer"
|
| 620 |
+
},
|
| 621 |
+
"arr_time_utc":{
|
| 622 |
+
"type":"string"
|
| 623 |
+
},
|
| 624 |
+
"arr_estimated":{
|
| 625 |
+
"type":"string"
|
| 626 |
+
},
|
| 627 |
+
"arr_estimated_ts":{
|
| 628 |
+
"type":"integer"
|
| 629 |
+
},
|
| 630 |
+
"arr_estimated_utc":{
|
| 631 |
+
"type":"string"
|
| 632 |
+
},
|
| 633 |
+
"status":{
|
| 634 |
+
"type":"string"
|
| 635 |
+
},
|
| 636 |
+
"duration":{
|
| 637 |
+
"type":"integer"
|
| 638 |
+
},
|
| 639 |
+
"delayed":{
|
| 640 |
+
"type":"integer"
|
| 641 |
+
}
|
| 642 |
+
}
|
| 643 |
+
}
|
| 644 |
+
}
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"name":"Flight Information API",
|
| 648 |
+
"url":"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/flight",
|
| 649 |
+
"description":"Single flight detailed information by flight number with ICAO or IATA prefix.",
|
| 650 |
+
"method":"GET",
|
| 651 |
+
"required_parameters":[],
|
| 652 |
+
"optional_parameters":[
|
| 653 |
+
{
|
| 654 |
+
"name":"flight_icao",
|
| 655 |
+
"type":"STRING",
|
| 656 |
+
"description":"",
|
| 657 |
+
"default":"AAL6"
|
| 658 |
+
},
|
| 659 |
+
{
|
| 660 |
+
"name":"flight_iata",
|
| 661 |
+
"type":"STRING",
|
| 662 |
+
"description":"",
|
| 663 |
+
"default":"AA6"
|
| 664 |
+
}
|
| 665 |
+
],
|
| 666 |
+
"code":"import requests\n\nurl = \"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/flight\"\nquerystring = {\"flight_icao\": flight_icao, \"flight_iata\": flight_iata}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iatacodes-iatacodes-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 667 |
+
"statuscode":200,
|
| 668 |
+
"body":{
|
| 669 |
+
"key1":"value",
|
| 670 |
+
"key2":"value"
|
| 671 |
+
},
|
| 672 |
+
"headers":{},
|
| 673 |
+
"schema":{
|
| 674 |
+
"type":"object",
|
| 675 |
+
"properties":{
|
| 676 |
+
"hex":{
|
| 677 |
+
"type":"string"
|
| 678 |
+
},
|
| 679 |
+
"reg_number":{
|
| 680 |
+
"type":"string"
|
| 681 |
+
},
|
| 682 |
+
"aircraft_icao":{
|
| 683 |
+
"type":"string"
|
| 684 |
+
},
|
| 685 |
+
"flag":{
|
| 686 |
+
"type":"string"
|
| 687 |
+
},
|
| 688 |
+
"lat":{
|
| 689 |
+
"type":"number"
|
| 690 |
+
},
|
| 691 |
+
"lng":{
|
| 692 |
+
"type":"number"
|
| 693 |
+
},
|
| 694 |
+
"alt":{
|
| 695 |
+
"type":"integer"
|
| 696 |
+
},
|
| 697 |
+
"dir":{
|
| 698 |
+
"type":"integer"
|
| 699 |
+
},
|
| 700 |
+
"speed":{
|
| 701 |
+
"type":"integer"
|
| 702 |
+
},
|
| 703 |
+
"v_speed":{
|
| 704 |
+
"type":"integer"
|
| 705 |
+
},
|
| 706 |
+
"squawk":{
|
| 707 |
+
"type":"string"
|
| 708 |
+
},
|
| 709 |
+
"airline_icao":{
|
| 710 |
+
"type":"string"
|
| 711 |
+
},
|
| 712 |
+
"airline_iata":{
|
| 713 |
+
"type":"string"
|
| 714 |
+
},
|
| 715 |
+
"flight_number":{
|
| 716 |
+
"type":"string"
|
| 717 |
+
},
|
| 718 |
+
"flight_icao":{
|
| 719 |
+
"type":"string"
|
| 720 |
+
},
|
| 721 |
+
"flight_iata":{
|
| 722 |
+
"type":"string"
|
| 723 |
+
},
|
| 724 |
+
"cs_airline_iata":{
|
| 725 |
+
"type":"null"
|
| 726 |
+
},
|
| 727 |
+
"cs_flight_number":{
|
| 728 |
+
"type":"null"
|
| 729 |
+
},
|
| 730 |
+
"cs_flight_iata":{
|
| 731 |
+
"type":"null"
|
| 732 |
+
},
|
| 733 |
+
"dep_icao":{
|
| 734 |
+
"type":"string"
|
| 735 |
+
},
|
| 736 |
+
"dep_iata":{
|
| 737 |
+
"type":"string"
|
| 738 |
+
},
|
| 739 |
+
"dep_terminal":{
|
| 740 |
+
"type":"null"
|
| 741 |
+
},
|
| 742 |
+
"dep_gate":{
|
| 743 |
+
"type":"string"
|
| 744 |
+
},
|
| 745 |
+
"dep_time":{
|
| 746 |
+
"type":"string"
|
| 747 |
+
},
|
| 748 |
+
"dep_time_ts":{
|
| 749 |
+
"type":"integer"
|
| 750 |
+
},
|
| 751 |
+
"dep_time_utc":{
|
| 752 |
+
"type":"string"
|
| 753 |
+
},
|
| 754 |
+
"arr_icao":{
|
| 755 |
+
"type":"string"
|
| 756 |
+
},
|
| 757 |
+
"arr_iata":{
|
| 758 |
+
"type":"string"
|
| 759 |
+
},
|
| 760 |
+
"arr_terminal":{
|
| 761 |
+
"type":"string"
|
| 762 |
+
},
|
| 763 |
+
"arr_gate":{
|
| 764 |
+
"type":"string"
|
| 765 |
+
},
|
| 766 |
+
"arr_baggage":{
|
| 767 |
+
"type":"string"
|
| 768 |
+
},
|
| 769 |
+
"arr_time":{
|
| 770 |
+
"type":"string"
|
| 771 |
+
},
|
| 772 |
+
"arr_time_ts":{
|
| 773 |
+
"type":"integer"
|
| 774 |
+
},
|
| 775 |
+
"arr_time_utc":{
|
| 776 |
+
"type":"string"
|
| 777 |
+
},
|
| 778 |
+
"duration":{
|
| 779 |
+
"type":"integer"
|
| 780 |
+
},
|
| 781 |
+
"delayed":{
|
| 782 |
+
"type":"null"
|
| 783 |
+
},
|
| 784 |
+
"updated":{
|
| 785 |
+
"type":"integer"
|
| 786 |
+
},
|
| 787 |
+
"status":{
|
| 788 |
+
"type":"string"
|
| 789 |
+
},
|
| 790 |
+
"age":{
|
| 791 |
+
"type":"integer"
|
| 792 |
+
},
|
| 793 |
+
"built":{
|
| 794 |
+
"type":"integer"
|
| 795 |
+
},
|
| 796 |
+
"engine":{
|
| 797 |
+
"type":"string"
|
| 798 |
+
},
|
| 799 |
+
"engine_count":{
|
| 800 |
+
"type":"string"
|
| 801 |
+
},
|
| 802 |
+
"model":{
|
| 803 |
+
"type":"string"
|
| 804 |
+
},
|
| 805 |
+
"manufacturer":{
|
| 806 |
+
"type":"string"
|
| 807 |
+
},
|
| 808 |
+
"msn":{
|
| 809 |
+
"type":"string"
|
| 810 |
+
},
|
| 811 |
+
"type":{
|
| 812 |
+
"type":"string"
|
| 813 |
+
}
|
| 814 |
+
}
|
| 815 |
+
}
|
| 816 |
+
},
|
| 817 |
+
{
|
| 818 |
+
"name":"Name Suggestion API",
|
| 819 |
+
"url":"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/suggest",
|
| 820 |
+
"description":"Travel destination autocomplete API.",
|
| 821 |
+
"method":"GET",
|
| 822 |
+
"required_parameters":[
|
| 823 |
+
{
|
| 824 |
+
"name":"term",
|
| 825 |
+
"type":"STRING",
|
| 826 |
+
"description":"**term** or **q** or **query** or **s** or **search** or **text**\n\nPart of the destination name - airport, city or country.\nBetween 3 and 30 characters",
|
| 827 |
+
"default":"spain"
|
| 828 |
+
}
|
| 829 |
+
],
|
| 830 |
+
"optional_parameters":[],
|
| 831 |
+
"code":"import requests\n\nurl = \"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/suggest\"\nquerystring = {\"term\": term}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iatacodes-iatacodes-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 832 |
+
"statuscode":200,
|
| 833 |
+
"body":{
|
| 834 |
+
"key1":"value",
|
| 835 |
+
"key2":"value"
|
| 836 |
+
},
|
| 837 |
+
"headers":{},
|
| 838 |
+
"schema":{
|
| 839 |
+
"type":"object",
|
| 840 |
+
"properties":{
|
| 841 |
+
"countries":{
|
| 842 |
+
"type":"array",
|
| 843 |
+
"items":{
|
| 844 |
+
"type":"object",
|
| 845 |
+
"properties":{
|
| 846 |
+
"code":{
|
| 847 |
+
"type":"string"
|
| 848 |
+
},
|
| 849 |
+
"code3":{
|
| 850 |
+
"type":"string"
|
| 851 |
+
},
|
| 852 |
+
"name":{
|
| 853 |
+
"type":"string"
|
| 854 |
+
},
|
| 855 |
+
"continent":{
|
| 856 |
+
"type":"string"
|
| 857 |
+
},
|
| 858 |
+
"currency":{
|
| 859 |
+
"type":"string"
|
| 860 |
+
}
|
| 861 |
+
}
|
| 862 |
+
}
|
| 863 |
+
},
|
| 864 |
+
"cities":{
|
| 865 |
+
"type":"array",
|
| 866 |
+
"items":{
|
| 867 |
+
"type":"object",
|
| 868 |
+
"properties":{
|
| 869 |
+
"country_code":{
|
| 870 |
+
"type":"string"
|
| 871 |
+
},
|
| 872 |
+
"lng":{
|
| 873 |
+
"type":"number"
|
| 874 |
+
},
|
| 875 |
+
"timezone":{
|
| 876 |
+
"type":"string"
|
| 877 |
+
},
|
| 878 |
+
"name":{
|
| 879 |
+
"type":"string"
|
| 880 |
+
},
|
| 881 |
+
"city_code":{
|
| 882 |
+
"type":"string"
|
| 883 |
+
},
|
| 884 |
+
"slug":{
|
| 885 |
+
"type":"string"
|
| 886 |
+
},
|
| 887 |
+
"lat":{
|
| 888 |
+
"type":"number"
|
| 889 |
+
},
|
| 890 |
+
"popularity":{
|
| 891 |
+
"type":"integer"
|
| 892 |
+
}
|
| 893 |
+
}
|
| 894 |
+
}
|
| 895 |
+
},
|
| 896 |
+
"airports":{
|
| 897 |
+
"type":"array",
|
| 898 |
+
"items":{
|
| 899 |
+
"type":"object",
|
| 900 |
+
"properties":{
|
| 901 |
+
"country_code":{
|
| 902 |
+
"type":"string"
|
| 903 |
+
},
|
| 904 |
+
"iata_code":{
|
| 905 |
+
"type":"string"
|
| 906 |
+
},
|
| 907 |
+
"lng":{
|
| 908 |
+
"type":"number"
|
| 909 |
+
},
|
| 910 |
+
"city":{
|
| 911 |
+
"type":"string"
|
| 912 |
+
},
|
| 913 |
+
"timezone":{
|
| 914 |
+
"type":"string"
|
| 915 |
+
},
|
| 916 |
+
"name":{
|
| 917 |
+
"type":"string"
|
| 918 |
+
},
|
| 919 |
+
"city_code":{
|
| 920 |
+
"type":"string"
|
| 921 |
+
},
|
| 922 |
+
"slug":{
|
| 923 |
+
"type":"string"
|
| 924 |
+
},
|
| 925 |
+
"lat":{
|
| 926 |
+
"type":"number"
|
| 927 |
+
},
|
| 928 |
+
"popularity":{
|
| 929 |
+
"type":"integer"
|
| 930 |
+
}
|
| 931 |
+
}
|
| 932 |
+
}
|
| 933 |
+
},
|
| 934 |
+
"cities_by_airports":{
|
| 935 |
+
"type":"array",
|
| 936 |
+
"items":{
|
| 937 |
+
"type":"object",
|
| 938 |
+
"properties":{
|
| 939 |
+
"country_code":{
|
| 940 |
+
"type":"string"
|
| 941 |
+
},
|
| 942 |
+
"lng":{
|
| 943 |
+
"type":"number"
|
| 944 |
+
},
|
| 945 |
+
"timezone":{
|
| 946 |
+
"type":"string"
|
| 947 |
+
},
|
| 948 |
+
"name":{
|
| 949 |
+
"type":"string"
|
| 950 |
+
},
|
| 951 |
+
"city_code":{
|
| 952 |
+
"type":"string"
|
| 953 |
+
},
|
| 954 |
+
"slug":{
|
| 955 |
+
"type":"string"
|
| 956 |
+
},
|
| 957 |
+
"lat":{
|
| 958 |
+
"type":"number"
|
| 959 |
+
},
|
| 960 |
+
"popularity":{
|
| 961 |
+
"type":"integer"
|
| 962 |
+
}
|
| 963 |
+
}
|
| 964 |
+
}
|
| 965 |
+
},
|
| 966 |
+
"cities_by_countries":{
|
| 967 |
+
"type":"array",
|
| 968 |
+
"items":{
|
| 969 |
+
"type":"object",
|
| 970 |
+
"properties":{
|
| 971 |
+
"country_code":{
|
| 972 |
+
"type":"string"
|
| 973 |
+
},
|
| 974 |
+
"lng":{
|
| 975 |
+
"type":"number"
|
| 976 |
+
},
|
| 977 |
+
"timezone":{
|
| 978 |
+
"type":"string"
|
| 979 |
+
},
|
| 980 |
+
"name":{
|
| 981 |
+
"type":"string"
|
| 982 |
+
},
|
| 983 |
+
"city_code":{
|
| 984 |
+
"type":"string"
|
| 985 |
+
},
|
| 986 |
+
"slug":{
|
| 987 |
+
"type":"string"
|
| 988 |
+
},
|
| 989 |
+
"lat":{
|
| 990 |
+
"type":"number"
|
| 991 |
+
},
|
| 992 |
+
"popularity":{
|
| 993 |
+
"type":"integer"
|
| 994 |
+
}
|
| 995 |
+
}
|
| 996 |
+
}
|
| 997 |
+
},
|
| 998 |
+
"airports_by_cities":{
|
| 999 |
+
"type":"array",
|
| 1000 |
+
"items":{
|
| 1001 |
+
"type":"object",
|
| 1002 |
+
"properties":{
|
| 1003 |
+
"icao_code":{
|
| 1004 |
+
"type":"string"
|
| 1005 |
+
},
|
| 1006 |
+
"country_code":{
|
| 1007 |
+
"type":"string"
|
| 1008 |
+
},
|
| 1009 |
+
"iata_code":{
|
| 1010 |
+
"type":"string"
|
| 1011 |
+
},
|
| 1012 |
+
"lng":{
|
| 1013 |
+
"type":"number"
|
| 1014 |
+
},
|
| 1015 |
+
"city":{
|
| 1016 |
+
"type":"string"
|
| 1017 |
+
},
|
| 1018 |
+
"timezone":{
|
| 1019 |
+
"type":"string"
|
| 1020 |
+
},
|
| 1021 |
+
"name":{
|
| 1022 |
+
"type":"string"
|
| 1023 |
+
},
|
| 1024 |
+
"city_code":{
|
| 1025 |
+
"type":"string"
|
| 1026 |
+
},
|
| 1027 |
+
"slug":{
|
| 1028 |
+
"type":"string"
|
| 1029 |
+
},
|
| 1030 |
+
"lat":{
|
| 1031 |
+
"type":"number"
|
| 1032 |
+
},
|
| 1033 |
+
"popularity":{
|
| 1034 |
+
"type":"integer"
|
| 1035 |
+
}
|
| 1036 |
+
}
|
| 1037 |
+
}
|
| 1038 |
+
},
|
| 1039 |
+
"airports_by_countries":{
|
| 1040 |
+
"type":"array",
|
| 1041 |
+
"items":{
|
| 1042 |
+
"type":"object",
|
| 1043 |
+
"properties":{
|
| 1044 |
+
"icao_code":{
|
| 1045 |
+
"type":"string"
|
| 1046 |
+
},
|
| 1047 |
+
"country_code":{
|
| 1048 |
+
"type":"string"
|
| 1049 |
+
},
|
| 1050 |
+
"iata_code":{
|
| 1051 |
+
"type":"string"
|
| 1052 |
+
},
|
| 1053 |
+
"lng":{
|
| 1054 |
+
"type":"number"
|
| 1055 |
+
},
|
| 1056 |
+
"city":{
|
| 1057 |
+
"type":"string"
|
| 1058 |
+
},
|
| 1059 |
+
"timezone":{
|
| 1060 |
+
"type":"string"
|
| 1061 |
+
},
|
| 1062 |
+
"name":{
|
| 1063 |
+
"type":"string"
|
| 1064 |
+
},
|
| 1065 |
+
"city_code":{
|
| 1066 |
+
"type":"string"
|
| 1067 |
+
},
|
| 1068 |
+
"slug":{
|
| 1069 |
+
"type":"string"
|
| 1070 |
+
},
|
| 1071 |
+
"lat":{
|
| 1072 |
+
"type":"number"
|
| 1073 |
+
},
|
| 1074 |
+
"popularity":{
|
| 1075 |
+
"type":"integer"
|
| 1076 |
+
}
|
| 1077 |
+
}
|
| 1078 |
+
}
|
| 1079 |
+
}
|
| 1080 |
+
}
|
| 1081 |
+
}
|
| 1082 |
+
},
|
| 1083 |
+
{
|
| 1084 |
+
"name":"NearBy Airports API",
|
| 1085 |
+
"url":"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/nearby",
|
| 1086 |
+
"description":"Use the NearBy API to show the nearest departure airport or all available airports in the desired radius.",
|
| 1087 |
+
"method":"GET",
|
| 1088 |
+
"required_parameters":[
|
| 1089 |
+
{
|
| 1090 |
+
"name":"distance",
|
| 1091 |
+
"type":"STRING",
|
| 1092 |
+
"description":"Distance from required Geo location (km)",
|
| 1093 |
+
"default":"20"
|
| 1094 |
+
},
|
| 1095 |
+
{
|
| 1096 |
+
"name":"lng",
|
| 1097 |
+
"type":"STRING",
|
| 1098 |
+
"description":"Geo Longitude",
|
| 1099 |
+
"default":"106.8294"
|
| 1100 |
+
},
|
| 1101 |
+
{
|
| 1102 |
+
"name":"lat",
|
| 1103 |
+
"type":"STRING",
|
| 1104 |
+
"description":"Geo Latitude",
|
| 1105 |
+
"default":"-6.1744"
|
| 1106 |
+
}
|
| 1107 |
+
],
|
| 1108 |
+
"optional_parameters":[],
|
| 1109 |
+
"code":"import requests\n\nurl = \"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/nearby\"\nquerystring = {\"distance\": distance, \"lng\": lng, \"lat\": lat}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iatacodes-iatacodes-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 1110 |
+
"statuscode":200,
|
| 1111 |
+
"body":{
|
| 1112 |
+
"key1":"value",
|
| 1113 |
+
"key2":"value"
|
| 1114 |
+
},
|
| 1115 |
+
"headers":{},
|
| 1116 |
+
"schema":{
|
| 1117 |
+
"type":"object",
|
| 1118 |
+
"properties":{
|
| 1119 |
+
"airports":{
|
| 1120 |
+
"type":"array",
|
| 1121 |
+
"items":{
|
| 1122 |
+
"type":"object",
|
| 1123 |
+
"properties":{
|
| 1124 |
+
"icao_code":{
|
| 1125 |
+
"type":"string"
|
| 1126 |
+
},
|
| 1127 |
+
"country_code":{
|
| 1128 |
+
"type":"string"
|
| 1129 |
+
},
|
| 1130 |
+
"iata_code":{
|
| 1131 |
+
"type":"string"
|
| 1132 |
+
},
|
| 1133 |
+
"lng":{
|
| 1134 |
+
"type":"number"
|
| 1135 |
+
},
|
| 1136 |
+
"city":{
|
| 1137 |
+
"type":"string"
|
| 1138 |
+
},
|
| 1139 |
+
"timezone":{
|
| 1140 |
+
"type":"string"
|
| 1141 |
+
},
|
| 1142 |
+
"name":{
|
| 1143 |
+
"type":"string"
|
| 1144 |
+
},
|
| 1145 |
+
"city_code":{
|
| 1146 |
+
"type":"string"
|
| 1147 |
+
},
|
| 1148 |
+
"slug":{
|
| 1149 |
+
"type":"string"
|
| 1150 |
+
},
|
| 1151 |
+
"lat":{
|
| 1152 |
+
"type":"number"
|
| 1153 |
+
},
|
| 1154 |
+
"popularity":{
|
| 1155 |
+
"type":"integer"
|
| 1156 |
+
},
|
| 1157 |
+
"distance":{
|
| 1158 |
+
"type":"number"
|
| 1159 |
+
}
|
| 1160 |
+
}
|
| 1161 |
+
}
|
| 1162 |
+
},
|
| 1163 |
+
"cities":{
|
| 1164 |
+
"type":"array",
|
| 1165 |
+
"items":{
|
| 1166 |
+
"type":"object",
|
| 1167 |
+
"properties":{
|
| 1168 |
+
"country_code":{
|
| 1169 |
+
"type":"string"
|
| 1170 |
+
},
|
| 1171 |
+
"lng":{
|
| 1172 |
+
"type":"number"
|
| 1173 |
+
},
|
| 1174 |
+
"timezone":{
|
| 1175 |
+
"type":"string"
|
| 1176 |
+
},
|
| 1177 |
+
"name":{
|
| 1178 |
+
"type":"string"
|
| 1179 |
+
},
|
| 1180 |
+
"city_code":{
|
| 1181 |
+
"type":"string"
|
| 1182 |
+
},
|
| 1183 |
+
"slug":{
|
| 1184 |
+
"type":"string"
|
| 1185 |
+
},
|
| 1186 |
+
"lat":{
|
| 1187 |
+
"type":"number"
|
| 1188 |
+
},
|
| 1189 |
+
"popularity":{
|
| 1190 |
+
"type":"integer"
|
| 1191 |
+
},
|
| 1192 |
+
"distance":{
|
| 1193 |
+
"type":"number"
|
| 1194 |
+
}
|
| 1195 |
+
}
|
| 1196 |
+
}
|
| 1197 |
+
}
|
| 1198 |
+
}
|
| 1199 |
+
}
|
| 1200 |
+
},
|
| 1201 |
+
{
|
| 1202 |
+
"name":"Fleets Database API",
|
| 1203 |
+
"url":"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/fleets",
|
| 1204 |
+
"description":"AirLabs Global aircraft database.",
|
| 1205 |
+
"method":"GET",
|
| 1206 |
+
"required_parameters":[],
|
| 1207 |
+
"optional_parameters":[
|
| 1208 |
+
{
|
| 1209 |
+
"name":"airline_iata",
|
| 1210 |
+
"type":"STRING",
|
| 1211 |
+
"description":"Filtering by Airline IATA code",
|
| 1212 |
+
"default":"AA"
|
| 1213 |
+
},
|
| 1214 |
+
{
|
| 1215 |
+
"name":"airline_icao",
|
| 1216 |
+
"type":"STRING",
|
| 1217 |
+
"description":"Filtering by Airline ICAO code",
|
| 1218 |
+
"default":"AAL"
|
| 1219 |
+
}
|
| 1220 |
+
],
|
| 1221 |
+
"code":"import requests\n\nurl = \"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/fleets\"\nquerystring = {\"airline_iata\": airline_iata, \"airline_icao\": airline_icao}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iatacodes-iatacodes-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 1222 |
+
"statuscode":200,
|
| 1223 |
+
"body":{
|
| 1224 |
+
"key1":"value",
|
| 1225 |
+
"key2":"value"
|
| 1226 |
+
},
|
| 1227 |
+
"headers":{},
|
| 1228 |
+
"schema":{}
|
| 1229 |
+
},
|
| 1230 |
+
{
|
| 1231 |
+
"name":"Routes Database API",
|
| 1232 |
+
"url":"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/routes",
|
| 1233 |
+
"description":"Global Airline Routes Database API. \nOnly 1 of the following query parameters is required.",
|
| 1234 |
+
"method":"GET",
|
| 1235 |
+
"required_parameters":[],
|
| 1236 |
+
"optional_parameters":[
|
| 1237 |
+
{
|
| 1238 |
+
"name":"arr_icao",
|
| 1239 |
+
"type":"STRING",
|
| 1240 |
+
"description":"Arrival Airport ICAO Code",
|
| 1241 |
+
"default":"OMAA"
|
| 1242 |
+
},
|
| 1243 |
+
{
|
| 1244 |
+
"name":"airline_icao",
|
| 1245 |
+
"type":"STRING",
|
| 1246 |
+
"description":"Airline ICAO Code",
|
| 1247 |
+
"default":"ALK"
|
| 1248 |
+
},
|
| 1249 |
+
{
|
| 1250 |
+
"name":"dep_iata",
|
| 1251 |
+
"type":"STRING",
|
| 1252 |
+
"description":"Departure Airport IATA Code",
|
| 1253 |
+
"default":"CMB"
|
| 1254 |
+
},
|
| 1255 |
+
{
|
| 1256 |
+
"name":"dep_icao",
|
| 1257 |
+
"type":"STRING",
|
| 1258 |
+
"description":"Departure Airport ICAO Code",
|
| 1259 |
+
"default":"VCBI"
|
| 1260 |
+
},
|
| 1261 |
+
{
|
| 1262 |
+
"name":"arr_iata",
|
| 1263 |
+
"type":"STRING",
|
| 1264 |
+
"description":"Arrival Airport IATA Code",
|
| 1265 |
+
"default":"AUH"
|
| 1266 |
+
},
|
| 1267 |
+
{
|
| 1268 |
+
"name":"airline_iata",
|
| 1269 |
+
"type":"STRING",
|
| 1270 |
+
"description":"Airline IATA Code",
|
| 1271 |
+
"default":"UL"
|
| 1272 |
+
}
|
| 1273 |
+
],
|
| 1274 |
+
"code":"import requests\n\nurl = \"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/routes\"\nquerystring = {\"arr_icao\": arr_icao, \"airline_icao\": airline_icao, \"dep_iata\": dep_iata, \"dep_icao\": dep_icao, \"arr_iata\": arr_iata, \"airline_iata\": airline_iata}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iatacodes-iatacodes-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 1275 |
+
"statuscode":200,
|
| 1276 |
+
"body":{
|
| 1277 |
+
"key1":"value",
|
| 1278 |
+
"key2":"value"
|
| 1279 |
+
},
|
| 1280 |
+
"headers":{},
|
| 1281 |
+
"schema":{}
|
| 1282 |
+
},
|
| 1283 |
+
{
|
| 1284 |
+
"name":"Real-Time Flight Tracking API",
|
| 1285 |
+
"url":"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/flights",
|
| 1286 |
+
"description":"Using the Flight API, you can track flights and show them on maps in your own products.",
|
| 1287 |
+
"method":"GET",
|
| 1288 |
+
"required_parameters":[],
|
| 1289 |
+
"optional_parameters":[
|
| 1290 |
+
{
|
| 1291 |
+
"name":"bbox",
|
| 1292 |
+
"type":"STRING",
|
| 1293 |
+
"description":"Bounding box of your map view",
|
| 1294 |
+
"default":"46.01,-12.21,56.84,9.66"
|
| 1295 |
+
}
|
| 1296 |
+
],
|
| 1297 |
+
"code":"import requests\n\nurl = \"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/flights\"\nquerystring = {\"bbox\": bbox}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"iatacodes-iatacodes-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 1298 |
+
"statuscode":200,
|
| 1299 |
+
"body":{
|
| 1300 |
+
"key1":"value",
|
| 1301 |
+
"key2":"value"
|
| 1302 |
+
},
|
| 1303 |
+
"headers":{},
|
| 1304 |
+
"schema":{
|
| 1305 |
+
"type":"array",
|
| 1306 |
+
"items":{
|
| 1307 |
+
"type":"object",
|
| 1308 |
+
"properties":{
|
| 1309 |
+
"hex":{
|
| 1310 |
+
"type":"string"
|
| 1311 |
+
},
|
| 1312 |
+
"reg_number":{
|
| 1313 |
+
"type":"string"
|
| 1314 |
+
},
|
| 1315 |
+
"flag":{
|
| 1316 |
+
"type":"string"
|
| 1317 |
+
},
|
| 1318 |
+
"lat":{
|
| 1319 |
+
"type":"number"
|
| 1320 |
+
},
|
| 1321 |
+
"lng":{
|
| 1322 |
+
"type":"number"
|
| 1323 |
+
},
|
| 1324 |
+
"alt":{
|
| 1325 |
+
"type":"integer"
|
| 1326 |
+
},
|
| 1327 |
+
"dir":{
|
| 1328 |
+
"type":"integer"
|
| 1329 |
+
},
|
| 1330 |
+
"speed":{
|
| 1331 |
+
"type":"integer"
|
| 1332 |
+
},
|
| 1333 |
+
"v_speed":{
|
| 1334 |
+
"type":"number"
|
| 1335 |
+
},
|
| 1336 |
+
"squawk":{
|
| 1337 |
+
"type":"string"
|
| 1338 |
+
},
|
| 1339 |
+
"flight_number":{
|
| 1340 |
+
"type":"string"
|
| 1341 |
+
},
|
| 1342 |
+
"flight_icao":{
|
| 1343 |
+
"type":"string"
|
| 1344 |
+
},
|
| 1345 |
+
"flight_iata":{
|
| 1346 |
+
"type":"string"
|
| 1347 |
+
},
|
| 1348 |
+
"dep_icao":{
|
| 1349 |
+
"type":"string"
|
| 1350 |
+
},
|
| 1351 |
+
"dep_iata":{
|
| 1352 |
+
"type":"string"
|
| 1353 |
+
},
|
| 1354 |
+
"arr_icao":{
|
| 1355 |
+
"type":"string"
|
| 1356 |
+
},
|
| 1357 |
+
"arr_iata":{
|
| 1358 |
+
"type":"string"
|
| 1359 |
+
},
|
| 1360 |
+
"airline_icao":{
|
| 1361 |
+
"type":"string"
|
| 1362 |
+
},
|
| 1363 |
+
"airline_iata":{
|
| 1364 |
+
"type":"string"
|
| 1365 |
+
},
|
| 1366 |
+
"aircraft_icao":{
|
| 1367 |
+
"type":"string"
|
| 1368 |
+
},
|
| 1369 |
+
"updated":{
|
| 1370 |
+
"type":"integer"
|
| 1371 |
+
},
|
| 1372 |
+
"status":{
|
| 1373 |
+
"type":"string"
|
| 1374 |
+
}
|
| 1375 |
+
}
|
| 1376 |
+
}
|
| 1377 |
+
}
|
| 1378 |
+
}
|
| 1379 |
+
]
|
| 1380 |
+
}
|
toolbench/toolenv/tools/Travel/iatacodes/api.py
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def airports_database_api(iata_code: str='CDG', icao_code: str='LFPG', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Airport data is fundamental to any aviation-related business.
|
| 12 |
+
Learn how to use the Airport Database API in your products."
|
| 13 |
+
iata_code: Filtering by Airport IATA code.
|
| 14 |
+
icao_code: Filtering by Airport ICAO code.
|
| 15 |
+
|
| 16 |
+
"""
|
| 17 |
+
url = f"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/airports"
|
| 18 |
+
querystring = {}
|
| 19 |
+
if iata_code:
|
| 20 |
+
querystring['iata_code'] = iata_code
|
| 21 |
+
if icao_code:
|
| 22 |
+
querystring['icao_code'] = icao_code
|
| 23 |
+
|
| 24 |
+
headers = {
|
| 25 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 26 |
+
"X-RapidAPI-Host": "iatacodes-iatacodes-v1.p.rapidapi.com"
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 31 |
+
try:
|
| 32 |
+
observation = response.json()
|
| 33 |
+
except:
|
| 34 |
+
observation = response.text
|
| 35 |
+
return observation
|
| 36 |
+
|
| 37 |
+
def airlines_database_api(icao_code: str='AAL', iata_code: str='AA', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 38 |
+
"""
|
| 39 |
+
"AirLabs Airline data is the most essential data for any travel startup and companies related to the aviation industry."
|
| 40 |
+
icao_code: Filtering by Airline ICAO code
|
| 41 |
+
iata_code: Filtering by Airline IATA code
|
| 42 |
+
|
| 43 |
+
"""
|
| 44 |
+
url = f"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/airlines"
|
| 45 |
+
querystring = {}
|
| 46 |
+
if icao_code:
|
| 47 |
+
querystring['icao_code'] = icao_code
|
| 48 |
+
if iata_code:
|
| 49 |
+
querystring['iata_code'] = iata_code
|
| 50 |
+
|
| 51 |
+
headers = {
|
| 52 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 53 |
+
"X-RapidAPI-Host": "iatacodes-iatacodes-v1.p.rapidapi.com"
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 58 |
+
try:
|
| 59 |
+
observation = response.json()
|
| 60 |
+
except:
|
| 61 |
+
observation = response.text
|
| 62 |
+
return observation
|
| 63 |
+
|
| 64 |
+
def cities_database_api(city_code: str='SIN', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 65 |
+
"""
|
| 66 |
+
"City data complements and enhances airport data, if you need to create features that are independent of airports, you can use cities to replace them, and you can also combine them."
|
| 67 |
+
city_code: Filtering by IATA City code
|
| 68 |
+
|
| 69 |
+
"""
|
| 70 |
+
url = f"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/cities"
|
| 71 |
+
querystring = {}
|
| 72 |
+
if city_code:
|
| 73 |
+
querystring['city_code'] = city_code
|
| 74 |
+
|
| 75 |
+
headers = {
|
| 76 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 77 |
+
"X-RapidAPI-Host": "iatacodes-iatacodes-v1.p.rapidapi.com"
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 82 |
+
try:
|
| 83 |
+
observation = response.json()
|
| 84 |
+
except:
|
| 85 |
+
observation = response.text
|
| 86 |
+
return observation
|
| 87 |
+
|
| 88 |
+
def live_flight_schedules_api(dep_icao: str='KMIA', arr_iata: str='SFO', airline_iata: str='BA', arr_icao: str='KSFO', airline_icao: str='BAW', dep_iata: str='MIA', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 89 |
+
"""
|
| 90 |
+
"The live schedules provide an information about the current status of the departure and arrival flights."
|
| 91 |
+
|
| 92 |
+
"""
|
| 93 |
+
url = f"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/schedules"
|
| 94 |
+
querystring = {}
|
| 95 |
+
if dep_icao:
|
| 96 |
+
querystring['dep_icao'] = dep_icao
|
| 97 |
+
if arr_iata:
|
| 98 |
+
querystring['arr_iata'] = arr_iata
|
| 99 |
+
if airline_iata:
|
| 100 |
+
querystring['airline_iata'] = airline_iata
|
| 101 |
+
if arr_icao:
|
| 102 |
+
querystring['arr_icao'] = arr_icao
|
| 103 |
+
if airline_icao:
|
| 104 |
+
querystring['airline_icao'] = airline_icao
|
| 105 |
+
if dep_iata:
|
| 106 |
+
querystring['dep_iata'] = dep_iata
|
| 107 |
+
|
| 108 |
+
headers = {
|
| 109 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 110 |
+
"X-RapidAPI-Host": "iatacodes-iatacodes-v1.p.rapidapi.com"
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 115 |
+
try:
|
| 116 |
+
observation = response.json()
|
| 117 |
+
except:
|
| 118 |
+
observation = response.text
|
| 119 |
+
return observation
|
| 120 |
+
|
| 121 |
+
def flight_information_api(flight_icao: str='AAL6', flight_iata: str='AA6', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 122 |
+
"""
|
| 123 |
+
"Single flight detailed information by flight number with ICAO or IATA prefix."
|
| 124 |
+
|
| 125 |
+
"""
|
| 126 |
+
url = f"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/flight"
|
| 127 |
+
querystring = {}
|
| 128 |
+
if flight_icao:
|
| 129 |
+
querystring['flight_icao'] = flight_icao
|
| 130 |
+
if flight_iata:
|
| 131 |
+
querystring['flight_iata'] = flight_iata
|
| 132 |
+
|
| 133 |
+
headers = {
|
| 134 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 135 |
+
"X-RapidAPI-Host": "iatacodes-iatacodes-v1.p.rapidapi.com"
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 140 |
+
try:
|
| 141 |
+
observation = response.json()
|
| 142 |
+
except:
|
| 143 |
+
observation = response.text
|
| 144 |
+
return observation
|
| 145 |
+
|
| 146 |
+
def name_suggestion_api(term: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 147 |
+
"""
|
| 148 |
+
"Travel destination autocomplete API."
|
| 149 |
+
term: **term** or **q** or **query** or **s** or **search** or **text**
|
| 150 |
+
|
| 151 |
+
Part of the destination name - airport, city or country.
|
| 152 |
+
Between 3 and 30 characters
|
| 153 |
+
|
| 154 |
+
"""
|
| 155 |
+
url = f"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/suggest"
|
| 156 |
+
querystring = {'term': term, }
|
| 157 |
+
|
| 158 |
+
headers = {
|
| 159 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 160 |
+
"X-RapidAPI-Host": "iatacodes-iatacodes-v1.p.rapidapi.com"
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 165 |
+
try:
|
| 166 |
+
observation = response.json()
|
| 167 |
+
except:
|
| 168 |
+
observation = response.text
|
| 169 |
+
return observation
|
| 170 |
+
|
| 171 |
+
def nearby_airports_api(distance: str, lng: str, lat: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 172 |
+
"""
|
| 173 |
+
"Use the NearBy API to show the nearest departure airport or all available airports in the desired radius."
|
| 174 |
+
distance: Distance from required Geo location (km)
|
| 175 |
+
lng: Geo Longitude
|
| 176 |
+
lat: Geo Latitude
|
| 177 |
+
|
| 178 |
+
"""
|
| 179 |
+
url = f"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/nearby"
|
| 180 |
+
querystring = {'distance': distance, 'lng': lng, 'lat': lat, }
|
| 181 |
+
|
| 182 |
+
headers = {
|
| 183 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 184 |
+
"X-RapidAPI-Host": "iatacodes-iatacodes-v1.p.rapidapi.com"
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 189 |
+
try:
|
| 190 |
+
observation = response.json()
|
| 191 |
+
except:
|
| 192 |
+
observation = response.text
|
| 193 |
+
return observation
|
| 194 |
+
|
| 195 |
+
def fleets_database_api(airline_iata: str='AA', airline_icao: str='AAL', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 196 |
+
"""
|
| 197 |
+
"AirLabs Global aircraft database."
|
| 198 |
+
airline_iata: Filtering by Airline IATA code
|
| 199 |
+
airline_icao: Filtering by Airline ICAO code
|
| 200 |
+
|
| 201 |
+
"""
|
| 202 |
+
url = f"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/fleets"
|
| 203 |
+
querystring = {}
|
| 204 |
+
if airline_iata:
|
| 205 |
+
querystring['airline_iata'] = airline_iata
|
| 206 |
+
if airline_icao:
|
| 207 |
+
querystring['airline_icao'] = airline_icao
|
| 208 |
+
|
| 209 |
+
headers = {
|
| 210 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 211 |
+
"X-RapidAPI-Host": "iatacodes-iatacodes-v1.p.rapidapi.com"
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 216 |
+
try:
|
| 217 |
+
observation = response.json()
|
| 218 |
+
except:
|
| 219 |
+
observation = response.text
|
| 220 |
+
return observation
|
| 221 |
+
|
| 222 |
+
def routes_database_api(arr_icao: str='OMAA', airline_icao: str='ALK', dep_iata: str='CMB', dep_icao: str='VCBI', arr_iata: str='AUH', airline_iata: str='UL', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 223 |
+
"""
|
| 224 |
+
"Global Airline Routes Database API.
|
| 225 |
+
Only 1 of the following query parameters is required."
|
| 226 |
+
arr_icao: Arrival Airport ICAO Code
|
| 227 |
+
airline_icao: Airline ICAO Code
|
| 228 |
+
dep_iata: Departure Airport IATA Code
|
| 229 |
+
dep_icao: Departure Airport ICAO Code
|
| 230 |
+
arr_iata: Arrival Airport IATA Code
|
| 231 |
+
airline_iata: Airline IATA Code
|
| 232 |
+
|
| 233 |
+
"""
|
| 234 |
+
url = f"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/routes"
|
| 235 |
+
querystring = {}
|
| 236 |
+
if arr_icao:
|
| 237 |
+
querystring['arr_icao'] = arr_icao
|
| 238 |
+
if airline_icao:
|
| 239 |
+
querystring['airline_icao'] = airline_icao
|
| 240 |
+
if dep_iata:
|
| 241 |
+
querystring['dep_iata'] = dep_iata
|
| 242 |
+
if dep_icao:
|
| 243 |
+
querystring['dep_icao'] = dep_icao
|
| 244 |
+
if arr_iata:
|
| 245 |
+
querystring['arr_iata'] = arr_iata
|
| 246 |
+
if airline_iata:
|
| 247 |
+
querystring['airline_iata'] = airline_iata
|
| 248 |
+
|
| 249 |
+
headers = {
|
| 250 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 251 |
+
"X-RapidAPI-Host": "iatacodes-iatacodes-v1.p.rapidapi.com"
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 256 |
+
try:
|
| 257 |
+
observation = response.json()
|
| 258 |
+
except:
|
| 259 |
+
observation = response.text
|
| 260 |
+
return observation
|
| 261 |
+
|
| 262 |
+
def real_time_flight_tracking_api(bbox: str='46.01,-12.21,56.84,9.66', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 263 |
+
"""
|
| 264 |
+
"Using the Flight API, you can track flights and show them on maps in your own products."
|
| 265 |
+
bbox: Bounding box of your map view
|
| 266 |
+
|
| 267 |
+
"""
|
| 268 |
+
url = f"https://iatacodes-iatacodes-v1.p.rapidapi.com/api/v9/flights"
|
| 269 |
+
querystring = {}
|
| 270 |
+
if bbox:
|
| 271 |
+
querystring['bbox'] = bbox
|
| 272 |
+
|
| 273 |
+
headers = {
|
| 274 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 275 |
+
"X-RapidAPI-Host": "iatacodes-iatacodes-v1.p.rapidapi.com"
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
|
| 279 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 280 |
+
try:
|
| 281 |
+
observation = response.json()
|
| 282 |
+
except:
|
| 283 |
+
observation = response.text
|
| 284 |
+
return observation
|
| 285 |
+
|
toolbench/toolenv/tools/Travel/indian_railway_pnr_status.json
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"product_id": "api_5e7038b2-912d-4914-bba3-ec82741cfbb3",
|
| 3 |
+
"tool_description": "Rest API to get the PNR Details of Indian Railway Easily.",
|
| 4 |
+
"home_url": "https://rapidapi.com/jerry.rahul2/api/indian-railway-pnr-status/",
|
| 5 |
+
"name": "Indian Railway PNR Status",
|
| 6 |
+
"title": "Indian Railway PNR Status",
|
| 7 |
+
"pricing": "FREEMIUM",
|
| 8 |
+
"tool_name": "Indian Railway PNR Status",
|
| 9 |
+
"score": null,
|
| 10 |
+
"host": "indian-railway-pnr-status.p.rapidapi.com",
|
| 11 |
+
"api_list": [
|
| 12 |
+
{
|
| 13 |
+
"name": "PNR Status",
|
| 14 |
+
"url": "https://indian-railway-pnr-status.p.rapidapi.com/pnr-status",
|
| 15 |
+
"description": "Accept the valid PNR number as param and returns the PNR details as JSON.",
|
| 16 |
+
"method": "POST",
|
| 17 |
+
"required_parameters": [
|
| 18 |
+
{
|
| 19 |
+
"name": "pnr_number",
|
| 20 |
+
"type": "NUMBER",
|
| 21 |
+
"description": "Valid 10 Digit PNR Number",
|
| 22 |
+
"default": "6504558282"
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"name": "api_key",
|
| 26 |
+
"type": "STRING",
|
| 27 |
+
"description": "User API Key. It is mandatory to generate an API key from [https://tools.emptycode.in](url)",
|
| 28 |
+
"default": ""
|
| 29 |
+
}
|
| 30 |
+
],
|
| 31 |
+
"optional_parameters": [],
|
| 32 |
+
"code": "import requests\n\nurl = \"https://indian-railway-pnr-status.p.rapidapi.com/pnr-status\"\nquerystring = {\"pnr_number\": \"6504558282\", \"api_key\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"indian-railway-pnr-status.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 33 |
+
"convert_code": "import requests\n\nurl = \"https://indian-railway-pnr-status.p.rapidapi.com/pnr-status\"\nquerystring = {\"pnr_number\": \"6504558282\", \"api_key\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"indian-railway-pnr-status.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 34 |
+
"test_endpoint": "",
|
| 35 |
+
"statuscode": 200,
|
| 36 |
+
"schema": {
|
| 37 |
+
"type": "object",
|
| 38 |
+
"properties": {
|
| 39 |
+
"status": {
|
| 40 |
+
"type": "string"
|
| 41 |
+
},
|
| 42 |
+
"pnr_details": {
|
| 43 |
+
"type": "object",
|
| 44 |
+
"properties": {
|
| 45 |
+
"pnr_number": {
|
| 46 |
+
"type": "string"
|
| 47 |
+
},
|
| 48 |
+
"train_name": {
|
| 49 |
+
"type": "string"
|
| 50 |
+
},
|
| 51 |
+
"train_number": {
|
| 52 |
+
"type": "string"
|
| 53 |
+
},
|
| 54 |
+
"class": {
|
| 55 |
+
"type": "string"
|
| 56 |
+
},
|
| 57 |
+
"no_of_passengers": {
|
| 58 |
+
"type": "integer"
|
| 59 |
+
},
|
| 60 |
+
"quota": {
|
| 61 |
+
"type": "string"
|
| 62 |
+
},
|
| 63 |
+
"pass_info": {
|
| 64 |
+
"type": "array",
|
| 65 |
+
"items": {
|
| 66 |
+
"type": "object",
|
| 67 |
+
"properties": {
|
| 68 |
+
"passenger_name": {
|
| 69 |
+
"type": "string"
|
| 70 |
+
},
|
| 71 |
+
"booking_status_details": {
|
| 72 |
+
"type": "string"
|
| 73 |
+
},
|
| 74 |
+
"current_status_details": {
|
| 75 |
+
"type": "string"
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
},
|
| 80 |
+
"boarding_station": {
|
| 81 |
+
"type": "object",
|
| 82 |
+
"properties": {
|
| 83 |
+
"station_code": {
|
| 84 |
+
"type": "string"
|
| 85 |
+
},
|
| 86 |
+
"station_name": {
|
| 87 |
+
"type": "string"
|
| 88 |
+
},
|
| 89 |
+
"date": {
|
| 90 |
+
"type": "string"
|
| 91 |
+
},
|
| 92 |
+
"time": {
|
| 93 |
+
"type": "string"
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
},
|
| 97 |
+
"reservation_upto": {
|
| 98 |
+
"type": "object",
|
| 99 |
+
"properties": {
|
| 100 |
+
"station_code": {
|
| 101 |
+
"type": "string"
|
| 102 |
+
},
|
| 103 |
+
"station_name": {
|
| 104 |
+
"type": "string"
|
| 105 |
+
},
|
| 106 |
+
"date": {
|
| 107 |
+
"type": "string"
|
| 108 |
+
},
|
| 109 |
+
"time": {
|
| 110 |
+
"type": "string"
|
| 111 |
+
}
|
| 112 |
+
}
|
| 113 |
+
},
|
| 114 |
+
"travel_time": {
|
| 115 |
+
"type": "string"
|
| 116 |
+
},
|
| 117 |
+
"chart_status": {
|
| 118 |
+
"type": "boolean"
|
| 119 |
+
}
|
| 120 |
+
}
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|
| 124 |
+
}
|
| 125 |
+
]
|
| 126 |
+
}
|
toolbench/toolenv/tools/Travel/irail.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"product_id": "53aa572de4b0596140340b74",
|
| 3 |
+
"tool_description": "Search for train trips in Belgium using the iRail API. You can search for train departures in a certain station and search for all the stations in Belgium.",
|
| 4 |
+
"home_url": "https://rapidapi.com/pietercolpaert/api/irail/",
|
| 5 |
+
"name": "iRail",
|
| 6 |
+
"title": "iRail",
|
| 7 |
+
"pricing": "FREE",
|
| 8 |
+
"tool_name": "iRail",
|
| 9 |
+
"score": {
|
| 10 |
+
"avgServiceLevel": 100,
|
| 11 |
+
"avgLatency": 574,
|
| 12 |
+
"avgSuccessRate": 100,
|
| 13 |
+
"popularityScore": 8.1,
|
| 14 |
+
"__typename": "Score"
|
| 15 |
+
},
|
| 16 |
+
"host": "irail.p.rapidapi.com",
|
| 17 |
+
"api_list": [
|
| 18 |
+
{
|
| 19 |
+
"name": "Departures",
|
| 20 |
+
"url": "https://irail.p.rapidapi.com/NMBS/Departures/Gent Sint-Pieters/2013/11/02/13/02.json",
|
| 21 |
+
"description": "Departures of trains in Belgium",
|
| 22 |
+
"method": "GET",
|
| 23 |
+
"required_parameters": [
|
| 24 |
+
{
|
| 25 |
+
"name": "stationname",
|
| 26 |
+
"type": "STRING",
|
| 27 |
+
"description": "You can find the appropriate names in the Stations list",
|
| 28 |
+
"default": "Gent Sint-Pieters"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"name": "year",
|
| 32 |
+
"type": "STRING",
|
| 33 |
+
"description": "The year you want to query",
|
| 34 |
+
"default": "2013"
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"name": "month",
|
| 38 |
+
"type": "STRING",
|
| 39 |
+
"description": "The number of the month",
|
| 40 |
+
"default": "11"
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name": "day",
|
| 44 |
+
"type": "STRING",
|
| 45 |
+
"description": "The number of the day",
|
| 46 |
+
"default": "02"
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"name": "hour",
|
| 50 |
+
"type": "STRING",
|
| 51 |
+
"description": "The number of hours in 24h style",
|
| 52 |
+
"default": "13"
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"name": "minutes",
|
| 56 |
+
"type": "STRING",
|
| 57 |
+
"description": "The minutes you want to retrieve responses from",
|
| 58 |
+
"default": "02"
|
| 59 |
+
}
|
| 60 |
+
],
|
| 61 |
+
"optional_parameters": [],
|
| 62 |
+
"code": "import requests\n\nurl = \"https://irail.p.rapidapi.com/NMBS/Departures/Gent Sint-Pieters/2013/11/02/13/02.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irail.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())\n",
|
| 63 |
+
"convert_code": "import requests\n\nurl = \"https://irail.p.rapidapi.com/NMBS/Departures/{stationname}/{year}/{month}/{day}/{hour}/{minutes}.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irail.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())\n",
|
| 64 |
+
"test_endpoint": "",
|
| 65 |
+
"statuscode": 1,
|
| 66 |
+
"schema": ""
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"name": "Stations list",
|
| 70 |
+
"url": "https://irail.p.rapidapi.com/NMBS/Stations.json",
|
| 71 |
+
"description": "",
|
| 72 |
+
"method": "GET",
|
| 73 |
+
"required_parameters": [],
|
| 74 |
+
"optional_parameters": [],
|
| 75 |
+
"code": "import requests\n\nurl = \"https://irail.p.rapidapi.com/NMBS/Stations.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irail.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())\n",
|
| 76 |
+
"convert_code": "import requests\n\nurl = \"https://irail.p.rapidapi.com/NMBS/Stations.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irail.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())\n",
|
| 77 |
+
"test_endpoint": "",
|
| 78 |
+
"statuscode": 1,
|
| 79 |
+
"schema": ""
|
| 80 |
+
}
|
| 81 |
+
],
|
| 82 |
+
"standardized_name": "irail"
|
| 83 |
+
}
|
toolbench/toolenv/tools/Travel/irail/api.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def departures(stationname: str, year: str, month: str, day: str, hour: str, minutes: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Departures of trains in Belgium"
|
| 12 |
+
stationname: You can find the appropriate names in the Stations list
|
| 13 |
+
year: The year you want to query
|
| 14 |
+
month: The number of the month
|
| 15 |
+
day: The number of the day
|
| 16 |
+
hour: The number of hours in 24h style
|
| 17 |
+
minutes: The minutes you want to retrieve responses from
|
| 18 |
+
|
| 19 |
+
"""
|
| 20 |
+
url = f"https://irail.p.rapidapi.com/nmbs/departures/{stationname}/{year}/{month}/{day}/{hour}/{minutes}.json"
|
| 21 |
+
querystring = {}
|
| 22 |
+
|
| 23 |
+
headers = {
|
| 24 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 25 |
+
"X-RapidAPI-Host": "irail.p.rapidapi.com"
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 30 |
+
try:
|
| 31 |
+
observation = response.json()
|
| 32 |
+
except:
|
| 33 |
+
observation = response.text
|
| 34 |
+
return observation
|
| 35 |
+
|
| 36 |
+
def stations_list(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 37 |
+
"""
|
| 38 |
+
""
|
| 39 |
+
|
| 40 |
+
"""
|
| 41 |
+
url = f"https://irail.p.rapidapi.com/nmbs/stations.json"
|
| 42 |
+
querystring = {}
|
| 43 |
+
|
| 44 |
+
headers = {
|
| 45 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 46 |
+
"X-RapidAPI-Host": "irail.p.rapidapi.com"
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 51 |
+
try:
|
| 52 |
+
observation = response.json()
|
| 53 |
+
except:
|
| 54 |
+
observation = response.text
|
| 55 |
+
return observation
|
| 56 |
+
|
toolbench/toolenv/tools/Travel/irctc.json
ADDED
|
@@ -0,0 +1,1334 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"IRCTC",
|
| 3 |
+
"tool_description":"An API with various functionalities for Indian railways IRCTC API. We are not affiliated with Indian railways IRCTC in any form, and this is not an official API, but all the results are real-time and accurate. You can get in touch with us at https://t.me/rapidapisupport. For payment related inquiries, APIs and customised plans.",
|
| 4 |
+
"title":"IRCTC",
|
| 5 |
+
"pricing":"FREEMIUM",
|
| 6 |
+
"score":{
|
| 7 |
+
"avgServiceLevel":100,
|
| 8 |
+
"avgLatency":1644,
|
| 9 |
+
"avgSuccessRate":100,
|
| 10 |
+
"popularityScore":9.9,
|
| 11 |
+
"__typename":"Score"
|
| 12 |
+
},
|
| 13 |
+
"home_url":"https://rapidapi.com/IRCTCAPI/api/irctc1/",
|
| 14 |
+
"host":"irctc1.p.rapidapi.com",
|
| 15 |
+
"api_list":[
|
| 16 |
+
{
|
| 17 |
+
"name":"CheckSeatAvailability",
|
| 18 |
+
"url":"https://irctc1.p.rapidapi.com/api/v1/checkSeatAvailability",
|
| 19 |
+
"description":"-",
|
| 20 |
+
"method":"GET",
|
| 21 |
+
"required_parameters":[
|
| 22 |
+
{
|
| 23 |
+
"name":"quota",
|
| 24 |
+
"type":"STRING",
|
| 25 |
+
"description":"",
|
| 26 |
+
"default":"GN"
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"name":"trainNo",
|
| 30 |
+
"type":"NUMBER",
|
| 31 |
+
"description":"",
|
| 32 |
+
"default":"19038"
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"name":"toStationCode",
|
| 36 |
+
"type":"STRING",
|
| 37 |
+
"description":"",
|
| 38 |
+
"default":"BVI"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"name":"fromStationCode",
|
| 42 |
+
"type":"STRING",
|
| 43 |
+
"description":"",
|
| 44 |
+
"default":"ST"
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"name":"date",
|
| 48 |
+
"type":"DATE (YYYY-MM-DD)",
|
| 49 |
+
"description":"",
|
| 50 |
+
"default":""
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"name":"classType",
|
| 54 |
+
"type":"STRING",
|
| 55 |
+
"description":"",
|
| 56 |
+
"default":"2A"
|
| 57 |
+
}
|
| 58 |
+
],
|
| 59 |
+
"optional_parameters":[],
|
| 60 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v1/checkSeatAvailability\"\nquerystring = {\"quota\": quota, \"trainNo\": trainno, \"toStationCode\": tostationcode, \"fromStationCode\": fromstationcode, \"date\": date, \"classType\": classtype}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 61 |
+
"statuscode":200,
|
| 62 |
+
"body":{},
|
| 63 |
+
"headers":{},
|
| 64 |
+
"schema":{}
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"name":"Get Live Station",
|
| 68 |
+
"url":"https://irctc1.p.rapidapi.com/api/v3/getLiveStation",
|
| 69 |
+
"description":"-",
|
| 70 |
+
"method":"GET",
|
| 71 |
+
"required_parameters":[
|
| 72 |
+
{
|
| 73 |
+
"name":"hours",
|
| 74 |
+
"type":"ENUM",
|
| 75 |
+
"description":"",
|
| 76 |
+
"default":""
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"name":"fromStationCode",
|
| 80 |
+
"type":"STRING",
|
| 81 |
+
"description":"",
|
| 82 |
+
"default":""
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"name":"toStationCode",
|
| 86 |
+
"type":"STRING",
|
| 87 |
+
"description":"",
|
| 88 |
+
"default":""
|
| 89 |
+
}
|
| 90 |
+
],
|
| 91 |
+
"optional_parameters":[],
|
| 92 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v3/getLiveStation\"\nquerystring = {\"hours\": hours, \"fromStationCode\": fromstationcode, \"toStationCode\": tostationcode}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 93 |
+
"statuscode":111,
|
| 94 |
+
"body":"",
|
| 95 |
+
"headers":"",
|
| 96 |
+
"schema":""
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"name":"GetTrainClasses",
|
| 100 |
+
"url":"https://irctc1.p.rapidapi.com/api/v1/getTrainClasses",
|
| 101 |
+
"description":" ",
|
| 102 |
+
"method":"GET",
|
| 103 |
+
"required_parameters":[
|
| 104 |
+
{
|
| 105 |
+
"name":"trainNo",
|
| 106 |
+
"type":"NUMBER",
|
| 107 |
+
"description":"",
|
| 108 |
+
"default":19038
|
| 109 |
+
}
|
| 110 |
+
],
|
| 111 |
+
"optional_parameters":[],
|
| 112 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v1/getTrainClasses\"\nquerystring = {\"trainNo\": trainno}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 113 |
+
"statuscode":200,
|
| 114 |
+
"body":{},
|
| 115 |
+
"headers":{},
|
| 116 |
+
"schema":{}
|
| 117 |
+
},
|
| 118 |
+
{
|
| 119 |
+
"name":"Get PNR Status V3",
|
| 120 |
+
"url":"https://irctc1.p.rapidapi.com/api/v3/getPNRStatus",
|
| 121 |
+
"description":"-",
|
| 122 |
+
"method":"GET",
|
| 123 |
+
"required_parameters":[
|
| 124 |
+
{
|
| 125 |
+
"name":"pnrNumber",
|
| 126 |
+
"type":"STRING",
|
| 127 |
+
"description":"",
|
| 128 |
+
"default":""
|
| 129 |
+
}
|
| 130 |
+
],
|
| 131 |
+
"optional_parameters":[],
|
| 132 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v3/getPNRStatus\"\nquerystring = {\"pnrNumber\": pnrnumber}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 133 |
+
"statuscode":200,
|
| 134 |
+
"body":{
|
| 135 |
+
"status":true,
|
| 136 |
+
"message":"Success",
|
| 137 |
+
"timestamp":1662104408060,
|
| 138 |
+
"data":{
|
| 139 |
+
"Pnr":"4335734389",
|
| 140 |
+
"TrainNo":"17221",
|
| 141 |
+
"TrainName":"COA LTT EXPRESS",
|
| 142 |
+
"Doj":"03-09-2022",
|
| 143 |
+
"BookingDate":"27-08-2022",
|
| 144 |
+
"Quota":"GN",
|
| 145 |
+
"DestinationDoj":"03-09-2022",
|
| 146 |
+
"SourceDoj":"03-09-2022",
|
| 147 |
+
"From":"CCT",
|
| 148 |
+
"To":"SC",
|
| 149 |
+
"ReservationUpto":"SC",
|
| 150 |
+
"BoardingPoint":"CCT",
|
| 151 |
+
"Class":"3A",
|
| 152 |
+
"ChartPrepared":false,
|
| 153 |
+
"BoardingStationName":"Kakinada Town",
|
| 154 |
+
"TrainStatus":"",
|
| 155 |
+
"TrainCancelledFlag":false,
|
| 156 |
+
"ReservationUptoName":"Secunderabad Junction",
|
| 157 |
+
"PassengerCount":1,
|
| 158 |
+
"PassengerStatus":[
|
| 159 |
+
{
|
| 160 |
+
"Pnr":null,
|
| 161 |
+
"Number":1,
|
| 162 |
+
"Prediction":null,
|
| 163 |
+
"PredictionPercentage":"100",
|
| 164 |
+
"ConfirmTktStatus":"Confirm",
|
| 165 |
+
"Coach":"B5",
|
| 166 |
+
"Berth":55,
|
| 167 |
+
"BookingStatus":"CNF B5 55",
|
| 168 |
+
"CurrentStatus":"CNF",
|
| 169 |
+
"CoachPosition":null,
|
| 170 |
+
"BookingBerthNo":"55",
|
| 171 |
+
"BookingCoachId":"B5",
|
| 172 |
+
"BookingStatusNew":"CNF",
|
| 173 |
+
"BookingStatusIndex":"0",
|
| 174 |
+
"CurrentBerthNo":"",
|
| 175 |
+
"CurrentCoachId":"",
|
| 176 |
+
"BookingBerthCode":"SL",
|
| 177 |
+
"CurrentBerthCode":null,
|
| 178 |
+
"CurrentStatusNew":"CNF",
|
| 179 |
+
"CurrentStatusIndex":"0"
|
| 180 |
+
}
|
| 181 |
+
],
|
| 182 |
+
"DepartureTime":"09:08",
|
| 183 |
+
"ArrivalTime":"20:20",
|
| 184 |
+
"ExpectedPlatformNo":"1",
|
| 185 |
+
"BookingFare":"855",
|
| 186 |
+
"TicketFare":"855",
|
| 187 |
+
"CoachPosition":"L SLR D1 D2 D3 S1 S2 S3 S4 S5 S6 S7 B1 B2 B3 B4 B5 A1 A2 H1 SLR",
|
| 188 |
+
"Rating":3.9,
|
| 189 |
+
"FoodRating":3.4,
|
| 190 |
+
"PunctualityRating":4.1,
|
| 191 |
+
"CleanlinessRating":4.2,
|
| 192 |
+
"SourceName":"Kakinada",
|
| 193 |
+
"DestinationName":null,
|
| 194 |
+
"Duration":"11:12",
|
| 195 |
+
"RatingCount":445,
|
| 196 |
+
"HasPantry":false
|
| 197 |
+
}
|
| 198 |
+
},
|
| 199 |
+
"headers":{
|
| 200 |
+
"access-control-allow-credentials":"true",
|
| 201 |
+
"access-control-allow-origin":"*",
|
| 202 |
+
"connection":"keep-alive",
|
| 203 |
+
"content-length":"1320",
|
| 204 |
+
"content-type":"application/json; charset=utf-8",
|
| 205 |
+
"date":"Fri, 02 Sep 2022 07:40:08 GMT",
|
| 206 |
+
"etag":"W/\"528-wutT0xvuPRi0Pov+aLH4h+4d4gY\"",
|
| 207 |
+
"server":"RapidAPI-1.2.8",
|
| 208 |
+
"x-powered-by":"Express",
|
| 209 |
+
"x-rapidapi-region":"AWS - ap-southeast-1",
|
| 210 |
+
"x-rapidapi-version":"1.2.8"
|
| 211 |
+
},
|
| 212 |
+
"schema":{}
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"name":"SearchStation",
|
| 216 |
+
"url":"https://irctc1.p.rapidapi.com/api/v1/searchStation",
|
| 217 |
+
"description":" ",
|
| 218 |
+
"method":"GET",
|
| 219 |
+
"required_parameters":[
|
| 220 |
+
{
|
| 221 |
+
"name":"query",
|
| 222 |
+
"type":"STRING",
|
| 223 |
+
"description":"",
|
| 224 |
+
"default":"BJU"
|
| 225 |
+
}
|
| 226 |
+
],
|
| 227 |
+
"optional_parameters":[],
|
| 228 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v1/searchStation\"\nquerystring = {\"query\": query}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 229 |
+
"statuscode":200,
|
| 230 |
+
"body":{},
|
| 231 |
+
"headers":{},
|
| 232 |
+
"schema":{}
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
"name":"SearchTrain",
|
| 236 |
+
"url":"https://irctc1.p.rapidapi.com/api/v1/searchTrain",
|
| 237 |
+
"description":" ",
|
| 238 |
+
"method":"GET",
|
| 239 |
+
"required_parameters":[
|
| 240 |
+
{
|
| 241 |
+
"name":"query",
|
| 242 |
+
"type":"NUMBER",
|
| 243 |
+
"description":"",
|
| 244 |
+
"default":190
|
| 245 |
+
}
|
| 246 |
+
],
|
| 247 |
+
"optional_parameters":[],
|
| 248 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v1/searchTrain\"\nquerystring = {\"query\": query}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 249 |
+
"statuscode":200,
|
| 250 |
+
"body":{},
|
| 251 |
+
"headers":{},
|
| 252 |
+
"schema":{}
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"name":"Get Train Live Status",
|
| 256 |
+
"url":"https://irctc1.p.rapidapi.com/api/v1/liveTrainStatus",
|
| 257 |
+
"description":"This API will take train no and day of journey, and will return current status of train with other informations.",
|
| 258 |
+
"method":"GET",
|
| 259 |
+
"required_parameters":[
|
| 260 |
+
{
|
| 261 |
+
"name":"trainNo",
|
| 262 |
+
"type":"STRING",
|
| 263 |
+
"description":"",
|
| 264 |
+
"default":"19038"
|
| 265 |
+
}
|
| 266 |
+
],
|
| 267 |
+
"optional_parameters":[
|
| 268 |
+
{
|
| 269 |
+
"name":"startDay",
|
| 270 |
+
"type":"STRING",
|
| 271 |
+
"description":"Optional File\nstart day range from 0-4\n0 = Day 1\n1 = 1 Day Ago\n2 = 2 Day Ago\n3 = 3 Day Ago\n4 = 4 Day Ago",
|
| 272 |
+
"default":"1"
|
| 273 |
+
}
|
| 274 |
+
],
|
| 275 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v1/liveTrainStatus\"\nquerystring = {\"trainNo\": trainno, \"startDay\": startday}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 276 |
+
"statuscode":111,
|
| 277 |
+
"body":"",
|
| 278 |
+
"headers":"",
|
| 279 |
+
"schema":""
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"name":"TrainsBetweenStations V3",
|
| 283 |
+
"url":"https://irctc1.p.rapidapi.com/api/v3/trainBetweenStations",
|
| 284 |
+
"description":"-",
|
| 285 |
+
"method":"GET",
|
| 286 |
+
"required_parameters":[
|
| 287 |
+
{
|
| 288 |
+
"name":"dateOfJourney",
|
| 289 |
+
"type":"DATE (YYYY-MM-DD)",
|
| 290 |
+
"description":"",
|
| 291 |
+
"default":""
|
| 292 |
+
},
|
| 293 |
+
{
|
| 294 |
+
"name":"toStationCode",
|
| 295 |
+
"type":"STRING",
|
| 296 |
+
"description":"",
|
| 297 |
+
"default":"NDLS"
|
| 298 |
+
},
|
| 299 |
+
{
|
| 300 |
+
"name":"fromStationCode",
|
| 301 |
+
"type":"STRING",
|
| 302 |
+
"description":"",
|
| 303 |
+
"default":"BVI"
|
| 304 |
+
}
|
| 305 |
+
],
|
| 306 |
+
"optional_parameters":[],
|
| 307 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v3/trainBetweenStations\"\nquerystring = {\"dateOfJourney\": dateofjourney, \"toStationCode\": tostationcode, \"fromStationCode\": fromstationcode}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 308 |
+
"statuscode":200,
|
| 309 |
+
"body":{
|
| 310 |
+
"status":true,
|
| 311 |
+
"message":"Success",
|
| 312 |
+
"timestamp":1680379328922,
|
| 313 |
+
"data":[
|
| 314 |
+
{
|
| 315 |
+
"train_number":"22221",
|
| 316 |
+
"train_name":"MUMBAI CSMT - HAZRAT NIZAMUDDIN Rajdhani Express",
|
| 317 |
+
"run_days":[
|
| 318 |
+
"Mon",
|
| 319 |
+
"Tue",
|
| 320 |
+
"Wed",
|
| 321 |
+
"Thu",
|
| 322 |
+
"Fri",
|
| 323 |
+
"Sat",
|
| 324 |
+
"Sun"
|
| 325 |
+
],
|
| 326 |
+
"train_src":"CSMT",
|
| 327 |
+
"train_dstn":"NZM",
|
| 328 |
+
"from_std":"16:00",
|
| 329 |
+
"from_sta":"16:00",
|
| 330 |
+
"local_train_from_sta":960,
|
| 331 |
+
"to_sta":"09:55",
|
| 332 |
+
"to_std":"09:55",
|
| 333 |
+
"from_day":0,
|
| 334 |
+
"to_day":1,
|
| 335 |
+
"d_day":0,
|
| 336 |
+
"from":"CSMT",
|
| 337 |
+
"to":"NZM",
|
| 338 |
+
"from_station_name":"MUMBAI CSMT",
|
| 339 |
+
"to_station_name":"DELHI HAZRAT NIZAMUDDIN",
|
| 340 |
+
"duration":"17:55",
|
| 341 |
+
"special_train":false,
|
| 342 |
+
"train_type":"RAJ",
|
| 343 |
+
"train_date":"26-05-2023",
|
| 344 |
+
"class_type":[
|
| 345 |
+
"3A",
|
| 346 |
+
"2A",
|
| 347 |
+
"1A"
|
| 348 |
+
]
|
| 349 |
+
},
|
| 350 |
+
{
|
| 351 |
+
"train_number":"12951",
|
| 352 |
+
"train_name":"MUMBAI CENTRAL - NEW DELHI Rajdhani Express",
|
| 353 |
+
"run_days":[
|
| 354 |
+
"Mon",
|
| 355 |
+
"Tue",
|
| 356 |
+
"Wed",
|
| 357 |
+
"Thu",
|
| 358 |
+
"Fri",
|
| 359 |
+
"Sat",
|
| 360 |
+
"Sun"
|
| 361 |
+
],
|
| 362 |
+
"train_src":"MMCT",
|
| 363 |
+
"train_dstn":"NDLS",
|
| 364 |
+
"from_std":"17:24",
|
| 365 |
+
"from_sta":"17:22",
|
| 366 |
+
"local_train_from_sta":1042,
|
| 367 |
+
"to_sta":"08:32",
|
| 368 |
+
"to_std":"08:32",
|
| 369 |
+
"from_day":0,
|
| 370 |
+
"to_day":1,
|
| 371 |
+
"d_day":0,
|
| 372 |
+
"from":"BVI",
|
| 373 |
+
"to":"NDLS",
|
| 374 |
+
"from_station_name":"BORIVALI",
|
| 375 |
+
"to_station_name":"NEW DELHI",
|
| 376 |
+
"duration":"15:8",
|
| 377 |
+
"special_train":false,
|
| 378 |
+
"train_type":"RAJ",
|
| 379 |
+
"train_date":"26-05-2023",
|
| 380 |
+
"class_type":[
|
| 381 |
+
"3A",
|
| 382 |
+
"2A",
|
| 383 |
+
"1A"
|
| 384 |
+
]
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"train_number":"12953",
|
| 388 |
+
"train_name":"MUMBAI CENTRAL - HAZRAT NIZAMUDDIN August Kranti Rajdhani Exp",
|
| 389 |
+
"run_days":[
|
| 390 |
+
"Mon",
|
| 391 |
+
"Tue",
|
| 392 |
+
"Wed",
|
| 393 |
+
"Thu",
|
| 394 |
+
"Fri",
|
| 395 |
+
"Sat",
|
| 396 |
+
"Sun"
|
| 397 |
+
],
|
| 398 |
+
"train_src":"MMCT",
|
| 399 |
+
"train_dstn":"NZM",
|
| 400 |
+
"from_std":"17:35",
|
| 401 |
+
"from_sta":"17:33",
|
| 402 |
+
"local_train_from_sta":1053,
|
| 403 |
+
"to_sta":"09:43",
|
| 404 |
+
"to_std":"09:43",
|
| 405 |
+
"from_day":0,
|
| 406 |
+
"to_day":1,
|
| 407 |
+
"d_day":0,
|
| 408 |
+
"from":"BVI",
|
| 409 |
+
"to":"NZM",
|
| 410 |
+
"from_station_name":"BORIVALI",
|
| 411 |
+
"to_station_name":"DELHI HAZRAT NIZAMUDDIN",
|
| 412 |
+
"duration":"16:8",
|
| 413 |
+
"special_train":false,
|
| 414 |
+
"train_type":"RAJ",
|
| 415 |
+
"train_date":"26-05-2023",
|
| 416 |
+
"class_type":[
|
| 417 |
+
"3A",
|
| 418 |
+
"2A",
|
| 419 |
+
"1A"
|
| 420 |
+
]
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"train_number":"12925",
|
| 424 |
+
"train_name":"MUMBAI BANDRA T - AMRITSAR Paschim SF Express",
|
| 425 |
+
"run_days":[
|
| 426 |
+
"Mon",
|
| 427 |
+
"Tue",
|
| 428 |
+
"Wed",
|
| 429 |
+
"Thu",
|
| 430 |
+
"Fri",
|
| 431 |
+
"Sat",
|
| 432 |
+
"Sun"
|
| 433 |
+
],
|
| 434 |
+
"train_src":"MMCT",
|
| 435 |
+
"train_dstn":"ASR",
|
| 436 |
+
"from_std":"11:58",
|
| 437 |
+
"from_sta":"11:55",
|
| 438 |
+
"local_train_from_sta":715,
|
| 439 |
+
"to_sta":"10:40",
|
| 440 |
+
"to_std":"11:05",
|
| 441 |
+
"from_day":0,
|
| 442 |
+
"to_day":1,
|
| 443 |
+
"d_day":0,
|
| 444 |
+
"from":"BVI",
|
| 445 |
+
"to":"NDLS",
|
| 446 |
+
"from_station_name":"BORIVALI",
|
| 447 |
+
"to_station_name":"NEW DELHI",
|
| 448 |
+
"duration":"22:42",
|
| 449 |
+
"special_train":false,
|
| 450 |
+
"train_type":"SUF",
|
| 451 |
+
"train_date":"26-05-2023",
|
| 452 |
+
"class_type":[
|
| 453 |
+
"SL",
|
| 454 |
+
"3A",
|
| 455 |
+
"2A",
|
| 456 |
+
"1A"
|
| 457 |
+
]
|
| 458 |
+
},
|
| 459 |
+
{
|
| 460 |
+
"train_number":"12903",
|
| 461 |
+
"train_name":"MUMBAI CENTRAL - AMRITSAR Golden Temple SF Mail",
|
| 462 |
+
"run_days":[
|
| 463 |
+
"Mon",
|
| 464 |
+
"Tue",
|
| 465 |
+
"Wed",
|
| 466 |
+
"Thu",
|
| 467 |
+
"Fri",
|
| 468 |
+
"Sat",
|
| 469 |
+
"Sun"
|
| 470 |
+
],
|
| 471 |
+
"train_src":"MMCT",
|
| 472 |
+
"train_dstn":"ASR",
|
| 473 |
+
"from_std":"19:18",
|
| 474 |
+
"from_sta":"19:15",
|
| 475 |
+
"local_train_from_sta":1155,
|
| 476 |
+
"to_sta":"13:50",
|
| 477 |
+
"to_std":"14:05",
|
| 478 |
+
"from_day":0,
|
| 479 |
+
"to_day":1,
|
| 480 |
+
"d_day":0,
|
| 481 |
+
"from":"BVI",
|
| 482 |
+
"to":"NZM",
|
| 483 |
+
"from_station_name":"BORIVALI",
|
| 484 |
+
"to_station_name":"DELHI HAZRAT NIZAMUDDIN",
|
| 485 |
+
"duration":"18:32",
|
| 486 |
+
"special_train":false,
|
| 487 |
+
"train_type":"SUF",
|
| 488 |
+
"train_date":"26-05-2023",
|
| 489 |
+
"class_type":[
|
| 490 |
+
"SL",
|
| 491 |
+
"3A",
|
| 492 |
+
"2A",
|
| 493 |
+
"1A"
|
| 494 |
+
]
|
| 495 |
+
},
|
| 496 |
+
{
|
| 497 |
+
"train_number":"12137",
|
| 498 |
+
"train_name":"MUMBAI CSMT - FIROZPUR CANTT SF Punjab Mail",
|
| 499 |
+
"run_days":[
|
| 500 |
+
"Mon",
|
| 501 |
+
"Tue",
|
| 502 |
+
"Wed",
|
| 503 |
+
"Thu",
|
| 504 |
+
"Fri",
|
| 505 |
+
"Sat",
|
| 506 |
+
"Sun"
|
| 507 |
+
],
|
| 508 |
+
"train_src":"CSMT",
|
| 509 |
+
"train_dstn":"FZR",
|
| 510 |
+
"from_std":"19:50",
|
| 511 |
+
"from_sta":"19:47",
|
| 512 |
+
"local_train_from_sta":1187,
|
| 513 |
+
"to_sta":"21:25",
|
| 514 |
+
"to_std":"21:40",
|
| 515 |
+
"from_day":0,
|
| 516 |
+
"to_day":1,
|
| 517 |
+
"d_day":0,
|
| 518 |
+
"from":"DR",
|
| 519 |
+
"to":"NDLS",
|
| 520 |
+
"from_station_name":"MUMBAI DADAR CENTRAL",
|
| 521 |
+
"to_station_name":"NEW DELHI",
|
| 522 |
+
"duration":"25:35",
|
| 523 |
+
"special_train":false,
|
| 524 |
+
"train_type":"SUF",
|
| 525 |
+
"train_date":"26-05-2023",
|
| 526 |
+
"class_type":[
|
| 527 |
+
"SL",
|
| 528 |
+
"3A",
|
| 529 |
+
"2A",
|
| 530 |
+
"1A"
|
| 531 |
+
]
|
| 532 |
+
},
|
| 533 |
+
{
|
| 534 |
+
"train_number":"22209",
|
| 535 |
+
"train_name":"MUMBAI CENTRAL - NEW DELHI AC Duronto Exp",
|
| 536 |
+
"run_days":[
|
| 537 |
+
"Mon",
|
| 538 |
+
"Fri"
|
| 539 |
+
],
|
| 540 |
+
"train_src":"MMCT",
|
| 541 |
+
"train_dstn":"NDLS",
|
| 542 |
+
"from_std":"23:00",
|
| 543 |
+
"from_sta":"23:00",
|
| 544 |
+
"local_train_from_sta":1380,
|
| 545 |
+
"to_sta":"15:55",
|
| 546 |
+
"to_std":"15:55",
|
| 547 |
+
"from_day":0,
|
| 548 |
+
"to_day":1,
|
| 549 |
+
"d_day":0,
|
| 550 |
+
"from":"MMCT",
|
| 551 |
+
"to":"NDLS",
|
| 552 |
+
"from_station_name":"MUMBAI CENTRAL",
|
| 553 |
+
"to_station_name":"NEW DELHI",
|
| 554 |
+
"duration":"16:55",
|
| 555 |
+
"special_train":false,
|
| 556 |
+
"train_type":"DRNT",
|
| 557 |
+
"train_date":"26-05-2023",
|
| 558 |
+
"class_type":[
|
| 559 |
+
"3A",
|
| 560 |
+
"2A",
|
| 561 |
+
"1A"
|
| 562 |
+
]
|
| 563 |
+
},
|
| 564 |
+
{
|
| 565 |
+
"train_number":"12471",
|
| 566 |
+
"train_name":"MUMBAI BANDRA T - SMVD KATRA Swaraj SF Express",
|
| 567 |
+
"run_days":[
|
| 568 |
+
"Sun",
|
| 569 |
+
"Mon",
|
| 570 |
+
"Thu",
|
| 571 |
+
"Fri"
|
| 572 |
+
],
|
| 573 |
+
"train_src":"BDTS",
|
| 574 |
+
"train_dstn":"SVDK",
|
| 575 |
+
"from_std":"11:26",
|
| 576 |
+
"from_sta":"11:23",
|
| 577 |
+
"local_train_from_sta":683,
|
| 578 |
+
"to_sta":"05:25",
|
| 579 |
+
"to_std":"05:40",
|
| 580 |
+
"from_day":0,
|
| 581 |
+
"to_day":1,
|
| 582 |
+
"d_day":0,
|
| 583 |
+
"from":"BVI",
|
| 584 |
+
"to":"NDLS",
|
| 585 |
+
"from_station_name":"BORIVALI",
|
| 586 |
+
"to_station_name":"NEW DELHI",
|
| 587 |
+
"duration":"17:59",
|
| 588 |
+
"special_train":false,
|
| 589 |
+
"train_type":"SUF",
|
| 590 |
+
"train_date":"26-05-2023",
|
| 591 |
+
"class_type":[
|
| 592 |
+
"SL",
|
| 593 |
+
"3A",
|
| 594 |
+
"2A",
|
| 595 |
+
"1A"
|
| 596 |
+
]
|
| 597 |
+
},
|
| 598 |
+
{
|
| 599 |
+
"train_number":"12247",
|
| 600 |
+
"train_name":"MUMBAI BANDRA T - HAZRAT NIZAMUDDIN Yuva Exp",
|
| 601 |
+
"run_days":[
|
| 602 |
+
"Fri"
|
| 603 |
+
],
|
| 604 |
+
"train_src":"BDTS",
|
| 605 |
+
"train_dstn":"NZM",
|
| 606 |
+
"from_std":"17:30",
|
| 607 |
+
"from_sta":"17:30",
|
| 608 |
+
"local_train_from_sta":1050,
|
| 609 |
+
"to_sta":"10:15",
|
| 610 |
+
"to_std":"10:15",
|
| 611 |
+
"from_day":0,
|
| 612 |
+
"to_day":1,
|
| 613 |
+
"d_day":0,
|
| 614 |
+
"from":"BDTS",
|
| 615 |
+
"to":"NZM",
|
| 616 |
+
"from_station_name":"MUMBAI BANDRA TERMINUS",
|
| 617 |
+
"to_station_name":"DELHI HAZRAT NIZAMUDDIN",
|
| 618 |
+
"duration":"16:45",
|
| 619 |
+
"special_train":false,
|
| 620 |
+
"train_type":"SUF",
|
| 621 |
+
"train_date":"26-05-2023",
|
| 622 |
+
"class_type":[
|
| 623 |
+
"CC",
|
| 624 |
+
"3A"
|
| 625 |
+
]
|
| 626 |
+
},
|
| 627 |
+
{
|
| 628 |
+
"train_number":"19019",
|
| 629 |
+
"train_name":"MUMBAI BANDRA T - HARIDWAR Express",
|
| 630 |
+
"run_days":[
|
| 631 |
+
"Mon",
|
| 632 |
+
"Tue",
|
| 633 |
+
"Wed",
|
| 634 |
+
"Thu",
|
| 635 |
+
"Fri",
|
| 636 |
+
"Sat",
|
| 637 |
+
"Sun"
|
| 638 |
+
],
|
| 639 |
+
"train_src":"BDTS",
|
| 640 |
+
"train_dstn":"HW",
|
| 641 |
+
"from_std":"00:35",
|
| 642 |
+
"from_sta":"00:30",
|
| 643 |
+
"local_train_from_sta":30,
|
| 644 |
+
"to_sta":"02:30",
|
| 645 |
+
"to_std":"02:45",
|
| 646 |
+
"from_day":0,
|
| 647 |
+
"to_day":1,
|
| 648 |
+
"d_day":0,
|
| 649 |
+
"from":"BVI",
|
| 650 |
+
"to":"NZM",
|
| 651 |
+
"from_station_name":"BORIVALI",
|
| 652 |
+
"to_station_name":"DELHI HAZRAT NIZAMUDDIN",
|
| 653 |
+
"duration":"25:55",
|
| 654 |
+
"special_train":false,
|
| 655 |
+
"train_type":"MEX",
|
| 656 |
+
"train_date":"26-05-2023",
|
| 657 |
+
"class_type":[
|
| 658 |
+
"SL",
|
| 659 |
+
"3A",
|
| 660 |
+
"2A",
|
| 661 |
+
"1A"
|
| 662 |
+
]
|
| 663 |
+
},
|
| 664 |
+
{
|
| 665 |
+
"train_number":"11057",
|
| 666 |
+
"train_name":"MUMBAI CSMT - AMRITSAR Express",
|
| 667 |
+
"run_days":[
|
| 668 |
+
"Mon",
|
| 669 |
+
"Tue",
|
| 670 |
+
"Wed",
|
| 671 |
+
"Thu",
|
| 672 |
+
"Fri",
|
| 673 |
+
"Sat",
|
| 674 |
+
"Sun"
|
| 675 |
+
],
|
| 676 |
+
"train_src":"CSMT",
|
| 677 |
+
"train_dstn":"ASR",
|
| 678 |
+
"from_std":"00:05",
|
| 679 |
+
"from_sta":"00:02",
|
| 680 |
+
"local_train_from_sta":1442,
|
| 681 |
+
"to_sta":"03:40",
|
| 682 |
+
"to_std":"03:55",
|
| 683 |
+
"from_day":1,
|
| 684 |
+
"to_day":2,
|
| 685 |
+
"d_day":1,
|
| 686 |
+
"from":"TNA",
|
| 687 |
+
"to":"NDLS",
|
| 688 |
+
"from_station_name":"THANE",
|
| 689 |
+
"to_station_name":"NEW DELHI",
|
| 690 |
+
"duration":"27:35",
|
| 691 |
+
"special_train":false,
|
| 692 |
+
"train_type":"MEX",
|
| 693 |
+
"train_date":"26-05-2023",
|
| 694 |
+
"class_type":[
|
| 695 |
+
"SL",
|
| 696 |
+
"3A",
|
| 697 |
+
"2A"
|
| 698 |
+
]
|
| 699 |
+
},
|
| 700 |
+
{
|
| 701 |
+
"train_number":"12216",
|
| 702 |
+
"train_name":"MUMBAI BANDRA T - DELHI SARAI ROHILLA Garib Rath Exp",
|
| 703 |
+
"run_days":[
|
| 704 |
+
"Tue",
|
| 705 |
+
"Wed",
|
| 706 |
+
"Fri",
|
| 707 |
+
"Sun"
|
| 708 |
+
],
|
| 709 |
+
"train_src":"BDTS",
|
| 710 |
+
"train_dstn":"DEE",
|
| 711 |
+
"from_std":"12:24",
|
| 712 |
+
"from_sta":"12:21",
|
| 713 |
+
"local_train_from_sta":741,
|
| 714 |
+
"to_sta":"11:00",
|
| 715 |
+
"to_std":"11:00",
|
| 716 |
+
"from_day":0,
|
| 717 |
+
"to_day":1,
|
| 718 |
+
"d_day":0,
|
| 719 |
+
"from":"BVI",
|
| 720 |
+
"to":"DEE",
|
| 721 |
+
"from_station_name":"BORIVALI",
|
| 722 |
+
"to_station_name":"DELHI SARAI ROHILLA",
|
| 723 |
+
"duration":"22:36",
|
| 724 |
+
"special_train":false,
|
| 725 |
+
"train_type":"GBR",
|
| 726 |
+
"train_date":"26-05-2023",
|
| 727 |
+
"class_type":[
|
| 728 |
+
"3A"
|
| 729 |
+
]
|
| 730 |
+
},
|
| 731 |
+
{
|
| 732 |
+
"train_number":"12617",
|
| 733 |
+
"train_name":"ERNAKULAM - HAZRAT NIZAMUDDIN Mangala Lakshadweep SF Exp",
|
| 734 |
+
"run_days":[
|
| 735 |
+
"Mon",
|
| 736 |
+
"Tue",
|
| 737 |
+
"Wed",
|
| 738 |
+
"Thu",
|
| 739 |
+
"Fri",
|
| 740 |
+
"Sat",
|
| 741 |
+
"Sun"
|
| 742 |
+
],
|
| 743 |
+
"train_src":"ERS",
|
| 744 |
+
"train_dstn":"NZM",
|
| 745 |
+
"from_std":"13:30",
|
| 746 |
+
"from_sta":"13:27",
|
| 747 |
+
"local_train_from_sta":2247,
|
| 748 |
+
"to_sta":"13:20",
|
| 749 |
+
"to_std":"13:20",
|
| 750 |
+
"from_day":1,
|
| 751 |
+
"to_day":2,
|
| 752 |
+
"d_day":1,
|
| 753 |
+
"from":"KYN",
|
| 754 |
+
"to":"NZM",
|
| 755 |
+
"from_station_name":"KALYAN JN",
|
| 756 |
+
"to_station_name":"DELHI HAZRAT NIZAMUDDIN",
|
| 757 |
+
"duration":"23:50",
|
| 758 |
+
"special_train":false,
|
| 759 |
+
"train_type":"SUF",
|
| 760 |
+
"train_date":"26-05-2023",
|
| 761 |
+
"class_type":[
|
| 762 |
+
"SL",
|
| 763 |
+
"3A",
|
| 764 |
+
"2A"
|
| 765 |
+
]
|
| 766 |
+
},
|
| 767 |
+
{
|
| 768 |
+
"train_number":"12263",
|
| 769 |
+
"train_name":"PUNE - HAZRAT NIZAMUDDIN AC Duronto Express",
|
| 770 |
+
"run_days":[
|
| 771 |
+
"Tue",
|
| 772 |
+
"Fri"
|
| 773 |
+
],
|
| 774 |
+
"train_src":"PUNE",
|
| 775 |
+
"train_dstn":"NZM",
|
| 776 |
+
"from_std":"14:25",
|
| 777 |
+
"from_sta":"14:20",
|
| 778 |
+
"local_train_from_sta":860,
|
| 779 |
+
"to_sta":"06:45",
|
| 780 |
+
"to_std":"06:45",
|
| 781 |
+
"from_day":0,
|
| 782 |
+
"to_day":1,
|
| 783 |
+
"d_day":0,
|
| 784 |
+
"from":"BSR",
|
| 785 |
+
"to":"NZM",
|
| 786 |
+
"from_station_name":"VASAI ROAD",
|
| 787 |
+
"to_station_name":"DELHI HAZRAT NIZAMUDDIN",
|
| 788 |
+
"duration":"16:20",
|
| 789 |
+
"special_train":false,
|
| 790 |
+
"train_type":"DRNT",
|
| 791 |
+
"train_date":"26-05-2023",
|
| 792 |
+
"class_type":[
|
| 793 |
+
"3A",
|
| 794 |
+
"2A",
|
| 795 |
+
"1A"
|
| 796 |
+
]
|
| 797 |
+
},
|
| 798 |
+
{
|
| 799 |
+
"train_number":"12431",
|
| 800 |
+
"train_name":"TRIVANDRUM CENTRAL - HAZRAT NIZAMUDDIN Rajdhani Exp",
|
| 801 |
+
"run_days":[
|
| 802 |
+
"Wed",
|
| 803 |
+
"Fri",
|
| 804 |
+
"Sat"
|
| 805 |
+
],
|
| 806 |
+
"train_src":"TVC",
|
| 807 |
+
"train_dstn":"NZM",
|
| 808 |
+
"from_std":"18:05",
|
| 809 |
+
"from_sta":"18:00",
|
| 810 |
+
"local_train_from_sta":2520,
|
| 811 |
+
"to_sta":"12:30",
|
| 812 |
+
"to_std":"12:30",
|
| 813 |
+
"from_day":1,
|
| 814 |
+
"to_day":2,
|
| 815 |
+
"d_day":1,
|
| 816 |
+
"from":"PNVL",
|
| 817 |
+
"to":"NZM",
|
| 818 |
+
"from_station_name":"PANVEL",
|
| 819 |
+
"to_station_name":"DELHI HAZRAT NIZAMUDDIN",
|
| 820 |
+
"duration":"18:25",
|
| 821 |
+
"special_train":false,
|
| 822 |
+
"train_type":"RAJ",
|
| 823 |
+
"train_date":"26-05-2023",
|
| 824 |
+
"class_type":[
|
| 825 |
+
"3A",
|
| 826 |
+
"2A",
|
| 827 |
+
"1A"
|
| 828 |
+
]
|
| 829 |
+
}
|
| 830 |
+
]
|
| 831 |
+
},
|
| 832 |
+
"headers":{
|
| 833 |
+
"access-control-allow-credentials":"true",
|
| 834 |
+
"access-control-allow-origin":"*",
|
| 835 |
+
"content-length":"7800",
|
| 836 |
+
"content-type":"application/json; charset=utf-8",
|
| 837 |
+
"date":"Sat, 01 Apr 2023 20:02:08 GMT",
|
| 838 |
+
"etag":"W/\"1e78-1egcqve2fqftV9TKU9OQ4bhz6ww\"",
|
| 839 |
+
"server":"RapidAPI-1.2.8",
|
| 840 |
+
"x-powered-by":"Express",
|
| 841 |
+
"x-rapidapi-region":"AWS - ap-southeast-1",
|
| 842 |
+
"x-rapidapi-version":"1.2.8"
|
| 843 |
+
},
|
| 844 |
+
"schema":{}
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"name":"Get Train Schedule",
|
| 848 |
+
"url":"https://irctc1.p.rapidapi.com/api/v1/getTrainSchedule",
|
| 849 |
+
"description":"-",
|
| 850 |
+
"method":"GET",
|
| 851 |
+
"required_parameters":[
|
| 852 |
+
{
|
| 853 |
+
"name":"trainNo",
|
| 854 |
+
"type":"STRING",
|
| 855 |
+
"description":"",
|
| 856 |
+
"default":"12936"
|
| 857 |
+
}
|
| 858 |
+
],
|
| 859 |
+
"optional_parameters":[],
|
| 860 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v1/getTrainSchedule\"\nquerystring = {\"trainNo\": trainno}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 861 |
+
"statuscode":111,
|
| 862 |
+
"body":"",
|
| 863 |
+
"headers":"",
|
| 864 |
+
"schema":""
|
| 865 |
+
},
|
| 866 |
+
{
|
| 867 |
+
"name":"Get Fare",
|
| 868 |
+
"url":"https://irctc1.p.rapidapi.com/api/v2/getFare",
|
| 869 |
+
"description":"-",
|
| 870 |
+
"method":"GET",
|
| 871 |
+
"required_parameters":[
|
| 872 |
+
{
|
| 873 |
+
"name":"trainNo",
|
| 874 |
+
"type":"NUMBER",
|
| 875 |
+
"description":"",
|
| 876 |
+
"default":"19038"
|
| 877 |
+
},
|
| 878 |
+
{
|
| 879 |
+
"name":"toStationCode",
|
| 880 |
+
"type":"STRING",
|
| 881 |
+
"description":"",
|
| 882 |
+
"default":"BVI"
|
| 883 |
+
},
|
| 884 |
+
{
|
| 885 |
+
"name":"fromStationCode",
|
| 886 |
+
"type":"STRING",
|
| 887 |
+
"description":"",
|
| 888 |
+
"default":"ST"
|
| 889 |
+
}
|
| 890 |
+
],
|
| 891 |
+
"optional_parameters":[],
|
| 892 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v2/getFare\"\nquerystring = {\"trainNo\": trainno, \"toStationCode\": tostationcode, \"fromStationCode\": fromstationcode}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 893 |
+
"statuscode":200,
|
| 894 |
+
"body":{
|
| 895 |
+
"status":true,
|
| 896 |
+
"message":"Success",
|
| 897 |
+
"timestamp":1662275995178,
|
| 898 |
+
"data":{
|
| 899 |
+
"general":[
|
| 900 |
+
{
|
| 901 |
+
"classType":"3A",
|
| 902 |
+
"fare":505,
|
| 903 |
+
"breakup":[
|
| 904 |
+
{
|
| 905 |
+
"title":"Base Charges",
|
| 906 |
+
"key":"baseFare",
|
| 907 |
+
"cost":441
|
| 908 |
+
},
|
| 909 |
+
{
|
| 910 |
+
"title":"Reservation Charges",
|
| 911 |
+
"key":"reservationCharges",
|
| 912 |
+
"cost":40
|
| 913 |
+
},
|
| 914 |
+
{
|
| 915 |
+
"title":"GST",
|
| 916 |
+
"key":"serviceTax",
|
| 917 |
+
"cost":24
|
| 918 |
+
},
|
| 919 |
+
{
|
| 920 |
+
"title":"Total Amount",
|
| 921 |
+
"key":"total",
|
| 922 |
+
"cost":505
|
| 923 |
+
}
|
| 924 |
+
]
|
| 925 |
+
},
|
| 926 |
+
{
|
| 927 |
+
"classType":"SL",
|
| 928 |
+
"fare":175,
|
| 929 |
+
"breakup":[
|
| 930 |
+
{
|
| 931 |
+
"title":"Base Charges",
|
| 932 |
+
"key":"baseFare",
|
| 933 |
+
"cost":155
|
| 934 |
+
},
|
| 935 |
+
{
|
| 936 |
+
"title":"Reservation Charges",
|
| 937 |
+
"key":"reservationCharges",
|
| 938 |
+
"cost":20
|
| 939 |
+
},
|
| 940 |
+
{
|
| 941 |
+
"title":"Total Amount",
|
| 942 |
+
"key":"total",
|
| 943 |
+
"cost":175
|
| 944 |
+
}
|
| 945 |
+
]
|
| 946 |
+
},
|
| 947 |
+
{
|
| 948 |
+
"classType":"2A",
|
| 949 |
+
"fare":710,
|
| 950 |
+
"breakup":[
|
| 951 |
+
{
|
| 952 |
+
"title":"Base Charges",
|
| 953 |
+
"key":"baseFare",
|
| 954 |
+
"cost":626
|
| 955 |
+
},
|
| 956 |
+
{
|
| 957 |
+
"title":"Reservation Charges",
|
| 958 |
+
"key":"reservationCharges",
|
| 959 |
+
"cost":50
|
| 960 |
+
},
|
| 961 |
+
{
|
| 962 |
+
"title":"GST",
|
| 963 |
+
"key":"serviceTax",
|
| 964 |
+
"cost":34
|
| 965 |
+
},
|
| 966 |
+
{
|
| 967 |
+
"title":"Total Amount",
|
| 968 |
+
"key":"total",
|
| 969 |
+
"cost":710
|
| 970 |
+
}
|
| 971 |
+
]
|
| 972 |
+
},
|
| 973 |
+
{
|
| 974 |
+
"classType":"2S",
|
| 975 |
+
"fare":105,
|
| 976 |
+
"breakup":[
|
| 977 |
+
{
|
| 978 |
+
"title":"Base Charges",
|
| 979 |
+
"key":"baseFare",
|
| 980 |
+
"cost":90
|
| 981 |
+
},
|
| 982 |
+
{
|
| 983 |
+
"title":"Reservation Charges",
|
| 984 |
+
"key":"reservationCharges",
|
| 985 |
+
"cost":15
|
| 986 |
+
},
|
| 987 |
+
{
|
| 988 |
+
"title":"Total Amount",
|
| 989 |
+
"key":"total",
|
| 990 |
+
"cost":105
|
| 991 |
+
}
|
| 992 |
+
]
|
| 993 |
+
}
|
| 994 |
+
],
|
| 995 |
+
"tatkal":[
|
| 996 |
+
{
|
| 997 |
+
"classType":"3A",
|
| 998 |
+
"fare":1105,
|
| 999 |
+
"breakup":[
|
| 1000 |
+
{
|
| 1001 |
+
"title":"Base Charges",
|
| 1002 |
+
"key":"baseFare",
|
| 1003 |
+
"cost":712
|
| 1004 |
+
},
|
| 1005 |
+
{
|
| 1006 |
+
"title":"Reservation Charges",
|
| 1007 |
+
"key":"reservationCharges",
|
| 1008 |
+
"cost":40
|
| 1009 |
+
},
|
| 1010 |
+
{
|
| 1011 |
+
"title":"GST",
|
| 1012 |
+
"key":"serviceTax",
|
| 1013 |
+
"cost":53
|
| 1014 |
+
},
|
| 1015 |
+
{
|
| 1016 |
+
"title":"Tatkal Charges",
|
| 1017 |
+
"key":"tatkalCharges",
|
| 1018 |
+
"cost":300
|
| 1019 |
+
},
|
| 1020 |
+
{
|
| 1021 |
+
"title":"Total Amount",
|
| 1022 |
+
"key":"total",
|
| 1023 |
+
"cost":1105
|
| 1024 |
+
}
|
| 1025 |
+
]
|
| 1026 |
+
},
|
| 1027 |
+
{
|
| 1028 |
+
"classType":"SL",
|
| 1029 |
+
"fare":395,
|
| 1030 |
+
"breakup":[
|
| 1031 |
+
{
|
| 1032 |
+
"title":"Base Charges",
|
| 1033 |
+
"key":"baseFare",
|
| 1034 |
+
"cost":275
|
| 1035 |
+
},
|
| 1036 |
+
{
|
| 1037 |
+
"title":"Reservation Charges",
|
| 1038 |
+
"key":"reservationCharges",
|
| 1039 |
+
"cost":20
|
| 1040 |
+
},
|
| 1041 |
+
{
|
| 1042 |
+
"title":"Tatkal Charges",
|
| 1043 |
+
"key":"tatkalCharges",
|
| 1044 |
+
"cost":100
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"title":"Total Amount",
|
| 1048 |
+
"key":"total",
|
| 1049 |
+
"cost":395
|
| 1050 |
+
}
|
| 1051 |
+
]
|
| 1052 |
+
},
|
| 1053 |
+
{
|
| 1054 |
+
"classType":"2A",
|
| 1055 |
+
"fare":1540,
|
| 1056 |
+
"breakup":[
|
| 1057 |
+
{
|
| 1058 |
+
"title":"Base Charges",
|
| 1059 |
+
"key":"baseFare",
|
| 1060 |
+
"cost":1016
|
| 1061 |
+
},
|
| 1062 |
+
{
|
| 1063 |
+
"title":"Reservation Charges",
|
| 1064 |
+
"key":"reservationCharges",
|
| 1065 |
+
"cost":50
|
| 1066 |
+
},
|
| 1067 |
+
{
|
| 1068 |
+
"title":"GST",
|
| 1069 |
+
"key":"serviceTax",
|
| 1070 |
+
"cost":74
|
| 1071 |
+
},
|
| 1072 |
+
{
|
| 1073 |
+
"title":"Tatkal Charges",
|
| 1074 |
+
"key":"tatkalCharges",
|
| 1075 |
+
"cost":400
|
| 1076 |
+
},
|
| 1077 |
+
{
|
| 1078 |
+
"title":"Total Amount",
|
| 1079 |
+
"key":"total",
|
| 1080 |
+
"cost":1540
|
| 1081 |
+
}
|
| 1082 |
+
]
|
| 1083 |
+
},
|
| 1084 |
+
{
|
| 1085 |
+
"classType":"2S",
|
| 1086 |
+
"fare":190,
|
| 1087 |
+
"breakup":[
|
| 1088 |
+
{
|
| 1089 |
+
"title":"Base Charges",
|
| 1090 |
+
"key":"baseFare",
|
| 1091 |
+
"cost":160
|
| 1092 |
+
},
|
| 1093 |
+
{
|
| 1094 |
+
"title":"Reservation Charges",
|
| 1095 |
+
"key":"reservationCharges",
|
| 1096 |
+
"cost":15
|
| 1097 |
+
},
|
| 1098 |
+
{
|
| 1099 |
+
"title":"Tatkal Charges",
|
| 1100 |
+
"key":"tatkalCharges",
|
| 1101 |
+
"cost":15
|
| 1102 |
+
},
|
| 1103 |
+
{
|
| 1104 |
+
"title":"Total Amount",
|
| 1105 |
+
"key":"total",
|
| 1106 |
+
"cost":190
|
| 1107 |
+
}
|
| 1108 |
+
]
|
| 1109 |
+
}
|
| 1110 |
+
]
|
| 1111 |
+
}
|
| 1112 |
+
},
|
| 1113 |
+
"headers":{
|
| 1114 |
+
"access-control-allow-credentials":"true",
|
| 1115 |
+
"access-control-allow-origin":"*",
|
| 1116 |
+
"connection":"keep-alive",
|
| 1117 |
+
"content-length":"2228",
|
| 1118 |
+
"content-type":"application/json; charset=utf-8",
|
| 1119 |
+
"date":"Sun, 04 Sep 2022 07:19:55 GMT",
|
| 1120 |
+
"etag":"W/\"8b4-oKxLBL1VhCtWIi6pS4jIzeBIcC0\"",
|
| 1121 |
+
"server":"RapidAPI-1.2.8",
|
| 1122 |
+
"x-powered-by":"Express",
|
| 1123 |
+
"x-rapidapi-region":"AWS - ap-southeast-1",
|
| 1124 |
+
"x-rapidapi-version":"1.2.8"
|
| 1125 |
+
},
|
| 1126 |
+
"schema":{}
|
| 1127 |
+
},
|
| 1128 |
+
{
|
| 1129 |
+
"name":"Get Trains By Station",
|
| 1130 |
+
"url":"https://irctc1.p.rapidapi.com/api/v3/getTrainsByStation",
|
| 1131 |
+
"description":"-",
|
| 1132 |
+
"method":"GET",
|
| 1133 |
+
"required_parameters":[
|
| 1134 |
+
{
|
| 1135 |
+
"name":"stationCode",
|
| 1136 |
+
"type":"STRING",
|
| 1137 |
+
"description":"",
|
| 1138 |
+
"default":""
|
| 1139 |
+
}
|
| 1140 |
+
],
|
| 1141 |
+
"optional_parameters":[],
|
| 1142 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v3/getTrainsByStation\"\nquerystring = {\"stationCode\": stationcode}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 1143 |
+
"statuscode":111,
|
| 1144 |
+
"body":"",
|
| 1145 |
+
"headers":"",
|
| 1146 |
+
"schema":""
|
| 1147 |
+
},
|
| 1148 |
+
{
|
| 1149 |
+
"name":"TrainsBetweenStations",
|
| 1150 |
+
"url":"https://irctc1.p.rapidapi.com/api/v2/trainBetweenStations",
|
| 1151 |
+
"description":"-",
|
| 1152 |
+
"method":"GET",
|
| 1153 |
+
"required_parameters":[
|
| 1154 |
+
{
|
| 1155 |
+
"name":"toStationCode",
|
| 1156 |
+
"type":"STRING",
|
| 1157 |
+
"description":"",
|
| 1158 |
+
"default":"bdts"
|
| 1159 |
+
},
|
| 1160 |
+
{
|
| 1161 |
+
"name":"fromStationCode",
|
| 1162 |
+
"type":"STRING",
|
| 1163 |
+
"description":"",
|
| 1164 |
+
"default":"bju"
|
| 1165 |
+
}
|
| 1166 |
+
],
|
| 1167 |
+
"optional_parameters":[],
|
| 1168 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v2/trainBetweenStations\"\nquerystring = {\"toStationCode\": tostationcode, \"fromStationCode\": fromstationcode}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 1169 |
+
"statuscode":200,
|
| 1170 |
+
"body":{
|
| 1171 |
+
"status":true,
|
| 1172 |
+
"message":"Success",
|
| 1173 |
+
"timestamp":1665490384272,
|
| 1174 |
+
"data":[
|
| 1175 |
+
{
|
| 1176 |
+
"train_number":"12545",
|
| 1177 |
+
"train_name":"Karmbhoomi Exp",
|
| 1178 |
+
"train_type":"M",
|
| 1179 |
+
"run_days":[
|
| 1180 |
+
"Wed"
|
| 1181 |
+
],
|
| 1182 |
+
"train_origin_station":"Raxaul",
|
| 1183 |
+
"train_origin_station_code":"RXL",
|
| 1184 |
+
"train_destination_station":"Mumbai",
|
| 1185 |
+
"train_destination_station_code":"LTT",
|
| 1186 |
+
"depart_time":"22:35:00",
|
| 1187 |
+
"arrival_time":"05:30:00",
|
| 1188 |
+
"distance":"1800",
|
| 1189 |
+
"class_type":[
|
| 1190 |
+
"2S"
|
| 1191 |
+
],
|
| 1192 |
+
"day_of_journey":1
|
| 1193 |
+
},
|
| 1194 |
+
{
|
| 1195 |
+
"train_number":"05529",
|
| 1196 |
+
"train_name":"Jyg Ltt Spl",
|
| 1197 |
+
"train_type":"M",
|
| 1198 |
+
"run_days":[
|
| 1199 |
+
"Mon"
|
| 1200 |
+
],
|
| 1201 |
+
"train_origin_station":"Jainagar",
|
| 1202 |
+
"train_origin_station_code":"JYG",
|
| 1203 |
+
"train_destination_station":"Mumbai",
|
| 1204 |
+
"train_destination_station_code":"LTT",
|
| 1205 |
+
"depart_time":"03:30:00",
|
| 1206 |
+
"arrival_time":"13:00:00",
|
| 1207 |
+
"distance":"1799",
|
| 1208 |
+
"class_type":[
|
| 1209 |
+
"2A",
|
| 1210 |
+
"3A",
|
| 1211 |
+
"SL"
|
| 1212 |
+
],
|
| 1213 |
+
"day_of_journey":2
|
| 1214 |
+
},
|
| 1215 |
+
{
|
| 1216 |
+
"train_number":"19038",
|
| 1217 |
+
"train_name":"Avadh Express",
|
| 1218 |
+
"train_type":"M",
|
| 1219 |
+
"run_days":[
|
| 1220 |
+
"Sun",
|
| 1221 |
+
"Mon",
|
| 1222 |
+
"Tue",
|
| 1223 |
+
"Wed",
|
| 1224 |
+
"Thu",
|
| 1225 |
+
"Fri",
|
| 1226 |
+
"Sat"
|
| 1227 |
+
],
|
| 1228 |
+
"train_origin_station":"Barauni",
|
| 1229 |
+
"train_origin_station_code":"BJU",
|
| 1230 |
+
"train_destination_station":"Mumbai",
|
| 1231 |
+
"train_destination_station_code":"BDTS",
|
| 1232 |
+
"depart_time":"07:20:00",
|
| 1233 |
+
"arrival_time":"04:05:00",
|
| 1234 |
+
"distance":"2255",
|
| 1235 |
+
"class_type":[
|
| 1236 |
+
"2A",
|
| 1237 |
+
"3A",
|
| 1238 |
+
"SL",
|
| 1239 |
+
"2S"
|
| 1240 |
+
],
|
| 1241 |
+
"day_of_journey":1
|
| 1242 |
+
},
|
| 1243 |
+
{
|
| 1244 |
+
"train_number":"15646",
|
| 1245 |
+
"train_name":"Dbrg Ltt Exp",
|
| 1246 |
+
"train_type":"M",
|
| 1247 |
+
"run_days":[
|
| 1248 |
+
"Tue",
|
| 1249 |
+
"Sat"
|
| 1250 |
+
],
|
| 1251 |
+
"train_origin_station":"Dibrugarh",
|
| 1252 |
+
"train_origin_station_code":"DBRG",
|
| 1253 |
+
"train_destination_station":"Mumbai",
|
| 1254 |
+
"train_destination_station_code":"LTT",
|
| 1255 |
+
"depart_time":"09:35:00",
|
| 1256 |
+
"arrival_time":"17:50:00",
|
| 1257 |
+
"distance":"1799",
|
| 1258 |
+
"class_type":[
|
| 1259 |
+
"2A",
|
| 1260 |
+
"3A",
|
| 1261 |
+
"SL"
|
| 1262 |
+
],
|
| 1263 |
+
"day_of_journey":2
|
| 1264 |
+
}
|
| 1265 |
+
]
|
| 1266 |
+
},
|
| 1267 |
+
"headers":{
|
| 1268 |
+
"access-control-allow-credentials":"true",
|
| 1269 |
+
"access-control-allow-origin":"*",
|
| 1270 |
+
"content-length":"1513",
|
| 1271 |
+
"content-type":"application/json; charset=utf-8",
|
| 1272 |
+
"date":"Tue, 11 Oct 2022 12:13:04 GMT",
|
| 1273 |
+
"etag":"W/\"5e9-V8s16Rfh8vbmfV4QNSS/FljFcHA\"",
|
| 1274 |
+
"server":"RapidAPI-1.2.8",
|
| 1275 |
+
"x-powered-by":"Express",
|
| 1276 |
+
"x-rapidapi-region":"AWS - ap-southeast-1",
|
| 1277 |
+
"x-rapidapi-version":"1.2.8"
|
| 1278 |
+
},
|
| 1279 |
+
"schema":{}
|
| 1280 |
+
},
|
| 1281 |
+
{
|
| 1282 |
+
"name":"CheckPNRStatus",
|
| 1283 |
+
"url":"https://irctc1.p.rapidapi.com/api/v2/getPNRStatus",
|
| 1284 |
+
"description":"-",
|
| 1285 |
+
"method":"GET",
|
| 1286 |
+
"required_parameters":[
|
| 1287 |
+
{
|
| 1288 |
+
"name":"pnrNumber",
|
| 1289 |
+
"type":"STRING",
|
| 1290 |
+
"description":"",
|
| 1291 |
+
"default":""
|
| 1292 |
+
}
|
| 1293 |
+
],
|
| 1294 |
+
"optional_parameters":[],
|
| 1295 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v2/getPNRStatus\"\nquerystring = {\"pnrNumber\": pnrnumber}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 1296 |
+
"statuscode":111,
|
| 1297 |
+
"body":"",
|
| 1298 |
+
"headers":"",
|
| 1299 |
+
"schema":""
|
| 1300 |
+
},
|
| 1301 |
+
{
|
| 1302 |
+
"name":"GetFare",
|
| 1303 |
+
"url":"https://irctc1.p.rapidapi.com/api/v1/getFare",
|
| 1304 |
+
"description":" ",
|
| 1305 |
+
"method":"GET",
|
| 1306 |
+
"required_parameters":[
|
| 1307 |
+
{
|
| 1308 |
+
"name":"trainNo",
|
| 1309 |
+
"type":"NUMBER",
|
| 1310 |
+
"description":"",
|
| 1311 |
+
"default":19038
|
| 1312 |
+
},
|
| 1313 |
+
{
|
| 1314 |
+
"name":"fromStationCode",
|
| 1315 |
+
"type":"STRING",
|
| 1316 |
+
"description":"",
|
| 1317 |
+
"default":"bvi"
|
| 1318 |
+
},
|
| 1319 |
+
{
|
| 1320 |
+
"name":"toStationCode",
|
| 1321 |
+
"type":"STRING",
|
| 1322 |
+
"description":"",
|
| 1323 |
+
"default":"st"
|
| 1324 |
+
}
|
| 1325 |
+
],
|
| 1326 |
+
"optional_parameters":[],
|
| 1327 |
+
"code":"import requests\n\nurl = \"https://irctc1.p.rapidapi.com/api/v1/getFare\"\nquerystring = {\"trainNo\": trainno, \"fromStationCode\": fromstationcode, \"toStationCode\": tostationcode}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"irctc1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 1328 |
+
"statuscode":200,
|
| 1329 |
+
"body":{},
|
| 1330 |
+
"headers":{},
|
| 1331 |
+
"schema":{}
|
| 1332 |
+
}
|
| 1333 |
+
]
|
| 1334 |
+
}
|
toolbench/toolenv/tools/Travel/irctc/api.py
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def checkseatavailability(quota: str, trainno: int, tostationcode: str, fromstationcode: str, date: str, classtype: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"-"
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://irctc1.p.rapidapi.com/api/v1/checkseatavailability"
|
| 15 |
+
querystring = {'quota': quota, 'trainNo': trainno, 'toStationCode': tostationcode, 'fromStationCode': fromstationcode, 'date': date, 'classType': classtype, }
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
| 30 |
+
def get_live_station(hours: str, fromstationcode: str, tostationcode: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 31 |
+
"""
|
| 32 |
+
"-"
|
| 33 |
+
|
| 34 |
+
"""
|
| 35 |
+
url = f"https://irctc1.p.rapidapi.com/api/v3/getlivestation"
|
| 36 |
+
querystring = {'hours': hours, 'fromStationCode': fromstationcode, 'toStationCode': tostationcode, }
|
| 37 |
+
|
| 38 |
+
headers = {
|
| 39 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 40 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 45 |
+
try:
|
| 46 |
+
observation = response.json()
|
| 47 |
+
except:
|
| 48 |
+
observation = response.text
|
| 49 |
+
return observation
|
| 50 |
+
|
| 51 |
+
def gettrainclasses(trainno: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 52 |
+
"""
|
| 53 |
+
" "
|
| 54 |
+
|
| 55 |
+
"""
|
| 56 |
+
url = f"https://irctc1.p.rapidapi.com/api/v1/gettrainclasses"
|
| 57 |
+
querystring = {'trainNo': trainno, }
|
| 58 |
+
|
| 59 |
+
headers = {
|
| 60 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 61 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 66 |
+
try:
|
| 67 |
+
observation = response.json()
|
| 68 |
+
except:
|
| 69 |
+
observation = response.text
|
| 70 |
+
return observation
|
| 71 |
+
|
| 72 |
+
def get_pnr_status_v3(pnrnumber: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 73 |
+
"""
|
| 74 |
+
"-"
|
| 75 |
+
|
| 76 |
+
"""
|
| 77 |
+
url = f"https://irctc1.p.rapidapi.com/api/v3/getpnrstatus"
|
| 78 |
+
querystring = {'pnrNumber': pnrnumber, }
|
| 79 |
+
|
| 80 |
+
headers = {
|
| 81 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 82 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 87 |
+
try:
|
| 88 |
+
observation = response.json()
|
| 89 |
+
except:
|
| 90 |
+
observation = response.text
|
| 91 |
+
return observation
|
| 92 |
+
|
| 93 |
+
def searchstation(query: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 94 |
+
"""
|
| 95 |
+
" "
|
| 96 |
+
|
| 97 |
+
"""
|
| 98 |
+
url = f"https://irctc1.p.rapidapi.com/api/v1/searchstation"
|
| 99 |
+
querystring = {'query': query, }
|
| 100 |
+
|
| 101 |
+
headers = {
|
| 102 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 103 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 108 |
+
try:
|
| 109 |
+
observation = response.json()
|
| 110 |
+
except:
|
| 111 |
+
observation = response.text
|
| 112 |
+
return observation
|
| 113 |
+
|
| 114 |
+
def searchtrain(query: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 115 |
+
"""
|
| 116 |
+
" "
|
| 117 |
+
|
| 118 |
+
"""
|
| 119 |
+
url = f"https://irctc1.p.rapidapi.com/api/v1/searchtrain"
|
| 120 |
+
querystring = {'query': query, }
|
| 121 |
+
|
| 122 |
+
headers = {
|
| 123 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 124 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 129 |
+
try:
|
| 130 |
+
observation = response.json()
|
| 131 |
+
except:
|
| 132 |
+
observation = response.text
|
| 133 |
+
return observation
|
| 134 |
+
|
| 135 |
+
def get_train_live_status(trainno: str, startday: str='1', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 136 |
+
"""
|
| 137 |
+
"This API will take train no and day of journey, and will return current status of train with other informations."
|
| 138 |
+
startday: Optional File
|
| 139 |
+
start day range from 0-4
|
| 140 |
+
0 = Day 1
|
| 141 |
+
1 = 1 Day Ago
|
| 142 |
+
2 = 2 Day Ago
|
| 143 |
+
3 = 3 Day Ago
|
| 144 |
+
4 = 4 Day Ago
|
| 145 |
+
|
| 146 |
+
"""
|
| 147 |
+
url = f"https://irctc1.p.rapidapi.com/api/v1/livetrainstatus"
|
| 148 |
+
querystring = {'trainNo': trainno, }
|
| 149 |
+
if startday:
|
| 150 |
+
querystring['startDay'] = startday
|
| 151 |
+
|
| 152 |
+
headers = {
|
| 153 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 154 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 159 |
+
try:
|
| 160 |
+
observation = response.json()
|
| 161 |
+
except:
|
| 162 |
+
observation = response.text
|
| 163 |
+
return observation
|
| 164 |
+
|
| 165 |
+
def trainsbetweenstations_v3(dateofjourney: str, tostationcode: str, fromstationcode: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 166 |
+
"""
|
| 167 |
+
"-"
|
| 168 |
+
|
| 169 |
+
"""
|
| 170 |
+
url = f"https://irctc1.p.rapidapi.com/api/v3/trainbetweenstations"
|
| 171 |
+
querystring = {'dateOfJourney': dateofjourney, 'toStationCode': tostationcode, 'fromStationCode': fromstationcode, }
|
| 172 |
+
|
| 173 |
+
headers = {
|
| 174 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 175 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 180 |
+
try:
|
| 181 |
+
observation = response.json()
|
| 182 |
+
except:
|
| 183 |
+
observation = response.text
|
| 184 |
+
return observation
|
| 185 |
+
|
| 186 |
+
def get_train_schedule(trainno: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 187 |
+
"""
|
| 188 |
+
"-"
|
| 189 |
+
|
| 190 |
+
"""
|
| 191 |
+
url = f"https://irctc1.p.rapidapi.com/api/v1/gettrainschedule"
|
| 192 |
+
querystring = {'trainNo': trainno, }
|
| 193 |
+
|
| 194 |
+
headers = {
|
| 195 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 196 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 201 |
+
try:
|
| 202 |
+
observation = response.json()
|
| 203 |
+
except:
|
| 204 |
+
observation = response.text
|
| 205 |
+
return observation
|
| 206 |
+
|
| 207 |
+
def get_fare(trainno: int, tostationcode: str, fromstationcode: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 208 |
+
"""
|
| 209 |
+
"-"
|
| 210 |
+
|
| 211 |
+
"""
|
| 212 |
+
url = f"https://irctc1.p.rapidapi.com/api/v2/getfare"
|
| 213 |
+
querystring = {'trainNo': trainno, 'toStationCode': tostationcode, 'fromStationCode': fromstationcode, }
|
| 214 |
+
|
| 215 |
+
headers = {
|
| 216 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 217 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 222 |
+
try:
|
| 223 |
+
observation = response.json()
|
| 224 |
+
except:
|
| 225 |
+
observation = response.text
|
| 226 |
+
return observation
|
| 227 |
+
|
| 228 |
+
def get_trains_by_station(stationcode: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 229 |
+
"""
|
| 230 |
+
"-"
|
| 231 |
+
|
| 232 |
+
"""
|
| 233 |
+
url = f"https://irctc1.p.rapidapi.com/api/v3/gettrainsbystation"
|
| 234 |
+
querystring = {'stationCode': stationcode, }
|
| 235 |
+
|
| 236 |
+
headers = {
|
| 237 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 238 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
|
| 242 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 243 |
+
try:
|
| 244 |
+
observation = response.json()
|
| 245 |
+
except:
|
| 246 |
+
observation = response.text
|
| 247 |
+
return observation
|
| 248 |
+
|
| 249 |
+
def trainsbetweenstations(tostationcode: str, fromstationcode: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 250 |
+
"""
|
| 251 |
+
"-"
|
| 252 |
+
|
| 253 |
+
"""
|
| 254 |
+
url = f"https://irctc1.p.rapidapi.com/api/v2/trainbetweenstations"
|
| 255 |
+
querystring = {'toStationCode': tostationcode, 'fromStationCode': fromstationcode, }
|
| 256 |
+
|
| 257 |
+
headers = {
|
| 258 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 259 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 264 |
+
try:
|
| 265 |
+
observation = response.json()
|
| 266 |
+
except:
|
| 267 |
+
observation = response.text
|
| 268 |
+
return observation
|
| 269 |
+
|
| 270 |
+
def checkpnrstatus(pnrnumber: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 271 |
+
"""
|
| 272 |
+
"-"
|
| 273 |
+
|
| 274 |
+
"""
|
| 275 |
+
url = f"https://irctc1.p.rapidapi.com/api/v2/getpnrstatus"
|
| 276 |
+
querystring = {'pnrNumber': pnrnumber, }
|
| 277 |
+
|
| 278 |
+
headers = {
|
| 279 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 280 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 285 |
+
try:
|
| 286 |
+
observation = response.json()
|
| 287 |
+
except:
|
| 288 |
+
observation = response.text
|
| 289 |
+
return observation
|
| 290 |
+
|
| 291 |
+
def getfare(trainno: int, fromstationcode: str, tostationcode: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 292 |
+
"""
|
| 293 |
+
" "
|
| 294 |
+
|
| 295 |
+
"""
|
| 296 |
+
url = f"https://irctc1.p.rapidapi.com/api/v1/getfare"
|
| 297 |
+
querystring = {'trainNo': trainno, 'fromStationCode': fromstationcode, 'toStationCode': tostationcode, }
|
| 298 |
+
|
| 299 |
+
headers = {
|
| 300 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 301 |
+
"X-RapidAPI-Host": "irctc1.p.rapidapi.com"
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
|
| 305 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 306 |
+
try:
|
| 307 |
+
observation = response.json()
|
| 308 |
+
except:
|
| 309 |
+
observation = response.text
|
| 310 |
+
return observation
|
| 311 |
+
|
toolbench/toolenv/tools/Travel/kayak_flights.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"product_id": "api_6edc7aca-dc8c-4af2-b95a-f5ce83465cb4",
|
| 3 |
+
"tool_description": "Pricing and flight itineraries information on KAYAK.",
|
| 4 |
+
"home_url": "https://rapidapi.com/traveldax-traveldax-default/api/kayak-flights/",
|
| 5 |
+
"name": "KAYAK Flights",
|
| 6 |
+
"title": "KAYAK Flights",
|
| 7 |
+
"pricing": "FREE",
|
| 8 |
+
"tool_name": "KAYAK Flights",
|
| 9 |
+
"score": {
|
| 10 |
+
"avgServiceLevel": 100,
|
| 11 |
+
"avgLatency": 662,
|
| 12 |
+
"avgSuccessRate": 100,
|
| 13 |
+
"popularityScore": 9.2,
|
| 14 |
+
"__typename": "Score"
|
| 15 |
+
},
|
| 16 |
+
"host": "kayak-flights.p.rapidapi.com",
|
| 17 |
+
"api_list": [
|
| 18 |
+
{
|
| 19 |
+
"name": "Results",
|
| 20 |
+
"url": "https://kayak-flights.p.rapidapi.com/results",
|
| 21 |
+
"description": "Pricing and results data as it appears on the source website.",
|
| 22 |
+
"method": "GET",
|
| 23 |
+
"required_parameters": [
|
| 24 |
+
{
|
| 25 |
+
"name": "m",
|
| 26 |
+
"type": "STRING",
|
| 27 |
+
"description": "",
|
| 28 |
+
"default": "5"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"name": "token",
|
| 32 |
+
"type": "STRING",
|
| 33 |
+
"description": "",
|
| 34 |
+
"default": "API_KEY"
|
| 35 |
+
}
|
| 36 |
+
],
|
| 37 |
+
"optional_parameters": [],
|
| 38 |
+
"code": "import requests\n\nurl = \"https://kayak-flights.p.rapidapi.com/results\"\nquerystring = {\"m\": \"5\", \"token\": \"API_KEY\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kayak-flights.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 39 |
+
"convert_code": "import requests\n\nurl = \"https://kayak-flights.p.rapidapi.com/results\"\nquerystring = {\"m\": \"5\", \"token\": \"API_KEY\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kayak-flights.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
|
| 40 |
+
"test_endpoint": ""
|
| 41 |
+
}
|
| 42 |
+
],
|
| 43 |
+
"standardized_name": "kayak_flights"
|
| 44 |
+
}
|
toolbench/toolenv/tools/Travel/kayak_flights/api.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def results(m: str, token: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Pricing and results data as it appears on the source website."
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://kayak-flights.p.rapidapi.com/results"
|
| 15 |
+
querystring = {'m': m, 'token': token, }
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "kayak-flights.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
toolbench/toolenv/tools/Travel/live_traffic_images.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
toolbench/toolenv/tools/Travel/live_traffic_images/api.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def get_traffic_image(key: str, country: str, district: str=None, region: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Return a live traffic image captured by cctv camera on the road.
|
| 12 |
+
*Image might not be display correctly here due to base64 issue of Test Endpoint, but it work indeed.*
|
| 13 |
+
- Visit our [demo site](https://core-api.net/traffic/map.html)
|
| 14 |
+
- Read [documentation guide](https://apicorehub.web.app/traffic/guide.html)"
|
| 15 |
+
key: Camera key in [Camera Key List](https://apicorehub.web.app/traffic/guide.html)
|
| 16 |
+
district: District number of California, US
|
| 17 |
+
Refer to [Camera Key List](https://apicorehub.web.app/traffic/guide.html)
|
| 18 |
+
region: Refer to [Camera Key List](https://apicorehub.web.app/traffic/guide.html)
|
| 19 |
+
|
| 20 |
+
"""
|
| 21 |
+
url = f"https://live-traffic-images.p.rapidapi.com/get_image"
|
| 22 |
+
querystring = {'key': key, 'country': country, }
|
| 23 |
+
if district:
|
| 24 |
+
querystring['district'] = district
|
| 25 |
+
if region:
|
| 26 |
+
querystring['region'] = region
|
| 27 |
+
|
| 28 |
+
headers = {
|
| 29 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 30 |
+
"X-RapidAPI-Host": "live-traffic-images.p.rapidapi.com"
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 35 |
+
try:
|
| 36 |
+
observation = response.json()
|
| 37 |
+
except:
|
| 38 |
+
observation = response.text
|
| 39 |
+
return observation
|
| 40 |
+
|
| 41 |
+
def camera_key_list(country: str, district: str=None, region: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 42 |
+
"""
|
| 43 |
+
"Refer to [Camera Key List](https://core-api.net/traffic/guide.html)"
|
| 44 |
+
|
| 45 |
+
"""
|
| 46 |
+
url = f"https://live-traffic-images.p.rapidapi.com/get_camera_list"
|
| 47 |
+
querystring = {'country': country, }
|
| 48 |
+
if district:
|
| 49 |
+
querystring['district'] = district
|
| 50 |
+
if region:
|
| 51 |
+
querystring['region'] = region
|
| 52 |
+
|
| 53 |
+
headers = {
|
| 54 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 55 |
+
"X-RapidAPI-Host": "live-traffic-images.p.rapidapi.com"
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 60 |
+
try:
|
| 61 |
+
observation = response.json()
|
| 62 |
+
except:
|
| 63 |
+
observation = response.text
|
| 64 |
+
return observation
|
| 65 |
+
|
toolbench/toolenv/tools/Travel/madrid_barajas_airport_flights.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"Madrid Barajas Airport Flights",
|
| 3 |
+
"tool_description":"Departures and arrivals from the Madrid airport",
|
| 4 |
+
"title":"Madrid Barajas Airport Flights",
|
| 5 |
+
"pricing":"FREEMIUM",
|
| 6 |
+
"score":{
|
| 7 |
+
"avgServiceLevel":100,
|
| 8 |
+
"avgLatency":478,
|
| 9 |
+
"avgSuccessRate":0,
|
| 10 |
+
"popularityScore":0,
|
| 11 |
+
"__typename":"Score"
|
| 12 |
+
},
|
| 13 |
+
"home_url":"https://rapidapi.com/Rotanev/api/madrid-barajas-airport-flights/",
|
| 14 |
+
"host":"madrid-barajas-airport-flights.p.rapidapi.com",
|
| 15 |
+
"api_list":[
|
| 16 |
+
{
|
| 17 |
+
"name":"Departures",
|
| 18 |
+
"url":"https://madrid-barajas-airport-flights.p.rapidapi.com/MAD/departures",
|
| 19 |
+
"description":"Get a list of vailable departures up to two days.",
|
| 20 |
+
"method":"GET",
|
| 21 |
+
"required_parameters":[],
|
| 22 |
+
"optional_parameters":[],
|
| 23 |
+
"code":"import requests\n\nurl = \"https://madrid-barajas-airport-flights.p.rapidapi.com/MAD/departures\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"madrid-barajas-airport-flights.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 24 |
+
"statuscode":111,
|
| 25 |
+
"body":"",
|
| 26 |
+
"headers":"",
|
| 27 |
+
"schema":""
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"name":"Arrivals",
|
| 31 |
+
"url":"https://madrid-barajas-airport-flights.p.rapidapi.com/MAD/Arrivals",
|
| 32 |
+
"description":"Get a list of available arrivals up to two days.",
|
| 33 |
+
"method":"GET",
|
| 34 |
+
"required_parameters":[],
|
| 35 |
+
"optional_parameters":[],
|
| 36 |
+
"code":"import requests\n\nurl = \"https://madrid-barajas-airport-flights.p.rapidapi.com/MAD/Arrivals\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"madrid-barajas-airport-flights.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 37 |
+
"statuscode":200,
|
| 38 |
+
"body":{
|
| 39 |
+
"key1":"value",
|
| 40 |
+
"key2":"value"
|
| 41 |
+
},
|
| 42 |
+
"headers":{},
|
| 43 |
+
"schema":{}
|
| 44 |
+
}
|
| 45 |
+
]
|
| 46 |
+
}
|
toolbench/toolenv/tools/Travel/madrid_barajas_airport_flights/api.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def departures(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Get a list of vailable departures up to two days."
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://madrid-barajas-airport-flights.p.rapidapi.com/mad/departures"
|
| 15 |
+
querystring = {}
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "madrid-barajas-airport-flights.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
| 30 |
+
def arrivals(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 31 |
+
"""
|
| 32 |
+
"Get a list of available arrivals up to two days."
|
| 33 |
+
|
| 34 |
+
"""
|
| 35 |
+
url = f"https://madrid-barajas-airport-flights.p.rapidapi.com/mad/arrivals"
|
| 36 |
+
querystring = {}
|
| 37 |
+
|
| 38 |
+
headers = {
|
| 39 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 40 |
+
"X-RapidAPI-Host": "madrid-barajas-airport-flights.p.rapidapi.com"
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 45 |
+
try:
|
| 46 |
+
observation = response.json()
|
| 47 |
+
except:
|
| 48 |
+
observation = response.text
|
| 49 |
+
return observation
|
| 50 |
+
|
toolbench/toolenv/tools/Travel/makcorps_hotel_price_comparison.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"product_id": "5b064d19e4b0cbaa221aa798",
|
| 3 |
+
"tool_description": "MakCorps (www.makcorps.com ) API lets you compare hotel room prices from more than 200 websites like agoda.com, booking.com , hotels.com,amoma.com,etc. Response will consist of top 3 vendors along with the best vendor. Address , reviews, ratings , features, etc are the part of JSON response. This API is simple to implement so you can keep smiling. Our database is regularly updated to reflect new changes in Hotel prices and availability. Our API quickly responds to your queries so your app doe...",
|
| 4 |
+
"home_url": "https://rapidapi.com/manthankool/api/makcorps-hotel-price-comparison/",
|
| 5 |
+
"name": "MakCorps - Hotel Price Comparison",
|
| 6 |
+
"title": "MakCorps - Hotel Price Comparison",
|
| 7 |
+
"pricing": "PAID",
|
| 8 |
+
"tool_name": "MakCorps - Hotel Price Comparison",
|
| 9 |
+
"score": null,
|
| 10 |
+
"host": "manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com",
|
| 11 |
+
"api_list": [
|
| 12 |
+
{
|
| 13 |
+
"name": "auth",
|
| 14 |
+
"url": "https://manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com/auth",
|
| 15 |
+
"description": "",
|
| 16 |
+
"method": "POST",
|
| 17 |
+
"required_parameters": [],
|
| 18 |
+
"optional_parameters": [],
|
| 19 |
+
"code": "import requests\n\nurl = \"https://manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com/auth\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
|
| 20 |
+
"convert_code": "import requests\n\nurl = \"https://manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com/auth\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
|
| 21 |
+
"test_endpoint": ""
|
| 22 |
+
}
|
| 23 |
+
]
|
| 24 |
+
}
|
toolbench/toolenv/tools/Travel/makcorps_hotel_price_comparison/api.py
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def free(location: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"This is a free resource for testing purposes. It will give you the list of 7 hotels with top vendors. visit makcorps.com for more info"
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com/free/{location}"
|
| 15 |
+
querystring = {}
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
| 30 |
+
def king(location: str, check_out_date: str, check_in_date: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 31 |
+
"""
|
| 32 |
+
"This endpoint allows user to get hotel room prices from more than 200 websites like agoda.com,booking.com,hotels.com,etc. And compares them. Hotel prices are based on the check-in and check-out date. visit makcorps.com for API key"
|
| 33 |
+
|
| 34 |
+
"""
|
| 35 |
+
url = f"https://manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com/king/v2/{jakarta}/{2018-05-25}/{2018-05-28}"
|
| 36 |
+
querystring = {'location': location, 'check-out-date': check_out_date, 'check-in-date': check_in_date, }
|
| 37 |
+
|
| 38 |
+
headers = {
|
| 39 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 40 |
+
"X-RapidAPI-Host": "manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com"
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 45 |
+
try:
|
| 46 |
+
observation = response.json()
|
| 47 |
+
except:
|
| 48 |
+
observation = response.text
|
| 49 |
+
return observation
|
| 50 |
+
|
| 51 |
+
def classic_api(check_out: str, hotel_name: str, location: str, currency: str, no_of_guest: str, check_in: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 52 |
+
"""
|
| 53 |
+
"Search any hotel by its name and location and get top 6 vendors/top OTAs within the JSON response. visit - makcorps.com for API key"
|
| 54 |
+
|
| 55 |
+
"""
|
| 56 |
+
url = f"https://manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com/flashdel/v2/{hotel_name}/{location}/{currency}/{no_of_guest}/{check_in}/{check_out}"
|
| 57 |
+
querystring = {}
|
| 58 |
+
|
| 59 |
+
headers = {
|
| 60 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 61 |
+
"X-RapidAPI-Host": "manthankool-makcorps-hotel-price-comparison-v1.p.rapidapi.com"
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 66 |
+
try:
|
| 67 |
+
observation = response.json()
|
| 68 |
+
except:
|
| 69 |
+
observation = response.text
|
| 70 |
+
return observation
|
| 71 |
+
|
toolbench/toolenv/tools/Travel/manston_metar/api.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def egmh_json(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
""
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://manstonmetar.p.rapidapi.com/json.php"
|
| 15 |
+
querystring = {}
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "manstonmetar.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
toolbench/toolenv/tools/Travel/mohawk_language/api.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def json(unique_id: str, say: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Text and Secret Commands to send to Bot. Bot responds with JSON"
|
| 12 |
+
unique_id: unique conversation id.
|
| 13 |
+
say: Text and Secret Commands sent to Bot.
|
| 14 |
+
|
| 15 |
+
"""
|
| 16 |
+
url = f"https://monigarr-mohawk-language-bot-v1.p.rapidapi.com/conversation_start.php?bot_id=1&say={say}&convo_id={unique_id}&format=json"
|
| 17 |
+
querystring = {}
|
| 18 |
+
|
| 19 |
+
headers = {
|
| 20 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 21 |
+
"X-RapidAPI-Host": "monigarr-mohawk-language-bot-v1.p.rapidapi.com"
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 26 |
+
try:
|
| 27 |
+
observation = response.json()
|
| 28 |
+
except:
|
| 29 |
+
observation = response.text
|
| 30 |
+
return observation
|
| 31 |
+
|
toolbench/toolenv/tools/Travel/motoka_ug/api.py
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def search_by_id(is_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"This provides the ability to search by ID. The ID can be retrieved by using the other endpoints."
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://motokaug.p.rapidapi.com/searchbyid/{is_id}"
|
| 15 |
+
querystring = {}
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "motokaug.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
| 30 |
+
def tax_value_by_model_make_year(make: str, model: str, year: int, type: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 31 |
+
"""
|
| 32 |
+
""
|
| 33 |
+
make: Make/Brand of vehicle e.g. BMW
|
| 34 |
+
model: Model of vehicle e.g 1 series
|
| 35 |
+
year: Year of Manufacture e.g. 2007
|
| 36 |
+
type: Possible Value: 'full' or 'quick'. If Type = 'quick', response only includes tax valuation. If Type = 'full' then response also includes import duty, environmental levy, infrastructure levy, VAT and with-holding tax
|
| 37 |
+
|
| 38 |
+
"""
|
| 39 |
+
url = f"https://motokaug.p.rapidapi.com/taxvaluebyyear/{make}/{model}/{year}/{type}"
|
| 40 |
+
querystring = {}
|
| 41 |
+
if type:
|
| 42 |
+
querystring['type'] = type
|
| 43 |
+
|
| 44 |
+
headers = {
|
| 45 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 46 |
+
"X-RapidAPI-Host": "motokaug.p.rapidapi.com"
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 51 |
+
try:
|
| 52 |
+
observation = response.json()
|
| 53 |
+
except:
|
| 54 |
+
observation = response.text
|
| 55 |
+
return observation
|
| 56 |
+
|
| 57 |
+
def tax_value_by_model_make_year_trim(make: str, model: str, trim: str, year: int, type: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 58 |
+
"""
|
| 59 |
+
""
|
| 60 |
+
make: Make/Brand of vehicle e.g. BMW
|
| 61 |
+
model: Model of vehicle e.g 1 series
|
| 62 |
+
trim: Trim of vehicle e.g. ABA-UD20 or 2L
|
| 63 |
+
year: Year of Manufacture e.g. 2007
|
| 64 |
+
type: Possible Value: 'full' or 'quick'. If Type = 'quick', response only includes tax valuation. If Type = 'full' then response also includes import duty, environmental levy, infrastructure levy, VAT and with-holding tax
|
| 65 |
+
|
| 66 |
+
"""
|
| 67 |
+
url = f"https://motokaug.p.rapidapi.com/taxvaluebytrim/{make}/{model}/{year}/{trim}/{type}"
|
| 68 |
+
querystring = {}
|
| 69 |
+
if type:
|
| 70 |
+
querystring['type'] = type
|
| 71 |
+
|
| 72 |
+
headers = {
|
| 73 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 74 |
+
"X-RapidAPI-Host": "motokaug.p.rapidapi.com"
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 79 |
+
try:
|
| 80 |
+
observation = response.json()
|
| 81 |
+
except:
|
| 82 |
+
observation = response.text
|
| 83 |
+
return observation
|
| 84 |
+
|
| 85 |
+
def tax_valuation_by_search_term(searchtext: str, type: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 86 |
+
"""
|
| 87 |
+
"Retrieve tax valuation based on search term"
|
| 88 |
+
searchtext: search term to be identified e.g. Nissan Murano 2003
|
| 89 |
+
type: Possible Value: 'full' or 'quick'. If Type = 'quick', response only includes tax valuation. If Type = 'full' then response also includes import duty, environmental levy, infrastructure levy, VAT and with-holding tax
|
| 90 |
+
|
| 91 |
+
"""
|
| 92 |
+
url = f"https://motokaug.p.rapidapi.com/search/{searchtext}/{type}"
|
| 93 |
+
querystring = {}
|
| 94 |
+
if type:
|
| 95 |
+
querystring['type'] = type
|
| 96 |
+
|
| 97 |
+
headers = {
|
| 98 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 99 |
+
"X-RapidAPI-Host": "motokaug.p.rapidapi.com"
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 104 |
+
try:
|
| 105 |
+
observation = response.json()
|
| 106 |
+
except:
|
| 107 |
+
observation = response.text
|
| 108 |
+
return observation
|
| 109 |
+
|
| 110 |
+
def all_models(make: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 111 |
+
"""
|
| 112 |
+
"Retrieve all models related to a specified make/brand of vehicle"
|
| 113 |
+
make: Make/Brand of vehicle
|
| 114 |
+
|
| 115 |
+
"""
|
| 116 |
+
url = f"https://motokaug.p.rapidapi.com/model/{make}"
|
| 117 |
+
querystring = {}
|
| 118 |
+
|
| 119 |
+
headers = {
|
| 120 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 121 |
+
"X-RapidAPI-Host": "motokaug.p.rapidapi.com"
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 126 |
+
try:
|
| 127 |
+
observation = response.json()
|
| 128 |
+
except:
|
| 129 |
+
observation = response.text
|
| 130 |
+
return observation
|
| 131 |
+
|
| 132 |
+
def all_makes(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 133 |
+
"""
|
| 134 |
+
"Retrieve all makes listed"
|
| 135 |
+
|
| 136 |
+
"""
|
| 137 |
+
url = f"https://motokaug.p.rapidapi.com/make"
|
| 138 |
+
querystring = {}
|
| 139 |
+
|
| 140 |
+
headers = {
|
| 141 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 142 |
+
"X-RapidAPI-Host": "motokaug.p.rapidapi.com"
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 147 |
+
try:
|
| 148 |
+
observation = response.json()
|
| 149 |
+
except:
|
| 150 |
+
observation = response.text
|
| 151 |
+
return observation
|
| 152 |
+
|
toolbench/toolenv/tools/Travel/multimodal_trip_planner.json
ADDED
|
@@ -0,0 +1,1655 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"Multimodal trip planner",
|
| 3 |
+
"tool_description":"Routing and turn-by-turn-direction for driving, cycling, walking or multimodal public transportation.",
|
| 4 |
+
"title":"Multimodal trip planner",
|
| 5 |
+
"pricing":"FREEMIUM",
|
| 6 |
+
"score":{
|
| 7 |
+
"avgServiceLevel":100,
|
| 8 |
+
"avgLatency":436,
|
| 9 |
+
"avgSuccessRate":100,
|
| 10 |
+
"popularityScore":9.3,
|
| 11 |
+
"__typename":"Score"
|
| 12 |
+
},
|
| 13 |
+
"home_url":"https://rapidapi.com/geoapify-gmbh-geoapify/api/multimodal-trip-planner/",
|
| 14 |
+
"host":"multimodal-trip-planner.p.rapidapi.com",
|
| 15 |
+
"api_list":[
|
| 16 |
+
{
|
| 17 |
+
"name":"Route and directions",
|
| 18 |
+
"url":"https://multimodal-trip-planner.p.rapidapi.com/v1/routing",
|
| 19 |
+
"description":"Calculate route between provided waypoints, including turn by turn directions",
|
| 20 |
+
"method":"GET",
|
| 21 |
+
"required_parameters":[
|
| 22 |
+
{
|
| 23 |
+
"name":"waypoints",
|
| 24 |
+
"type":"STRING",
|
| 25 |
+
"description":"List of two or more lat,lon coordinates, separated by the pipe symbol \\\"|\\\"",
|
| 26 |
+
"default":"48.34364,10.87474|48.37073,10.90925"
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"name":"mode",
|
| 30 |
+
"type":"STRING",
|
| 31 |
+
"description":"Routing mode - drive, truck, bicycle, walk or transit",
|
| 32 |
+
"default":"drive"
|
| 33 |
+
}
|
| 34 |
+
],
|
| 35 |
+
"optional_parameters":[],
|
| 36 |
+
"code":"import requests\n\nurl = \"https://multimodal-trip-planner.p.rapidapi.com/v1/routing\"\nquerystring = {\"waypoints\": waypoints, \"mode\": mode}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"multimodal-trip-planner.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 37 |
+
"statuscode":200,
|
| 38 |
+
"body":{
|
| 39 |
+
"type":"FeatureCollection",
|
| 40 |
+
"features":[
|
| 41 |
+
{
|
| 42 |
+
"type":"Feature",
|
| 43 |
+
"properties":{
|
| 44 |
+
"mode":"drive",
|
| 45 |
+
"time":1098,
|
| 46 |
+
"legs":[
|
| 47 |
+
{
|
| 48 |
+
"steps":[
|
| 49 |
+
{
|
| 50 |
+
"time":188,
|
| 51 |
+
"from_index":0,
|
| 52 |
+
"distance":1580,
|
| 53 |
+
"to_index":78,
|
| 54 |
+
"instruction":{
|
| 55 |
+
"text":"Drive north on Gögginger Straße."
|
| 56 |
+
}
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"time":337,
|
| 60 |
+
"from_index":78,
|
| 61 |
+
"distance":1305,
|
| 62 |
+
"to_index":158,
|
| 63 |
+
"instruction":{
|
| 64 |
+
"text":"Turn right onto Schertlinstraße."
|
| 65 |
+
}
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"time":33,
|
| 69 |
+
"from_index":158,
|
| 70 |
+
"distance":189,
|
| 71 |
+
"to_index":171,
|
| 72 |
+
"instruction":{
|
| 73 |
+
"text":"Turn right onto Haunstetter Straße."
|
| 74 |
+
}
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"time":65,
|
| 78 |
+
"from_index":171,
|
| 79 |
+
"distance":793,
|
| 80 |
+
"to_index":218,
|
| 81 |
+
"instruction":{
|
| 82 |
+
"text":"Turn left onto Inverness-Allee/B 300."
|
| 83 |
+
}
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"time":236,
|
| 87 |
+
"from_index":218,
|
| 88 |
+
"distance":2170,
|
| 89 |
+
"to_index":294,
|
| 90 |
+
"instruction":{
|
| 91 |
+
"text":"Continue on AS 1."
|
| 92 |
+
}
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"time":102,
|
| 96 |
+
"from_index":294,
|
| 97 |
+
"distance":1031,
|
| 98 |
+
"to_index":317,
|
| 99 |
+
"instruction":{
|
| 100 |
+
"text":"Turn left onto Berliner Allee/B 2."
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"time":16,
|
| 105 |
+
"from_index":317,
|
| 106 |
+
"distance":31,
|
| 107 |
+
"to_index":319,
|
| 108 |
+
"instruction":{
|
| 109 |
+
"text":"Turn left to take the ramp."
|
| 110 |
+
}
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"time":7,
|
| 114 |
+
"from_index":319,
|
| 115 |
+
"distance":71,
|
| 116 |
+
"to_index":324,
|
| 117 |
+
"instruction":{
|
| 118 |
+
"text":"Continue."
|
| 119 |
+
}
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"time":25,
|
| 123 |
+
"from_index":324,
|
| 124 |
+
"distance":145,
|
| 125 |
+
"to_index":332,
|
| 126 |
+
"instruction":{
|
| 127 |
+
"text":"Stay straight to take the ramp."
|
| 128 |
+
}
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"time":42,
|
| 132 |
+
"from_index":332,
|
| 133 |
+
"distance":399,
|
| 134 |
+
"to_index":342,
|
| 135 |
+
"instruction":{
|
| 136 |
+
"text":"Bear right onto Lechhauser Straße."
|
| 137 |
+
}
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"time":21,
|
| 141 |
+
"from_index":342,
|
| 142 |
+
"distance":37,
|
| 143 |
+
"to_index":345,
|
| 144 |
+
"instruction":{
|
| 145 |
+
"text":"Continue on Jakobertorplatz."
|
| 146 |
+
}
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"time":26,
|
| 150 |
+
"from_index":345,
|
| 151 |
+
"distance":15,
|
| 152 |
+
"to_index":348,
|
| 153 |
+
"instruction":{
|
| 154 |
+
"text":"Turn right onto Oblatterwallstraße."
|
| 155 |
+
}
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"time":0,
|
| 159 |
+
"from_index":348,
|
| 160 |
+
"distance":0,
|
| 161 |
+
"to_index":348,
|
| 162 |
+
"instruction":{
|
| 163 |
+
"text":"Your destination is on the left."
|
| 164 |
+
}
|
| 165 |
+
}
|
| 166 |
+
],
|
| 167 |
+
"time":1098,
|
| 168 |
+
"distance":7766
|
| 169 |
+
}
|
| 170 |
+
],
|
| 171 |
+
"distance":7766,
|
| 172 |
+
"waypoints":[
|
| 173 |
+
{
|
| 174 |
+
"location":[
|
| 175 |
+
10.87474,
|
| 176 |
+
48.343639
|
| 177 |
+
],
|
| 178 |
+
"original_index":0
|
| 179 |
+
},
|
| 180 |
+
{
|
| 181 |
+
"location":[
|
| 182 |
+
10.90925,
|
| 183 |
+
48.370731
|
| 184 |
+
],
|
| 185 |
+
"original_index":1
|
| 186 |
+
}
|
| 187 |
+
]
|
| 188 |
+
},
|
| 189 |
+
"geometry":{
|
| 190 |
+
"type":"MultiLineString",
|
| 191 |
+
"coordinates":[
|
| 192 |
+
[
|
| 193 |
+
[
|
| 194 |
+
10.874804,
|
| 195 |
+
48.343631
|
| 196 |
+
],
|
| 197 |
+
[
|
| 198 |
+
10.874852,
|
| 199 |
+
48.34378
|
| 200 |
+
],
|
| 201 |
+
[
|
| 202 |
+
10.874923,
|
| 203 |
+
48.34402
|
| 204 |
+
],
|
| 205 |
+
[
|
| 206 |
+
10.874951,
|
| 207 |
+
48.344108
|
| 208 |
+
],
|
| 209 |
+
[
|
| 210 |
+
10.874986,
|
| 211 |
+
48.344253
|
| 212 |
+
],
|
| 213 |
+
[
|
| 214 |
+
10.875007,
|
| 215 |
+
48.344341
|
| 216 |
+
],
|
| 217 |
+
[
|
| 218 |
+
10.875011,
|
| 219 |
+
48.344448
|
| 220 |
+
],
|
| 221 |
+
[
|
| 222 |
+
10.875012,
|
| 223 |
+
48.34449
|
| 224 |
+
],
|
| 225 |
+
[
|
| 226 |
+
10.875085,
|
| 227 |
+
48.344734
|
| 228 |
+
],
|
| 229 |
+
[
|
| 230 |
+
10.875105,
|
| 231 |
+
48.344791
|
| 232 |
+
],
|
| 233 |
+
[
|
| 234 |
+
10.875166,
|
| 235 |
+
48.344974
|
| 236 |
+
],
|
| 237 |
+
[
|
| 238 |
+
10.875212,
|
| 239 |
+
48.345085
|
| 240 |
+
],
|
| 241 |
+
[
|
| 242 |
+
10.875267,
|
| 243 |
+
48.345218
|
| 244 |
+
],
|
| 245 |
+
[
|
| 246 |
+
10.875287,
|
| 247 |
+
48.345256
|
| 248 |
+
],
|
| 249 |
+
[
|
| 250 |
+
10.875317,
|
| 251 |
+
48.345317
|
| 252 |
+
],
|
| 253 |
+
[
|
| 254 |
+
10.875336,
|
| 255 |
+
48.345355
|
| 256 |
+
],
|
| 257 |
+
[
|
| 258 |
+
10.875379,
|
| 259 |
+
48.345428
|
| 260 |
+
],
|
| 261 |
+
[
|
| 262 |
+
10.875399,
|
| 263 |
+
48.345462
|
| 264 |
+
],
|
| 265 |
+
[
|
| 266 |
+
10.875493,
|
| 267 |
+
48.345611
|
| 268 |
+
],
|
| 269 |
+
[
|
| 270 |
+
10.875526,
|
| 271 |
+
48.345664
|
| 272 |
+
],
|
| 273 |
+
[
|
| 274 |
+
10.875642,
|
| 275 |
+
48.345851
|
| 276 |
+
],
|
| 277 |
+
[
|
| 278 |
+
10.875667,
|
| 279 |
+
48.34589
|
| 280 |
+
],
|
| 281 |
+
[
|
| 282 |
+
10.875678,
|
| 283 |
+
48.345901
|
| 284 |
+
],
|
| 285 |
+
[
|
| 286 |
+
10.875735,
|
| 287 |
+
48.345947
|
| 288 |
+
],
|
| 289 |
+
[
|
| 290 |
+
10.875914,
|
| 291 |
+
48.346096
|
| 292 |
+
],
|
| 293 |
+
[
|
| 294 |
+
10.875964,
|
| 295 |
+
48.346153
|
| 296 |
+
],
|
| 297 |
+
[
|
| 298 |
+
10.876017,
|
| 299 |
+
48.346218
|
| 300 |
+
],
|
| 301 |
+
[
|
| 302 |
+
10.87605,
|
| 303 |
+
48.34626
|
| 304 |
+
],
|
| 305 |
+
[
|
| 306 |
+
10.876194,
|
| 307 |
+
48.346466
|
| 308 |
+
],
|
| 309 |
+
[
|
| 310 |
+
10.876205,
|
| 311 |
+
48.346481
|
| 312 |
+
],
|
| 313 |
+
[
|
| 314 |
+
10.876255,
|
| 315 |
+
48.346557
|
| 316 |
+
],
|
| 317 |
+
[
|
| 318 |
+
10.876314,
|
| 319 |
+
48.34666
|
| 320 |
+
],
|
| 321 |
+
[
|
| 322 |
+
10.876337,
|
| 323 |
+
48.346698
|
| 324 |
+
],
|
| 325 |
+
[
|
| 326 |
+
10.876374,
|
| 327 |
+
48.346763
|
| 328 |
+
],
|
| 329 |
+
[
|
| 330 |
+
10.876407,
|
| 331 |
+
48.346824
|
| 332 |
+
],
|
| 333 |
+
[
|
| 334 |
+
10.876529,
|
| 335 |
+
48.347053
|
| 336 |
+
],
|
| 337 |
+
[
|
| 338 |
+
10.876733,
|
| 339 |
+
48.347465
|
| 340 |
+
],
|
| 341 |
+
[
|
| 342 |
+
10.87708,
|
| 343 |
+
48.348258
|
| 344 |
+
],
|
| 345 |
+
[
|
| 346 |
+
10.87705,
|
| 347 |
+
48.348365
|
| 348 |
+
],
|
| 349 |
+
[
|
| 350 |
+
10.877243,
|
| 351 |
+
48.348796
|
| 352 |
+
],
|
| 353 |
+
[
|
| 354 |
+
10.877356,
|
| 355 |
+
48.34901
|
| 356 |
+
],
|
| 357 |
+
[
|
| 358 |
+
10.877452,
|
| 359 |
+
48.349159
|
| 360 |
+
],
|
| 361 |
+
[
|
| 362 |
+
10.877571,
|
| 363 |
+
48.349304
|
| 364 |
+
],
|
| 365 |
+
[
|
| 366 |
+
10.87779,
|
| 367 |
+
48.349552
|
| 368 |
+
],
|
| 369 |
+
[
|
| 370 |
+
10.877843,
|
| 371 |
+
48.349586
|
| 372 |
+
],
|
| 373 |
+
[
|
| 374 |
+
10.878051,
|
| 375 |
+
48.349723
|
| 376 |
+
],
|
| 377 |
+
[
|
| 378 |
+
10.87815,
|
| 379 |
+
48.349849
|
| 380 |
+
],
|
| 381 |
+
[
|
| 382 |
+
10.878284,
|
| 383 |
+
48.350013
|
| 384 |
+
],
|
| 385 |
+
[
|
| 386 |
+
10.878498,
|
| 387 |
+
48.350257
|
| 388 |
+
],
|
| 389 |
+
[
|
| 390 |
+
10.878566,
|
| 391 |
+
48.350341
|
| 392 |
+
],
|
| 393 |
+
[
|
| 394 |
+
10.878661,
|
| 395 |
+
48.350479
|
| 396 |
+
],
|
| 397 |
+
[
|
| 398 |
+
10.878726,
|
| 399 |
+
48.350605
|
| 400 |
+
],
|
| 401 |
+
[
|
| 402 |
+
10.878729,
|
| 403 |
+
48.350669
|
| 404 |
+
],
|
| 405 |
+
[
|
| 406 |
+
10.878731,
|
| 407 |
+
48.350704
|
| 408 |
+
],
|
| 409 |
+
[
|
| 410 |
+
10.878847,
|
| 411 |
+
48.350833
|
| 412 |
+
],
|
| 413 |
+
[
|
| 414 |
+
10.878934,
|
| 415 |
+
48.350933
|
| 416 |
+
],
|
| 417 |
+
[
|
| 418 |
+
10.87952,
|
| 419 |
+
48.3516
|
| 420 |
+
],
|
| 421 |
+
[
|
| 422 |
+
10.879955,
|
| 423 |
+
48.352081
|
| 424 |
+
],
|
| 425 |
+
[
|
| 426 |
+
10.88022,
|
| 427 |
+
48.352375
|
| 428 |
+
],
|
| 429 |
+
[
|
| 430 |
+
10.880291,
|
| 431 |
+
48.352451
|
| 432 |
+
],
|
| 433 |
+
[
|
| 434 |
+
10.880352,
|
| 435 |
+
48.352489
|
| 436 |
+
],
|
| 437 |
+
[
|
| 438 |
+
10.880605,
|
| 439 |
+
48.352649
|
| 440 |
+
],
|
| 441 |
+
[
|
| 442 |
+
10.880669,
|
| 443 |
+
48.352695
|
| 444 |
+
],
|
| 445 |
+
[
|
| 446 |
+
10.880789,
|
| 447 |
+
48.352832
|
| 448 |
+
],
|
| 449 |
+
[
|
| 450 |
+
10.88085,
|
| 451 |
+
48.352905
|
| 452 |
+
],
|
| 453 |
+
[
|
| 454 |
+
10.880968,
|
| 455 |
+
48.353038
|
| 456 |
+
],
|
| 457 |
+
[
|
| 458 |
+
10.881191,
|
| 459 |
+
48.353218
|
| 460 |
+
],
|
| 461 |
+
[
|
| 462 |
+
10.881313,
|
| 463 |
+
48.353294
|
| 464 |
+
],
|
| 465 |
+
[
|
| 466 |
+
10.881549,
|
| 467 |
+
48.353397
|
| 468 |
+
],
|
| 469 |
+
[
|
| 470 |
+
10.882041,
|
| 471 |
+
48.35361
|
| 472 |
+
],
|
| 473 |
+
[
|
| 474 |
+
10.882518,
|
| 475 |
+
48.35379
|
| 476 |
+
],
|
| 477 |
+
[
|
| 478 |
+
10.883263,
|
| 479 |
+
48.354072
|
| 480 |
+
],
|
| 481 |
+
[
|
| 482 |
+
10.88372,
|
| 483 |
+
48.354244
|
| 484 |
+
],
|
| 485 |
+
[
|
| 486 |
+
10.8841,
|
| 487 |
+
48.354393
|
| 488 |
+
],
|
| 489 |
+
[
|
| 490 |
+
10.884853,
|
| 491 |
+
48.354675
|
| 492 |
+
],
|
| 493 |
+
[
|
| 494 |
+
10.885095,
|
| 495 |
+
48.354793
|
| 496 |
+
],
|
| 497 |
+
[
|
| 498 |
+
10.885252,
|
| 499 |
+
48.354907
|
| 500 |
+
],
|
| 501 |
+
[
|
| 502 |
+
10.885351,
|
| 503 |
+
48.354991
|
| 504 |
+
],
|
| 505 |
+
[
|
| 506 |
+
10.885567,
|
| 507 |
+
48.355201
|
| 508 |
+
],
|
| 509 |
+
[
|
| 510 |
+
10.885651,
|
| 511 |
+
48.355171
|
| 512 |
+
],
|
| 513 |
+
[
|
| 514 |
+
10.886133,
|
| 515 |
+
48.35501
|
| 516 |
+
],
|
| 517 |
+
[
|
| 518 |
+
10.886927,
|
| 519 |
+
48.354755
|
| 520 |
+
],
|
| 521 |
+
[
|
| 522 |
+
10.88696,
|
| 523 |
+
48.354732
|
| 524 |
+
],
|
| 525 |
+
[
|
| 526 |
+
10.887007,
|
| 527 |
+
48.354728
|
| 528 |
+
],
|
| 529 |
+
[
|
| 530 |
+
10.887454,
|
| 531 |
+
48.354572
|
| 532 |
+
],
|
| 533 |
+
[
|
| 534 |
+
10.887784,
|
| 535 |
+
48.354454
|
| 536 |
+
],
|
| 537 |
+
[
|
| 538 |
+
10.887893,
|
| 539 |
+
48.354415
|
| 540 |
+
],
|
| 541 |
+
[
|
| 542 |
+
10.888667,
|
| 543 |
+
48.354152
|
| 544 |
+
],
|
| 545 |
+
[
|
| 546 |
+
10.88903,
|
| 547 |
+
48.354026
|
| 548 |
+
],
|
| 549 |
+
[
|
| 550 |
+
10.889432,
|
| 551 |
+
48.353893
|
| 552 |
+
],
|
| 553 |
+
[
|
| 554 |
+
10.889467,
|
| 555 |
+
48.35387
|
| 556 |
+
],
|
| 557 |
+
[
|
| 558 |
+
10.889516,
|
| 559 |
+
48.353866
|
| 560 |
+
],
|
| 561 |
+
[
|
| 562 |
+
10.889686,
|
| 563 |
+
48.353809
|
| 564 |
+
],
|
| 565 |
+
[
|
| 566 |
+
10.890011,
|
| 567 |
+
48.353698
|
| 568 |
+
],
|
| 569 |
+
[
|
| 570 |
+
10.890261,
|
| 571 |
+
48.353618
|
| 572 |
+
],
|
| 573 |
+
[
|
| 574 |
+
10.8907,
|
| 575 |
+
48.353458
|
| 576 |
+
],
|
| 577 |
+
[
|
| 578 |
+
10.890823,
|
| 579 |
+
48.353424
|
| 580 |
+
],
|
| 581 |
+
[
|
| 582 |
+
10.891029,
|
| 583 |
+
48.353393
|
| 584 |
+
],
|
| 585 |
+
[
|
| 586 |
+
10.891248,
|
| 587 |
+
48.353374
|
| 588 |
+
],
|
| 589 |
+
[
|
| 590 |
+
10.891554,
|
| 591 |
+
48.35334
|
| 592 |
+
],
|
| 593 |
+
[
|
| 594 |
+
10.891763,
|
| 595 |
+
48.353324
|
| 596 |
+
],
|
| 597 |
+
[
|
| 598 |
+
10.891835,
|
| 599 |
+
48.353317
|
| 600 |
+
],
|
| 601 |
+
[
|
| 602 |
+
10.89188,
|
| 603 |
+
48.353313
|
| 604 |
+
],
|
| 605 |
+
[
|
| 606 |
+
10.892013,
|
| 607 |
+
48.353302
|
| 608 |
+
],
|
| 609 |
+
[
|
| 610 |
+
10.892065,
|
| 611 |
+
48.353298
|
| 612 |
+
],
|
| 613 |
+
[
|
| 614 |
+
10.892259,
|
| 615 |
+
48.353282
|
| 616 |
+
],
|
| 617 |
+
[
|
| 618 |
+
10.892397,
|
| 619 |
+
48.353271
|
| 620 |
+
],
|
| 621 |
+
[
|
| 622 |
+
10.89266,
|
| 623 |
+
48.353252
|
| 624 |
+
],
|
| 625 |
+
[
|
| 626 |
+
10.892705,
|
| 627 |
+
48.353248
|
| 628 |
+
],
|
| 629 |
+
[
|
| 630 |
+
10.892749,
|
| 631 |
+
48.353248
|
| 632 |
+
],
|
| 633 |
+
[
|
| 634 |
+
10.893422,
|
| 635 |
+
48.353195
|
| 636 |
+
],
|
| 637 |
+
[
|
| 638 |
+
10.893785,
|
| 639 |
+
48.353157
|
| 640 |
+
],
|
| 641 |
+
[
|
| 642 |
+
10.893994,
|
| 643 |
+
48.353134
|
| 644 |
+
],
|
| 645 |
+
[
|
| 646 |
+
10.894342,
|
| 647 |
+
48.353092
|
| 648 |
+
],
|
| 649 |
+
[
|
| 650 |
+
10.894456,
|
| 651 |
+
48.35308
|
| 652 |
+
],
|
| 653 |
+
[
|
| 654 |
+
10.895668,
|
| 655 |
+
48.352954
|
| 656 |
+
],
|
| 657 |
+
[
|
| 658 |
+
10.895866,
|
| 659 |
+
48.352939
|
| 660 |
+
],
|
| 661 |
+
[
|
| 662 |
+
10.895911,
|
| 663 |
+
48.352931
|
| 664 |
+
],
|
| 665 |
+
[
|
| 666 |
+
10.896132,
|
| 667 |
+
48.352909
|
| 668 |
+
],
|
| 669 |
+
[
|
| 670 |
+
10.896681,
|
| 671 |
+
48.352844
|
| 672 |
+
],
|
| 673 |
+
[
|
| 674 |
+
10.896923,
|
| 675 |
+
48.352821
|
| 676 |
+
],
|
| 677 |
+
[
|
| 678 |
+
10.897139,
|
| 679 |
+
48.352798
|
| 680 |
+
],
|
| 681 |
+
[
|
| 682 |
+
10.897292,
|
| 683 |
+
48.352779
|
| 684 |
+
],
|
| 685 |
+
[
|
| 686 |
+
10.898122,
|
| 687 |
+
48.352699
|
| 688 |
+
],
|
| 689 |
+
[
|
| 690 |
+
10.898233,
|
| 691 |
+
48.352687
|
| 692 |
+
],
|
| 693 |
+
[
|
| 694 |
+
10.898497,
|
| 695 |
+
48.352657
|
| 696 |
+
],
|
| 697 |
+
[
|
| 698 |
+
10.898718,
|
| 699 |
+
48.352634
|
| 700 |
+
],
|
| 701 |
+
[
|
| 702 |
+
10.898776,
|
| 703 |
+
48.35263
|
| 704 |
+
],
|
| 705 |
+
[
|
| 706 |
+
10.898844,
|
| 707 |
+
48.352622
|
| 708 |
+
],
|
| 709 |
+
[
|
| 710 |
+
10.898964,
|
| 711 |
+
48.352611
|
| 712 |
+
],
|
| 713 |
+
[
|
| 714 |
+
10.898994,
|
| 715 |
+
48.352607
|
| 716 |
+
],
|
| 717 |
+
[
|
| 718 |
+
10.899106,
|
| 719 |
+
48.352596
|
| 720 |
+
],
|
| 721 |
+
[
|
| 722 |
+
10.899139,
|
| 723 |
+
48.352592
|
| 724 |
+
],
|
| 725 |
+
[
|
| 726 |
+
10.899197,
|
| 727 |
+
48.352584
|
| 728 |
+
],
|
| 729 |
+
[
|
| 730 |
+
10.899234,
|
| 731 |
+
48.352581
|
| 732 |
+
],
|
| 733 |
+
[
|
| 734 |
+
10.899366,
|
| 735 |
+
48.352565
|
| 736 |
+
],
|
| 737 |
+
[
|
| 738 |
+
10.899445,
|
| 739 |
+
48.352558
|
| 740 |
+
],
|
| 741 |
+
[
|
| 742 |
+
10.899476,
|
| 743 |
+
48.352554
|
| 744 |
+
],
|
| 745 |
+
[
|
| 746 |
+
10.899802,
|
| 747 |
+
48.352519
|
| 748 |
+
],
|
| 749 |
+
[
|
| 750 |
+
10.899819,
|
| 751 |
+
48.352519
|
| 752 |
+
],
|
| 753 |
+
[
|
| 754 |
+
10.899924,
|
| 755 |
+
48.352508
|
| 756 |
+
],
|
| 757 |
+
[
|
| 758 |
+
10.900136,
|
| 759 |
+
48.352481
|
| 760 |
+
],
|
| 761 |
+
[
|
| 762 |
+
10.900169,
|
| 763 |
+
48.352481
|
| 764 |
+
],
|
| 765 |
+
[
|
| 766 |
+
10.900206,
|
| 767 |
+
48.352474
|
| 768 |
+
],
|
| 769 |
+
[
|
| 770 |
+
10.900377,
|
| 771 |
+
48.352458
|
| 772 |
+
],
|
| 773 |
+
[
|
| 774 |
+
10.900403,
|
| 775 |
+
48.352455
|
| 776 |
+
],
|
| 777 |
+
[
|
| 778 |
+
10.900596,
|
| 779 |
+
48.352432
|
| 780 |
+
],
|
| 781 |
+
[
|
| 782 |
+
10.900643,
|
| 783 |
+
48.352428
|
| 784 |
+
],
|
| 785 |
+
[
|
| 786 |
+
10.900863,
|
| 787 |
+
48.352405
|
| 788 |
+
],
|
| 789 |
+
[
|
| 790 |
+
10.900884,
|
| 791 |
+
48.352401
|
| 792 |
+
],
|
| 793 |
+
[
|
| 794 |
+
10.900896,
|
| 795 |
+
48.352401
|
| 796 |
+
],
|
| 797 |
+
[
|
| 798 |
+
10.901333,
|
| 799 |
+
48.352352
|
| 800 |
+
],
|
| 801 |
+
[
|
| 802 |
+
10.901432,
|
| 803 |
+
48.352333
|
| 804 |
+
],
|
| 805 |
+
[
|
| 806 |
+
10.901513,
|
| 807 |
+
48.352321
|
| 808 |
+
],
|
| 809 |
+
[
|
| 810 |
+
10.901654,
|
| 811 |
+
48.35226
|
| 812 |
+
],
|
| 813 |
+
[
|
| 814 |
+
10.902129,
|
| 815 |
+
48.352172
|
| 816 |
+
],
|
| 817 |
+
[
|
| 818 |
+
10.902189,
|
| 819 |
+
48.352176
|
| 820 |
+
],
|
| 821 |
+
[
|
| 822 |
+
10.902226,
|
| 823 |
+
48.35218
|
| 824 |
+
],
|
| 825 |
+
[
|
| 826 |
+
10.902403,
|
| 827 |
+
48.352191
|
| 828 |
+
],
|
| 829 |
+
[
|
| 830 |
+
10.902474,
|
| 831 |
+
48.352066
|
| 832 |
+
],
|
| 833 |
+
[
|
| 834 |
+
10.902497,
|
| 835 |
+
48.35202
|
| 836 |
+
],
|
| 837 |
+
[
|
| 838 |
+
10.902749,
|
| 839 |
+
48.351501
|
| 840 |
+
],
|
| 841 |
+
[
|
| 842 |
+
10.902753,
|
| 843 |
+
48.351409
|
| 844 |
+
],
|
| 845 |
+
[
|
| 846 |
+
10.902762,
|
| 847 |
+
48.351329
|
| 848 |
+
],
|
| 849 |
+
[
|
| 850 |
+
10.902825,
|
| 851 |
+
48.351188
|
| 852 |
+
],
|
| 853 |
+
[
|
| 854 |
+
10.902874,
|
| 855 |
+
48.3511
|
| 856 |
+
],
|
| 857 |
+
[
|
| 858 |
+
10.902919,
|
| 859 |
+
48.351036
|
| 860 |
+
],
|
| 861 |
+
[
|
| 862 |
+
10.903,
|
| 863 |
+
48.350948
|
| 864 |
+
],
|
| 865 |
+
[
|
| 866 |
+
10.903061,
|
| 867 |
+
48.350879
|
| 868 |
+
],
|
| 869 |
+
[
|
| 870 |
+
10.903149,
|
| 871 |
+
48.350807
|
| 872 |
+
],
|
| 873 |
+
[
|
| 874 |
+
10.90325,
|
| 875 |
+
48.350734
|
| 876 |
+
],
|
| 877 |
+
[
|
| 878 |
+
10.903404,
|
| 879 |
+
48.350677
|
| 880 |
+
],
|
| 881 |
+
[
|
| 882 |
+
10.903463,
|
| 883 |
+
48.350769
|
| 884 |
+
],
|
| 885 |
+
[
|
| 886 |
+
10.903528,
|
| 887 |
+
48.350833
|
| 888 |
+
],
|
| 889 |
+
[
|
| 890 |
+
10.903591,
|
| 891 |
+
48.350902
|
| 892 |
+
],
|
| 893 |
+
[
|
| 894 |
+
10.903808,
|
| 895 |
+
48.351097
|
| 896 |
+
],
|
| 897 |
+
[
|
| 898 |
+
10.904011,
|
| 899 |
+
48.351253
|
| 900 |
+
],
|
| 901 |
+
[
|
| 902 |
+
10.904164,
|
| 903 |
+
48.351394
|
| 904 |
+
],
|
| 905 |
+
[
|
| 906 |
+
10.904272,
|
| 907 |
+
48.351551
|
| 908 |
+
],
|
| 909 |
+
[
|
| 910 |
+
10.904368,
|
| 911 |
+
48.351741
|
| 912 |
+
],
|
| 913 |
+
[
|
| 914 |
+
10.904404,
|
| 915 |
+
48.35189
|
| 916 |
+
],
|
| 917 |
+
[
|
| 918 |
+
10.904485,
|
| 919 |
+
48.352203
|
| 920 |
+
],
|
| 921 |
+
[
|
| 922 |
+
10.904532,
|
| 923 |
+
48.35231
|
| 924 |
+
],
|
| 925 |
+
[
|
| 926 |
+
10.904576,
|
| 927 |
+
48.352409
|
| 928 |
+
],
|
| 929 |
+
[
|
| 930 |
+
10.904636,
|
| 931 |
+
48.352523
|
| 932 |
+
],
|
| 933 |
+
[
|
| 934 |
+
10.904698,
|
| 935 |
+
48.352615
|
| 936 |
+
],
|
| 937 |
+
[
|
| 938 |
+
10.904753,
|
| 939 |
+
48.352691
|
| 940 |
+
],
|
| 941 |
+
[
|
| 942 |
+
10.904812,
|
| 943 |
+
48.35276
|
| 944 |
+
],
|
| 945 |
+
[
|
| 946 |
+
10.904877,
|
| 947 |
+
48.352821
|
| 948 |
+
],
|
| 949 |
+
[
|
| 950 |
+
10.904957,
|
| 951 |
+
48.35289
|
| 952 |
+
],
|
| 953 |
+
[
|
| 954 |
+
10.905048,
|
| 955 |
+
48.352962
|
| 956 |
+
],
|
| 957 |
+
[
|
| 958 |
+
10.905118,
|
| 959 |
+
48.353019
|
| 960 |
+
],
|
| 961 |
+
[
|
| 962 |
+
10.905217,
|
| 963 |
+
48.353084
|
| 964 |
+
],
|
| 965 |
+
[
|
| 966 |
+
10.905323,
|
| 967 |
+
48.353145
|
| 968 |
+
],
|
| 969 |
+
[
|
| 970 |
+
10.905467,
|
| 971 |
+
48.353221
|
| 972 |
+
],
|
| 973 |
+
[
|
| 974 |
+
10.905613,
|
| 975 |
+
48.35329
|
| 976 |
+
],
|
| 977 |
+
[
|
| 978 |
+
10.905764,
|
| 979 |
+
48.353351
|
| 980 |
+
],
|
| 981 |
+
[
|
| 982 |
+
10.9059,
|
| 983 |
+
48.353408
|
| 984 |
+
],
|
| 985 |
+
[
|
| 986 |
+
10.906079,
|
| 987 |
+
48.353473
|
| 988 |
+
],
|
| 989 |
+
[
|
| 990 |
+
10.906243,
|
| 991 |
+
48.35353
|
| 992 |
+
],
|
| 993 |
+
[
|
| 994 |
+
10.906411,
|
| 995 |
+
48.353591
|
| 996 |
+
],
|
| 997 |
+
[
|
| 998 |
+
10.906551,
|
| 999 |
+
48.353652
|
| 1000 |
+
],
|
| 1001 |
+
[
|
| 1002 |
+
10.906683,
|
| 1003 |
+
48.35371
|
| 1004 |
+
],
|
| 1005 |
+
[
|
| 1006 |
+
10.906827,
|
| 1007 |
+
48.353782
|
| 1008 |
+
],
|
| 1009 |
+
[
|
| 1010 |
+
10.906998,
|
| 1011 |
+
48.353866
|
| 1012 |
+
],
|
| 1013 |
+
[
|
| 1014 |
+
10.907168,
|
| 1015 |
+
48.353954
|
| 1016 |
+
],
|
| 1017 |
+
[
|
| 1018 |
+
10.907246,
|
| 1019 |
+
48.353996
|
| 1020 |
+
],
|
| 1021 |
+
[
|
| 1022 |
+
10.90737,
|
| 1023 |
+
48.354061
|
| 1024 |
+
],
|
| 1025 |
+
[
|
| 1026 |
+
10.907464,
|
| 1027 |
+
48.354114
|
| 1028 |
+
],
|
| 1029 |
+
[
|
| 1030 |
+
10.907602,
|
| 1031 |
+
48.35419
|
| 1032 |
+
],
|
| 1033 |
+
[
|
| 1034 |
+
10.907981,
|
| 1035 |
+
48.354408
|
| 1036 |
+
],
|
| 1037 |
+
[
|
| 1038 |
+
10.908288,
|
| 1039 |
+
48.35461
|
| 1040 |
+
],
|
| 1041 |
+
[
|
| 1042 |
+
10.908491,
|
| 1043 |
+
48.354778
|
| 1044 |
+
],
|
| 1045 |
+
[
|
| 1046 |
+
10.908588,
|
| 1047 |
+
48.354858
|
| 1048 |
+
],
|
| 1049 |
+
[
|
| 1050 |
+
10.908717,
|
| 1051 |
+
48.35498
|
| 1052 |
+
],
|
| 1053 |
+
[
|
| 1054 |
+
10.909034,
|
| 1055 |
+
48.355297
|
| 1056 |
+
],
|
| 1057 |
+
[
|
| 1058 |
+
10.909175,
|
| 1059 |
+
48.355449
|
| 1060 |
+
],
|
| 1061 |
+
[
|
| 1062 |
+
10.909478,
|
| 1063 |
+
48.355831
|
| 1064 |
+
],
|
| 1065 |
+
[
|
| 1066 |
+
10.90971,
|
| 1067 |
+
48.356151
|
| 1068 |
+
],
|
| 1069 |
+
[
|
| 1070 |
+
10.909789,
|
| 1071 |
+
48.356262
|
| 1072 |
+
],
|
| 1073 |
+
[
|
| 1074 |
+
10.909867,
|
| 1075 |
+
48.356388
|
| 1076 |
+
],
|
| 1077 |
+
[
|
| 1078 |
+
10.909932,
|
| 1079 |
+
48.356513
|
| 1080 |
+
],
|
| 1081 |
+
[
|
| 1082 |
+
10.910008,
|
| 1083 |
+
48.356681
|
| 1084 |
+
],
|
| 1085 |
+
[
|
| 1086 |
+
10.910051,
|
| 1087 |
+
48.356792
|
| 1088 |
+
],
|
| 1089 |
+
[
|
| 1090 |
+
10.910082,
|
| 1091 |
+
48.356876
|
| 1092 |
+
],
|
| 1093 |
+
[
|
| 1094 |
+
10.910188,
|
| 1095 |
+
48.357269
|
| 1096 |
+
],
|
| 1097 |
+
[
|
| 1098 |
+
10.910298,
|
| 1099 |
+
48.357715
|
| 1100 |
+
],
|
| 1101 |
+
[
|
| 1102 |
+
10.910329,
|
| 1103 |
+
48.357887
|
| 1104 |
+
],
|
| 1105 |
+
[
|
| 1106 |
+
10.910419,
|
| 1107 |
+
48.358245
|
| 1108 |
+
],
|
| 1109 |
+
[
|
| 1110 |
+
10.910494,
|
| 1111 |
+
48.358695
|
| 1112 |
+
],
|
| 1113 |
+
[
|
| 1114 |
+
10.910525,
|
| 1115 |
+
48.358924
|
| 1116 |
+
],
|
| 1117 |
+
[
|
| 1118 |
+
10.91054,
|
| 1119 |
+
48.359264
|
| 1120 |
+
],
|
| 1121 |
+
[
|
| 1122 |
+
10.910537,
|
| 1123 |
+
48.359603
|
| 1124 |
+
],
|
| 1125 |
+
[
|
| 1126 |
+
10.910539,
|
| 1127 |
+
48.36
|
| 1128 |
+
],
|
| 1129 |
+
[
|
| 1130 |
+
10.910537,
|
| 1131 |
+
48.36024
|
| 1132 |
+
],
|
| 1133 |
+
[
|
| 1134 |
+
10.910528,
|
| 1135 |
+
48.360435
|
| 1136 |
+
],
|
| 1137 |
+
[
|
| 1138 |
+
10.910473,
|
| 1139 |
+
48.361133
|
| 1140 |
+
],
|
| 1141 |
+
[
|
| 1142 |
+
10.910449,
|
| 1143 |
+
48.361583
|
| 1144 |
+
],
|
| 1145 |
+
[
|
| 1146 |
+
10.910424,
|
| 1147 |
+
48.361824
|
| 1148 |
+
],
|
| 1149 |
+
[
|
| 1150 |
+
10.910387,
|
| 1151 |
+
48.362033
|
| 1152 |
+
],
|
| 1153 |
+
[
|
| 1154 |
+
10.910349,
|
| 1155 |
+
48.362209
|
| 1156 |
+
],
|
| 1157 |
+
[
|
| 1158 |
+
10.9103,
|
| 1159 |
+
48.362403
|
| 1160 |
+
],
|
| 1161 |
+
[
|
| 1162 |
+
10.910243,
|
| 1163 |
+
48.362583
|
| 1164 |
+
],
|
| 1165 |
+
[
|
| 1166 |
+
10.910202,
|
| 1167 |
+
48.362705
|
| 1168 |
+
],
|
| 1169 |
+
[
|
| 1170 |
+
10.910162,
|
| 1171 |
+
48.362804
|
| 1172 |
+
],
|
| 1173 |
+
[
|
| 1174 |
+
10.910125,
|
| 1175 |
+
48.362888
|
| 1176 |
+
],
|
| 1177 |
+
[
|
| 1178 |
+
10.910067,
|
| 1179 |
+
48.363021
|
| 1180 |
+
],
|
| 1181 |
+
[
|
| 1182 |
+
10.910005,
|
| 1183 |
+
48.36317
|
| 1184 |
+
],
|
| 1185 |
+
[
|
| 1186 |
+
10.909949,
|
| 1187 |
+
48.3633
|
| 1188 |
+
],
|
| 1189 |
+
[
|
| 1190 |
+
10.909905,
|
| 1191 |
+
48.363407
|
| 1192 |
+
],
|
| 1193 |
+
[
|
| 1194 |
+
10.909863,
|
| 1195 |
+
48.363533
|
| 1196 |
+
],
|
| 1197 |
+
[
|
| 1198 |
+
10.909845,
|
| 1199 |
+
48.363616
|
| 1200 |
+
],
|
| 1201 |
+
[
|
| 1202 |
+
10.909839,
|
| 1203 |
+
48.363708
|
| 1204 |
+
],
|
| 1205 |
+
[
|
| 1206 |
+
10.909839,
|
| 1207 |
+
48.36383
|
| 1208 |
+
],
|
| 1209 |
+
[
|
| 1210 |
+
10.909869,
|
| 1211 |
+
48.363979
|
| 1212 |
+
],
|
| 1213 |
+
[
|
| 1214 |
+
10.909933,
|
| 1215 |
+
48.364154
|
| 1216 |
+
],
|
| 1217 |
+
[
|
| 1218 |
+
10.90997,
|
| 1219 |
+
48.364227
|
| 1220 |
+
],
|
| 1221 |
+
[
|
| 1222 |
+
10.910014,
|
| 1223 |
+
48.364303
|
| 1224 |
+
],
|
| 1225 |
+
[
|
| 1226 |
+
10.910065,
|
| 1227 |
+
48.364364
|
| 1228 |
+
],
|
| 1229 |
+
[
|
| 1230 |
+
10.910127,
|
| 1231 |
+
48.364425
|
| 1232 |
+
],
|
| 1233 |
+
[
|
| 1234 |
+
10.910223,
|
| 1235 |
+
48.364509
|
| 1236 |
+
],
|
| 1237 |
+
[
|
| 1238 |
+
10.910326,
|
| 1239 |
+
48.364585
|
| 1240 |
+
],
|
| 1241 |
+
[
|
| 1242 |
+
10.91047,
|
| 1243 |
+
48.364665
|
| 1244 |
+
],
|
| 1245 |
+
[
|
| 1246 |
+
10.910561,
|
| 1247 |
+
48.364715
|
| 1248 |
+
],
|
| 1249 |
+
[
|
| 1250 |
+
10.910669,
|
| 1251 |
+
48.364757
|
| 1252 |
+
],
|
| 1253 |
+
[
|
| 1254 |
+
10.910821,
|
| 1255 |
+
48.364818
|
| 1256 |
+
],
|
| 1257 |
+
[
|
| 1258 |
+
10.91092,
|
| 1259 |
+
48.364849
|
| 1260 |
+
],
|
| 1261 |
+
[
|
| 1262 |
+
10.911075,
|
| 1263 |
+
48.364894
|
| 1264 |
+
],
|
| 1265 |
+
[
|
| 1266 |
+
10.911252,
|
| 1267 |
+
48.364948
|
| 1268 |
+
],
|
| 1269 |
+
[
|
| 1270 |
+
10.911658,
|
| 1271 |
+
48.365066
|
| 1272 |
+
],
|
| 1273 |
+
[
|
| 1274 |
+
10.912324,
|
| 1275 |
+
48.365283
|
| 1276 |
+
],
|
| 1277 |
+
[
|
| 1278 |
+
10.913762,
|
| 1279 |
+
48.365802
|
| 1280 |
+
],
|
| 1281 |
+
[
|
| 1282 |
+
10.913909,
|
| 1283 |
+
48.365856
|
| 1284 |
+
],
|
| 1285 |
+
[
|
| 1286 |
+
10.914202,
|
| 1287 |
+
48.365959
|
| 1288 |
+
],
|
| 1289 |
+
[
|
| 1290 |
+
10.914317,
|
| 1291 |
+
48.366001
|
| 1292 |
+
],
|
| 1293 |
+
[
|
| 1294 |
+
10.915826,
|
| 1295 |
+
48.366546
|
| 1296 |
+
],
|
| 1297 |
+
[
|
| 1298 |
+
10.916251,
|
| 1299 |
+
48.366695
|
| 1300 |
+
],
|
| 1301 |
+
[
|
| 1302 |
+
10.916442,
|
| 1303 |
+
48.366764
|
| 1304 |
+
],
|
| 1305 |
+
[
|
| 1306 |
+
10.916638,
|
| 1307 |
+
48.366844
|
| 1308 |
+
],
|
| 1309 |
+
[
|
| 1310 |
+
10.917188,
|
| 1311 |
+
48.367073
|
| 1312 |
+
],
|
| 1313 |
+
[
|
| 1314 |
+
10.917307,
|
| 1315 |
+
48.367126
|
| 1316 |
+
],
|
| 1317 |
+
[
|
| 1318 |
+
10.91741,
|
| 1319 |
+
48.367176
|
| 1320 |
+
],
|
| 1321 |
+
[
|
| 1322 |
+
10.917776,
|
| 1323 |
+
48.36737
|
| 1324 |
+
],
|
| 1325 |
+
[
|
| 1326 |
+
10.919124,
|
| 1327 |
+
48.368076
|
| 1328 |
+
],
|
| 1329 |
+
[
|
| 1330 |
+
10.919309,
|
| 1331 |
+
48.368175
|
| 1332 |
+
],
|
| 1333 |
+
[
|
| 1334 |
+
10.920262,
|
| 1335 |
+
48.368721
|
| 1336 |
+
],
|
| 1337 |
+
[
|
| 1338 |
+
10.921442,
|
| 1339 |
+
48.369438
|
| 1340 |
+
],
|
| 1341 |
+
[
|
| 1342 |
+
10.921574,
|
| 1343 |
+
48.369522
|
| 1344 |
+
],
|
| 1345 |
+
[
|
| 1346 |
+
10.921718,
|
| 1347 |
+
48.369609
|
| 1348 |
+
],
|
| 1349 |
+
[
|
| 1350 |
+
10.921754,
|
| 1351 |
+
48.369628
|
| 1352 |
+
],
|
| 1353 |
+
[
|
| 1354 |
+
10.922269,
|
| 1355 |
+
48.369976
|
| 1356 |
+
],
|
| 1357 |
+
[
|
| 1358 |
+
10.922686,
|
| 1359 |
+
48.370246
|
| 1360 |
+
],
|
| 1361 |
+
[
|
| 1362 |
+
10.923269,
|
| 1363 |
+
48.370674
|
| 1364 |
+
],
|
| 1365 |
+
[
|
| 1366 |
+
10.923345,
|
| 1367 |
+
48.370727
|
| 1368 |
+
],
|
| 1369 |
+
[
|
| 1370 |
+
10.923512,
|
| 1371 |
+
48.370849
|
| 1372 |
+
],
|
| 1373 |
+
[
|
| 1374 |
+
10.923404,
|
| 1375 |
+
48.370918
|
| 1376 |
+
],
|
| 1377 |
+
[
|
| 1378 |
+
10.923329,
|
| 1379 |
+
48.370964
|
| 1380 |
+
],
|
| 1381 |
+
[
|
| 1382 |
+
10.923183,
|
| 1383 |
+
48.37104
|
| 1384 |
+
],
|
| 1385 |
+
[
|
| 1386 |
+
10.922384,
|
| 1387 |
+
48.371479
|
| 1388 |
+
],
|
| 1389 |
+
[
|
| 1390 |
+
10.922105,
|
| 1391 |
+
48.371623
|
| 1392 |
+
],
|
| 1393 |
+
[
|
| 1394 |
+
10.921725,
|
| 1395 |
+
48.371761
|
| 1396 |
+
],
|
| 1397 |
+
[
|
| 1398 |
+
10.921441,
|
| 1399 |
+
48.371849
|
| 1400 |
+
],
|
| 1401 |
+
[
|
| 1402 |
+
10.921402,
|
| 1403 |
+
48.371868
|
| 1404 |
+
],
|
| 1405 |
+
[
|
| 1406 |
+
10.918851,
|
| 1407 |
+
48.37302
|
| 1408 |
+
],
|
| 1409 |
+
[
|
| 1410 |
+
10.918071,
|
| 1411 |
+
48.373367
|
| 1412 |
+
],
|
| 1413 |
+
[
|
| 1414 |
+
10.917902,
|
| 1415 |
+
48.373443
|
| 1416 |
+
],
|
| 1417 |
+
[
|
| 1418 |
+
10.917757,
|
| 1419 |
+
48.373508
|
| 1420 |
+
],
|
| 1421 |
+
[
|
| 1422 |
+
10.916832,
|
| 1423 |
+
48.373931
|
| 1424 |
+
],
|
| 1425 |
+
[
|
| 1426 |
+
10.915705,
|
| 1427 |
+
48.37445
|
| 1428 |
+
],
|
| 1429 |
+
[
|
| 1430 |
+
10.915126,
|
| 1431 |
+
48.374717
|
| 1432 |
+
],
|
| 1433 |
+
[
|
| 1434 |
+
10.914544,
|
| 1435 |
+
48.374946
|
| 1436 |
+
],
|
| 1437 |
+
[
|
| 1438 |
+
10.914322,
|
| 1439 |
+
48.375049
|
| 1440 |
+
],
|
| 1441 |
+
[
|
| 1442 |
+
10.914162,
|
| 1443 |
+
48.375144
|
| 1444 |
+
],
|
| 1445 |
+
[
|
| 1446 |
+
10.913168,
|
| 1447 |
+
48.375587
|
| 1448 |
+
],
|
| 1449 |
+
[
|
| 1450 |
+
10.913095,
|
| 1451 |
+
48.375621
|
| 1452 |
+
],
|
| 1453 |
+
[
|
| 1454 |
+
10.912727,
|
| 1455 |
+
48.375785
|
| 1456 |
+
],
|
| 1457 |
+
[
|
| 1458 |
+
10.912203,
|
| 1459 |
+
48.376014
|
| 1460 |
+
],
|
| 1461 |
+
[
|
| 1462 |
+
10.912027,
|
| 1463 |
+
48.376098
|
| 1464 |
+
],
|
| 1465 |
+
[
|
| 1466 |
+
10.911951,
|
| 1467 |
+
48.376022
|
| 1468 |
+
],
|
| 1469 |
+
[
|
| 1470 |
+
10.91177,
|
| 1471 |
+
48.375881
|
| 1472 |
+
],
|
| 1473 |
+
[
|
| 1474 |
+
10.911551,
|
| 1475 |
+
48.375732
|
| 1476 |
+
],
|
| 1477 |
+
[
|
| 1478 |
+
10.911424,
|
| 1479 |
+
48.375621
|
| 1480 |
+
],
|
| 1481 |
+
[
|
| 1482 |
+
10.911413,
|
| 1483 |
+
48.375602
|
| 1484 |
+
],
|
| 1485 |
+
[
|
| 1486 |
+
10.911356,
|
| 1487 |
+
48.375499
|
| 1488 |
+
],
|
| 1489 |
+
[
|
| 1490 |
+
10.911332,
|
| 1491 |
+
48.375343
|
| 1492 |
+
],
|
| 1493 |
+
[
|
| 1494 |
+
10.911353,
|
| 1495 |
+
48.375202
|
| 1496 |
+
],
|
| 1497 |
+
[
|
| 1498 |
+
10.911416,
|
| 1499 |
+
48.375076
|
| 1500 |
+
],
|
| 1501 |
+
[
|
| 1502 |
+
10.911545,
|
| 1503 |
+
48.374919
|
| 1504 |
+
],
|
| 1505 |
+
[
|
| 1506 |
+
10.911862,
|
| 1507 |
+
48.374641
|
| 1508 |
+
],
|
| 1509 |
+
[
|
| 1510 |
+
10.912026,
|
| 1511 |
+
48.374477
|
| 1512 |
+
],
|
| 1513 |
+
[
|
| 1514 |
+
10.9121,
|
| 1515 |
+
48.37437
|
| 1516 |
+
],
|
| 1517 |
+
[
|
| 1518 |
+
10.91213,
|
| 1519 |
+
48.374309
|
| 1520 |
+
],
|
| 1521 |
+
[
|
| 1522 |
+
10.912169,
|
| 1523 |
+
48.374183
|
| 1524 |
+
],
|
| 1525 |
+
[
|
| 1526 |
+
10.91211,
|
| 1527 |
+
48.373981
|
| 1528 |
+
],
|
| 1529 |
+
[
|
| 1530 |
+
10.912018,
|
| 1531 |
+
48.373798
|
| 1532 |
+
],
|
| 1533 |
+
[
|
| 1534 |
+
10.911913,
|
| 1535 |
+
48.37363
|
| 1536 |
+
],
|
| 1537 |
+
[
|
| 1538 |
+
10.911616,
|
| 1539 |
+
48.37331
|
| 1540 |
+
],
|
| 1541 |
+
[
|
| 1542 |
+
10.911209,
|
| 1543 |
+
48.372898
|
| 1544 |
+
],
|
| 1545 |
+
[
|
| 1546 |
+
10.91022,
|
| 1547 |
+
48.371894
|
| 1548 |
+
],
|
| 1549 |
+
[
|
| 1550 |
+
10.910177,
|
| 1551 |
+
48.371837
|
| 1552 |
+
],
|
| 1553 |
+
[
|
| 1554 |
+
10.909962,
|
| 1555 |
+
48.371551
|
| 1556 |
+
],
|
| 1557 |
+
[
|
| 1558 |
+
10.909786,
|
| 1559 |
+
48.371212
|
| 1560 |
+
],
|
| 1561 |
+
[
|
| 1562 |
+
10.909691,
|
| 1563 |
+
48.37104
|
| 1564 |
+
],
|
| 1565 |
+
[
|
| 1566 |
+
10.909634,
|
| 1567 |
+
48.370956
|
| 1568 |
+
],
|
| 1569 |
+
[
|
| 1570 |
+
10.909573,
|
| 1571 |
+
48.370861
|
| 1572 |
+
],
|
| 1573 |
+
[
|
| 1574 |
+
10.909488,
|
| 1575 |
+
48.370735
|
| 1576 |
+
],
|
| 1577 |
+
[
|
| 1578 |
+
10.9094,
|
| 1579 |
+
48.370761
|
| 1580 |
+
],
|
| 1581 |
+
[
|
| 1582 |
+
10.909349,
|
| 1583 |
+
48.370777
|
| 1584 |
+
],
|
| 1585 |
+
[
|
| 1586 |
+
10.909315,
|
| 1587 |
+
48.370792
|
| 1588 |
+
]
|
| 1589 |
+
]
|
| 1590 |
+
]
|
| 1591 |
+
}
|
| 1592 |
+
}
|
| 1593 |
+
],
|
| 1594 |
+
"properties":{
|
| 1595 |
+
"mode":"drive",
|
| 1596 |
+
"waypoints":[
|
| 1597 |
+
[
|
| 1598 |
+
10.87474,
|
| 1599 |
+
48.34364
|
| 1600 |
+
],
|
| 1601 |
+
[
|
| 1602 |
+
10.90925,
|
| 1603 |
+
48.37073
|
| 1604 |
+
]
|
| 1605 |
+
]
|
| 1606 |
+
}
|
| 1607 |
+
},
|
| 1608 |
+
"headers":{
|
| 1609 |
+
"access-control-allow-headers":"access-control-max-age, access-control-allow-headers, access-control-allow-methods, access-control-allow-origin, allow, api-version, cf-ray, content-encoding, content-type, date, expect-ct, server, status, vary, cache-control, etag, last-modified, expires",
|
| 1610 |
+
"access-control-allow-methods":"GET, POST, DELETE, OPTIONS, PUT",
|
| 1611 |
+
"access-control-allow-origin":"*",
|
| 1612 |
+
"alt-svc":"h3-27=\":443\"; ma=86400, h3-25=\":443\"; ma=86400, h3-24=\":443\"; ma=86400, h3-23=\":443\"; ma=86400",
|
| 1613 |
+
"api-version":"1.0",
|
| 1614 |
+
"cache-control":"private, max-age=0, no-cache",
|
| 1615 |
+
"cf-cache-status":"DYNAMIC",
|
| 1616 |
+
"cf-ray":"573ebfe7097cee89-CDG",
|
| 1617 |
+
"content-type":"application/json; charset=utf-8",
|
| 1618 |
+
"date":"Sat, 14 Mar 2020 14:40:24 GMT",
|
| 1619 |
+
"expect-ct":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
|
| 1620 |
+
"server":"RapidAPI-1.0.42",
|
| 1621 |
+
"set-cookie":[
|
| 1622 |
+
"__cfduid=d8e0ae49bdbf2033b507627bc787ae8ea1584196824; expires=Mon, 13-Apr-20 14:40:24 GMT; path=/; domain=.geoapify.com; HttpOnly; SameSite=Lax; Secure"
|
| 1623 |
+
],
|
| 1624 |
+
"vary":"Accept-Encoding",
|
| 1625 |
+
"x-rapidapi-region":"AWS - eu-central-1",
|
| 1626 |
+
"x-rapidapi-version":"1.0.42",
|
| 1627 |
+
"content-length":"9507",
|
| 1628 |
+
"connection":"Close"
|
| 1629 |
+
},
|
| 1630 |
+
"schema":{
|
| 1631 |
+
"type":"object",
|
| 1632 |
+
"properties":{
|
| 1633 |
+
"get":{
|
| 1634 |
+
"type":"string"
|
| 1635 |
+
},
|
| 1636 |
+
"parameters":{
|
| 1637 |
+
"type":"array"
|
| 1638 |
+
},
|
| 1639 |
+
"errors":{
|
| 1640 |
+
"type":"array"
|
| 1641 |
+
},
|
| 1642 |
+
"results":{
|
| 1643 |
+
"type":"integer"
|
| 1644 |
+
},
|
| 1645 |
+
"response":{
|
| 1646 |
+
"type":"array",
|
| 1647 |
+
"items":{
|
| 1648 |
+
"type":"object"
|
| 1649 |
+
}
|
| 1650 |
+
}
|
| 1651 |
+
}
|
| 1652 |
+
}
|
| 1653 |
+
}
|
| 1654 |
+
]
|
| 1655 |
+
}
|
toolbench/toolenv/tools/Travel/multimodal_trip_planner/api.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def route_and_directions(waypoints: str, mode: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Calculate route between provided waypoints, including turn by turn directions"
|
| 12 |
+
waypoints: List of two or more lat,lon coordinates, separated by the pipe symbol \"|\"
|
| 13 |
+
mode: Routing mode - drive, truck, bicycle, walk or transit
|
| 14 |
+
|
| 15 |
+
"""
|
| 16 |
+
url = f"https://multimodal-trip-planner.p.rapidapi.com/v1/routing"
|
| 17 |
+
querystring = {'waypoints': waypoints, 'mode': mode, }
|
| 18 |
+
|
| 19 |
+
headers = {
|
| 20 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 21 |
+
"X-RapidAPI-Host": "multimodal-trip-planner.p.rapidapi.com"
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 26 |
+
try:
|
| 27 |
+
observation = response.json()
|
| 28 |
+
except:
|
| 29 |
+
observation = response.text
|
| 30 |
+
return observation
|
| 31 |
+
|
toolbench/toolenv/tools/Travel/next_charging_station.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"Next Charging Station",
|
| 3 |
+
"tool_description":"Find charging stations all over the world.",
|
| 4 |
+
"title":"Next Charging Station",
|
| 5 |
+
"pricing":"FREEMIUM",
|
| 6 |
+
"score":null,
|
| 7 |
+
"home_url":"https://rapidapi.com/geolocationservices-geolocationservices-default/api/next-charging-station/",
|
| 8 |
+
"host":"next-charging-station.p.rapidapi.com",
|
| 9 |
+
"api_list":[
|
| 10 |
+
{
|
| 11 |
+
"name":"Charging Station Details",
|
| 12 |
+
"url":"https://next-charging-station.p.rapidapi.com/location/tags/{id}",
|
| 13 |
+
"description":"Getting detailed information about a given charging station based on their id.",
|
| 14 |
+
"method":"GET",
|
| 15 |
+
"required_parameters":[
|
| 16 |
+
{
|
| 17 |
+
"name":"id",
|
| 18 |
+
"type":"NUMBER",
|
| 19 |
+
"description":"",
|
| 20 |
+
"default":"9044570"
|
| 21 |
+
}
|
| 22 |
+
],
|
| 23 |
+
"optional_parameters":[],
|
| 24 |
+
"code":"import requests\n\nurl = \"https://next-charging-station.p.rapidapi.com/location/tags/{id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"next-charging-station.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 25 |
+
"statuscode":111,
|
| 26 |
+
"body":"",
|
| 27 |
+
"headers":"",
|
| 28 |
+
"schema":""
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"name":"Next Charging Station",
|
| 32 |
+
"url":"https://next-charging-station.p.rapidapi.com/location/{latmin}/{latmax}/{lngmin}/{lngmax}/{densitylevel}",
|
| 33 |
+
"description":"Getting parking lots within a given bounding box.\n\nDensityLevel must be between 3 and 15.\n\nThere is a maximum of 2000 charging stations per request.",
|
| 34 |
+
"method":"GET",
|
| 35 |
+
"required_parameters":[
|
| 36 |
+
{
|
| 37 |
+
"name":"latMax",
|
| 38 |
+
"type":"NUMBER",
|
| 39 |
+
"description":"",
|
| 40 |
+
"default":"50.07041759918306"
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name":"latMin",
|
| 44 |
+
"type":"NUMBER",
|
| 45 |
+
"description":"",
|
| 46 |
+
"default":"47.81044567924743"
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"name":"densityLevel",
|
| 50 |
+
"type":"NUMBER",
|
| 51 |
+
"description":"",
|
| 52 |
+
"default":"9"
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"name":"lngMax",
|
| 56 |
+
"type":"NUMBER",
|
| 57 |
+
"description":"",
|
| 58 |
+
"default":"12.08176116943361"
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"name":"lngMin",
|
| 62 |
+
"type":"NUMBER",
|
| 63 |
+
"description":"",
|
| 64 |
+
"default":"8.43979339599611"
|
| 65 |
+
}
|
| 66 |
+
],
|
| 67 |
+
"optional_parameters":[],
|
| 68 |
+
"code":"import requests\n\nurl = \"https://next-charging-station.p.rapidapi.com/location/{latmin}/{latmax}/{lngmin}/{lngmax}/{densitylevel}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"next-charging-station.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 69 |
+
"statuscode":111,
|
| 70 |
+
"body":"",
|
| 71 |
+
"headers":"",
|
| 72 |
+
"schema":""
|
| 73 |
+
}
|
| 74 |
+
]
|
| 75 |
+
}
|
toolbench/toolenv/tools/Travel/next_charging_station/api.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def charging_station_details(is_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Getting detailed information about a given charging station based on their id."
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://next-charging-station.p.rapidapi.com/location/tags/{is_id}"
|
| 15 |
+
querystring = {}
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "next-charging-station.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
| 30 |
+
def next_charging_station(latmax: int, latmin: int, densitylevel: int, lngmax: int, lngmin: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 31 |
+
"""
|
| 32 |
+
"Getting parking lots within a given bounding box.
|
| 33 |
+
|
| 34 |
+
DensityLevel must be between 3 and 15.
|
| 35 |
+
|
| 36 |
+
There is a maximum of 2000 charging stations per request."
|
| 37 |
+
|
| 38 |
+
"""
|
| 39 |
+
url = f"https://next-charging-station.p.rapidapi.com/location/{latmin}/{latmax}/{lngmin}/{lngmax}/{densitylevel}"
|
| 40 |
+
querystring = {}
|
| 41 |
+
|
| 42 |
+
headers = {
|
| 43 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 44 |
+
"X-RapidAPI-Host": "next-charging-station.p.rapidapi.com"
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 49 |
+
try:
|
| 50 |
+
observation = response.json()
|
| 51 |
+
except:
|
| 52 |
+
observation = response.text
|
| 53 |
+
return observation
|
| 54 |
+
|
toolbench/toolenv/tools/Travel/next_parking_lot.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"Next Parking Lot",
|
| 3 |
+
"tool_description":"Find parking lots all over the world.",
|
| 4 |
+
"title":"Next Parking Lot",
|
| 5 |
+
"pricing":"FREEMIUM",
|
| 6 |
+
"score":{
|
| 7 |
+
"avgServiceLevel":100,
|
| 8 |
+
"avgLatency":368,
|
| 9 |
+
"avgSuccessRate":100,
|
| 10 |
+
"popularityScore":8.8,
|
| 11 |
+
"__typename":"Score"
|
| 12 |
+
},
|
| 13 |
+
"home_url":"https://rapidapi.com/geolocationservices-geolocationservices-default/api/next-parking-lot/",
|
| 14 |
+
"host":"next-parking-lot.p.rapidapi.com",
|
| 15 |
+
"api_list":[
|
| 16 |
+
{
|
| 17 |
+
"name":"Parking Lot Details",
|
| 18 |
+
"url":"https://next-parking-lot.p.rapidapi.com/location/tags/{id}",
|
| 19 |
+
"description":"Getting detailed information about a given parking lot based on their id.",
|
| 20 |
+
"method":"GET",
|
| 21 |
+
"required_parameters":[
|
| 22 |
+
{
|
| 23 |
+
"name":"id",
|
| 24 |
+
"type":"NUMBER",
|
| 25 |
+
"description":"",
|
| 26 |
+
"default":"28588151"
|
| 27 |
+
}
|
| 28 |
+
],
|
| 29 |
+
"optional_parameters":[],
|
| 30 |
+
"code":"import requests\n\nurl = \"https://next-parking-lot.p.rapidapi.com/location/tags/{id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"next-parking-lot.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 31 |
+
"statuscode":111,
|
| 32 |
+
"body":"",
|
| 33 |
+
"headers":"",
|
| 34 |
+
"schema":""
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"name":"Parking Lot Collection",
|
| 38 |
+
"url":"https://next-parking-lot.p.rapidapi.com/location/{latmin}/{latmax}/{lngmin}/{lngmax}/{densitylevel}",
|
| 39 |
+
"description":"Getting parking lots within a given bounding box.\n\nDensityLevel must be between 3 and 15.\n\nThere is a maximum of 2000 parking lots per request.",
|
| 40 |
+
"method":"GET",
|
| 41 |
+
"required_parameters":[
|
| 42 |
+
{
|
| 43 |
+
"name":"lngMin",
|
| 44 |
+
"type":"NUMBER",
|
| 45 |
+
"description":"",
|
| 46 |
+
"default":"8.475155639648454"
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"name":"densityLevel",
|
| 50 |
+
"type":"NUMBER",
|
| 51 |
+
"description":"",
|
| 52 |
+
"default":"14"
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"name":"latMin",
|
| 56 |
+
"type":"NUMBER",
|
| 57 |
+
"description":"",
|
| 58 |
+
"default":"47.34326608701737"
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"name":"lngMax",
|
| 62 |
+
"type":"NUMBER",
|
| 63 |
+
"description":"",
|
| 64 |
+
"default":"8.588967132568376"
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"name":"latMax",
|
| 68 |
+
"type":"NUMBER",
|
| 69 |
+
"description":"",
|
| 70 |
+
"default":"47.41608934806851"
|
| 71 |
+
}
|
| 72 |
+
],
|
| 73 |
+
"optional_parameters":[],
|
| 74 |
+
"code":"import requests\n\nurl = \"https://next-parking-lot.p.rapidapi.com/location/{latmin}/{latmax}/{lngmin}/{lngmax}/{densitylevel}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"next-parking-lot.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 75 |
+
"statuscode":111,
|
| 76 |
+
"body":"",
|
| 77 |
+
"headers":"",
|
| 78 |
+
"schema":""
|
| 79 |
+
}
|
| 80 |
+
]
|
| 81 |
+
}
|
toolbench/toolenv/tools/Travel/next_parking_lot/api.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def parking_lot_details(is_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Getting detailed information about a given parking lot based on their id."
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://next-parking-lot.p.rapidapi.com/location/tags/{is_id}"
|
| 15 |
+
querystring = {}
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "next-parking-lot.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
| 30 |
+
def parking_lot_collection(lngmin: int, densitylevel: int, latmin: int, lngmax: int, latmax: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 31 |
+
"""
|
| 32 |
+
"Getting parking lots within a given bounding box.
|
| 33 |
+
|
| 34 |
+
DensityLevel must be between 3 and 15.
|
| 35 |
+
|
| 36 |
+
There is a maximum of 2000 parking lots per request."
|
| 37 |
+
|
| 38 |
+
"""
|
| 39 |
+
url = f"https://next-parking-lot.p.rapidapi.com/location/{latmin}/{latmax}/{lngmin}/{lngmax}/{densitylevel}"
|
| 40 |
+
querystring = {}
|
| 41 |
+
|
| 42 |
+
headers = {
|
| 43 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 44 |
+
"X-RapidAPI-Host": "next-parking-lot.p.rapidapi.com"
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 49 |
+
try:
|
| 50 |
+
observation = response.json()
|
| 51 |
+
except:
|
| 52 |
+
observation = response.text
|
| 53 |
+
return observation
|
| 54 |
+
|
toolbench/toolenv/tools/Travel/nomad_list_cities.json
ADDED
|
@@ -0,0 +1,321 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"Nomad List Cities",
|
| 3 |
+
"tool_description":"Explore best cities to live for digital nomads! Sort by internet speed, cost of living and more! Filter by continents",
|
| 4 |
+
"title":"Nomad List Cities",
|
| 5 |
+
"pricing":"FREEMIUM",
|
| 6 |
+
"score":{
|
| 7 |
+
"avgServiceLevel":100,
|
| 8 |
+
"avgLatency":859,
|
| 9 |
+
"avgSuccessRate":100,
|
| 10 |
+
"popularityScore":9.6,
|
| 11 |
+
"__typename":"Score"
|
| 12 |
+
},
|
| 13 |
+
"home_url":"https://rapidapi.com/emir12/api/nomad-list-cities/",
|
| 14 |
+
"host":"nomad-list-cities.p.rapidapi.com",
|
| 15 |
+
"api_list":[
|
| 16 |
+
{
|
| 17 |
+
"name":"Latin America",
|
| 18 |
+
"url":"https://nomad-list-cities.p.rapidapi.com/nomad-list/latin-america",
|
| 19 |
+
"description":"Get Latin America cities sorted by overall score by default.\n\nPagination: size & page \nsort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.\nsort: asc | desc",
|
| 20 |
+
"method":"GET",
|
| 21 |
+
"required_parameters":[],
|
| 22 |
+
"optional_parameters":[
|
| 23 |
+
{
|
| 24 |
+
"name":"sort_by",
|
| 25 |
+
"type":"STRING",
|
| 26 |
+
"description":"",
|
| 27 |
+
"default":"overall_score"
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"name":"page",
|
| 31 |
+
"type":"STRING",
|
| 32 |
+
"description":"",
|
| 33 |
+
"default":"1"
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"name":"sort",
|
| 37 |
+
"type":"STRING",
|
| 38 |
+
"description":"",
|
| 39 |
+
"default":"desc"
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"name":"size",
|
| 43 |
+
"type":"STRING",
|
| 44 |
+
"description":"",
|
| 45 |
+
"default":"20"
|
| 46 |
+
}
|
| 47 |
+
],
|
| 48 |
+
"code":"import requests\n\nurl = \"https://nomad-list-cities.p.rapidapi.com/nomad-list/latin-america\"\nquerystring = {\"sort_by\": sort_by, \"page\": page, \"sort\": sort, \"size\": size}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"nomad-list-cities.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 49 |
+
"statuscode":111,
|
| 50 |
+
"body":"",
|
| 51 |
+
"headers":"",
|
| 52 |
+
"schema":""
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"name":"North America",
|
| 56 |
+
"url":"https://nomad-list-cities.p.rapidapi.com/nomad-list/north-america",
|
| 57 |
+
"description":"Get North America cities sorted by overall score by default.\n\nPagination: size & page \nsort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.\nsort: asc | desc",
|
| 58 |
+
"method":"GET",
|
| 59 |
+
"required_parameters":[],
|
| 60 |
+
"optional_parameters":[
|
| 61 |
+
{
|
| 62 |
+
"name":"sort_by",
|
| 63 |
+
"type":"STRING",
|
| 64 |
+
"description":"",
|
| 65 |
+
"default":"overall_score"
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"name":"sort",
|
| 69 |
+
"type":"STRING",
|
| 70 |
+
"description":"",
|
| 71 |
+
"default":"desc"
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"name":"size",
|
| 75 |
+
"type":"STRING",
|
| 76 |
+
"description":"",
|
| 77 |
+
"default":"20"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"name":"page",
|
| 81 |
+
"type":"STRING",
|
| 82 |
+
"description":"",
|
| 83 |
+
"default":"1"
|
| 84 |
+
}
|
| 85 |
+
],
|
| 86 |
+
"code":"import requests\n\nurl = \"https://nomad-list-cities.p.rapidapi.com/nomad-list/north-america\"\nquerystring = {\"sort_by\": sort_by, \"sort\": sort, \"size\": size, \"page\": page}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"nomad-list-cities.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 87 |
+
"statuscode":111,
|
| 88 |
+
"body":"",
|
| 89 |
+
"headers":"",
|
| 90 |
+
"schema":""
|
| 91 |
+
},
|
| 92 |
+
{
|
| 93 |
+
"name":"Middle East",
|
| 94 |
+
"url":"https://nomad-list-cities.p.rapidapi.com/nomad-list/middle-east",
|
| 95 |
+
"description":"Get Middle East cities sorted by overall score by default.\n\nPagination: size & page \nsort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.\nsort: asc | desc",
|
| 96 |
+
"method":"GET",
|
| 97 |
+
"required_parameters":[],
|
| 98 |
+
"optional_parameters":[
|
| 99 |
+
{
|
| 100 |
+
"name":"page",
|
| 101 |
+
"type":"STRING",
|
| 102 |
+
"description":"",
|
| 103 |
+
"default":"1"
|
| 104 |
+
},
|
| 105 |
+
{
|
| 106 |
+
"name":"sort",
|
| 107 |
+
"type":"STRING",
|
| 108 |
+
"description":"",
|
| 109 |
+
"default":"desc"
|
| 110 |
+
},
|
| 111 |
+
{
|
| 112 |
+
"name":"sort_by",
|
| 113 |
+
"type":"STRING",
|
| 114 |
+
"description":"",
|
| 115 |
+
"default":"overall_score"
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"name":"size",
|
| 119 |
+
"type":"STRING",
|
| 120 |
+
"description":"",
|
| 121 |
+
"default":"20"
|
| 122 |
+
}
|
| 123 |
+
],
|
| 124 |
+
"code":"import requests\n\nurl = \"https://nomad-list-cities.p.rapidapi.com/nomad-list/middle-east\"\nquerystring = {\"page\": page, \"sort\": sort, \"sort_by\": sort_by, \"size\": size}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"nomad-list-cities.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 125 |
+
"statuscode":111,
|
| 126 |
+
"body":"",
|
| 127 |
+
"headers":"",
|
| 128 |
+
"schema":""
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"name":"Oceania",
|
| 132 |
+
"url":"https://nomad-list-cities.p.rapidapi.com/nomad-list/oceania",
|
| 133 |
+
"description":"Get Oceania cities sorted by overall score by default.\n\nPagination: size & page \nsort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.\nsort: asc | desc",
|
| 134 |
+
"method":"GET",
|
| 135 |
+
"required_parameters":[],
|
| 136 |
+
"optional_parameters":[
|
| 137 |
+
{
|
| 138 |
+
"name":"sort_by",
|
| 139 |
+
"type":"STRING",
|
| 140 |
+
"description":"",
|
| 141 |
+
"default":"overall_score"
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"name":"page",
|
| 145 |
+
"type":"STRING",
|
| 146 |
+
"description":"",
|
| 147 |
+
"default":"1"
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"name":"sort",
|
| 151 |
+
"type":"STRING",
|
| 152 |
+
"description":"",
|
| 153 |
+
"default":"desc"
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"name":"size",
|
| 157 |
+
"type":"STRING",
|
| 158 |
+
"description":"",
|
| 159 |
+
"default":"20"
|
| 160 |
+
}
|
| 161 |
+
],
|
| 162 |
+
"code":"import requests\n\nurl = \"https://nomad-list-cities.p.rapidapi.com/nomad-list/oceania\"\nquerystring = {\"sort_by\": sort_by, \"page\": page, \"sort\": sort, \"size\": size}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"nomad-list-cities.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 163 |
+
"statuscode":111,
|
| 164 |
+
"body":"",
|
| 165 |
+
"headers":"",
|
| 166 |
+
"schema":""
|
| 167 |
+
},
|
| 168 |
+
{
|
| 169 |
+
"name":"Africa",
|
| 170 |
+
"url":"https://nomad-list-cities.p.rapidapi.com/nomad-list/africa",
|
| 171 |
+
"description":"Get African cities sorted by overall score by default.\n\nPagination: size & page \nsort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.\nsort: asc | desc",
|
| 172 |
+
"method":"GET",
|
| 173 |
+
"required_parameters":[],
|
| 174 |
+
"optional_parameters":[
|
| 175 |
+
{
|
| 176 |
+
"name":"sort",
|
| 177 |
+
"type":"STRING",
|
| 178 |
+
"description":"",
|
| 179 |
+
"default":"desc"
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"name":"sort_by",
|
| 183 |
+
"type":"STRING",
|
| 184 |
+
"description":"",
|
| 185 |
+
"default":"overall_score"
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"name":"page",
|
| 189 |
+
"type":"STRING",
|
| 190 |
+
"description":"",
|
| 191 |
+
"default":"1"
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"name":"size",
|
| 195 |
+
"type":"STRING",
|
| 196 |
+
"description":"",
|
| 197 |
+
"default":"20"
|
| 198 |
+
}
|
| 199 |
+
],
|
| 200 |
+
"code":"import requests\n\nurl = \"https://nomad-list-cities.p.rapidapi.com/nomad-list/africa\"\nquerystring = {\"sort\": sort, \"sort_by\": sort_by, \"page\": page, \"size\": size}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"nomad-list-cities.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 201 |
+
"statuscode":111,
|
| 202 |
+
"body":"",
|
| 203 |
+
"headers":"",
|
| 204 |
+
"schema":""
|
| 205 |
+
},
|
| 206 |
+
{
|
| 207 |
+
"name":"Asia",
|
| 208 |
+
"url":"https://nomad-list-cities.p.rapidapi.com/nomad-list/asia",
|
| 209 |
+
"description":"Get Asian cities sorted by overall score by default.\n\nPagination: size & page \nsort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.\nsort: asc | desc",
|
| 210 |
+
"method":"GET",
|
| 211 |
+
"required_parameters":[],
|
| 212 |
+
"optional_parameters":[
|
| 213 |
+
{
|
| 214 |
+
"name":"sort",
|
| 215 |
+
"type":"STRING",
|
| 216 |
+
"description":"",
|
| 217 |
+
"default":"desc"
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"name":"sort_by",
|
| 221 |
+
"type":"STRING",
|
| 222 |
+
"description":"",
|
| 223 |
+
"default":"overall_score"
|
| 224 |
+
},
|
| 225 |
+
{
|
| 226 |
+
"name":"size",
|
| 227 |
+
"type":"STRING",
|
| 228 |
+
"description":"",
|
| 229 |
+
"default":"20"
|
| 230 |
+
},
|
| 231 |
+
{
|
| 232 |
+
"name":"page",
|
| 233 |
+
"type":"STRING",
|
| 234 |
+
"description":"",
|
| 235 |
+
"default":"1"
|
| 236 |
+
}
|
| 237 |
+
],
|
| 238 |
+
"code":"import requests\n\nurl = \"https://nomad-list-cities.p.rapidapi.com/nomad-list/asia\"\nquerystring = {\"sort\": sort, \"sort_by\": sort_by, \"size\": size, \"page\": page}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"nomad-list-cities.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 239 |
+
"statuscode":111,
|
| 240 |
+
"body":"",
|
| 241 |
+
"headers":"",
|
| 242 |
+
"schema":""
|
| 243 |
+
},
|
| 244 |
+
{
|
| 245 |
+
"name":"Europe",
|
| 246 |
+
"url":"https://nomad-list-cities.p.rapidapi.com/nomad-list/europe",
|
| 247 |
+
"description":"Get European cities sorted by overall score by default.\n\nPagination: size & page \nsort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.\nsort: asc | desc",
|
| 248 |
+
"method":"GET",
|
| 249 |
+
"required_parameters":[],
|
| 250 |
+
"optional_parameters":[
|
| 251 |
+
{
|
| 252 |
+
"name":"sort",
|
| 253 |
+
"type":"STRING",
|
| 254 |
+
"description":"",
|
| 255 |
+
"default":"desc"
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"name":"page",
|
| 259 |
+
"type":"STRING",
|
| 260 |
+
"description":"",
|
| 261 |
+
"default":"1"
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
"name":"sort_by",
|
| 265 |
+
"type":"STRING",
|
| 266 |
+
"description":"",
|
| 267 |
+
"default":"overall_score"
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"name":"size",
|
| 271 |
+
"type":"STRING",
|
| 272 |
+
"description":"",
|
| 273 |
+
"default":"20"
|
| 274 |
+
}
|
| 275 |
+
],
|
| 276 |
+
"code":"import requests\n\nurl = \"https://nomad-list-cities.p.rapidapi.com/nomad-list/europe\"\nquerystring = {\"sort\": sort, \"page\": page, \"sort_by\": sort_by, \"size\": size}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"nomad-list-cities.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 277 |
+
"statuscode":111,
|
| 278 |
+
"body":"",
|
| 279 |
+
"headers":"",
|
| 280 |
+
"schema":""
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"name":"All citites",
|
| 284 |
+
"url":"https://nomad-list-cities.p.rapidapi.com/nomad-list",
|
| 285 |
+
"description":"Get all cities sorted by overall score.\n\nPagination: size & page \nsort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.\nsort: asc | desc",
|
| 286 |
+
"method":"GET",
|
| 287 |
+
"required_parameters":[],
|
| 288 |
+
"optional_parameters":[
|
| 289 |
+
{
|
| 290 |
+
"name":"sort",
|
| 291 |
+
"type":"STRING",
|
| 292 |
+
"description":"",
|
| 293 |
+
"default":"desc"
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"name":"sort_by",
|
| 297 |
+
"type":"STRING",
|
| 298 |
+
"description":"",
|
| 299 |
+
"default":"overall_score"
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"name":"size",
|
| 303 |
+
"type":"STRING",
|
| 304 |
+
"description":"",
|
| 305 |
+
"default":"20"
|
| 306 |
+
},
|
| 307 |
+
{
|
| 308 |
+
"name":"page",
|
| 309 |
+
"type":"STRING",
|
| 310 |
+
"description":"",
|
| 311 |
+
"default":"1"
|
| 312 |
+
}
|
| 313 |
+
],
|
| 314 |
+
"code":"import requests\n\nurl = \"https://nomad-list-cities.p.rapidapi.com/nomad-list\"\nquerystring = {\"sort\": sort, \"sort_by\": sort_by, \"size\": size, \"page\": page}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"nomad-list-cities.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
|
| 315 |
+
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def latin_america(sort_by: str='overall_score', page: str='1', sort: str='desc', size: str='20', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Get Latin America cities sorted by overall score by default.
|
| 12 |
+
|
| 13 |
+
Pagination: size & page
|
| 14 |
+
sort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.
|
| 15 |
+
sort: asc | desc"
|
| 16 |
+
|
| 17 |
+
"""
|
| 18 |
+
url = f"https://nomad-list-cities.p.rapidapi.com/nomad-list/latin-america"
|
| 19 |
+
querystring = {}
|
| 20 |
+
if sort_by:
|
| 21 |
+
querystring['sort_by'] = sort_by
|
| 22 |
+
if page:
|
| 23 |
+
querystring['page'] = page
|
| 24 |
+
if sort:
|
| 25 |
+
querystring['sort'] = sort
|
| 26 |
+
if size:
|
| 27 |
+
querystring['size'] = size
|
| 28 |
+
|
| 29 |
+
headers = {
|
| 30 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 31 |
+
"X-RapidAPI-Host": "nomad-list-cities.p.rapidapi.com"
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 36 |
+
try:
|
| 37 |
+
observation = response.json()
|
| 38 |
+
except:
|
| 39 |
+
observation = response.text
|
| 40 |
+
return observation
|
| 41 |
+
|
| 42 |
+
def north_america(sort_by: str='overall_score', sort: str='desc', size: str='20', page: str='1', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 43 |
+
"""
|
| 44 |
+
"Get North America cities sorted by overall score by default.
|
| 45 |
+
|
| 46 |
+
Pagination: size & page
|
| 47 |
+
sort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.
|
| 48 |
+
sort: asc | desc"
|
| 49 |
+
|
| 50 |
+
"""
|
| 51 |
+
url = f"https://nomad-list-cities.p.rapidapi.com/nomad-list/north-america"
|
| 52 |
+
querystring = {}
|
| 53 |
+
if sort_by:
|
| 54 |
+
querystring['sort_by'] = sort_by
|
| 55 |
+
if sort:
|
| 56 |
+
querystring['sort'] = sort
|
| 57 |
+
if size:
|
| 58 |
+
querystring['size'] = size
|
| 59 |
+
if page:
|
| 60 |
+
querystring['page'] = page
|
| 61 |
+
|
| 62 |
+
headers = {
|
| 63 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 64 |
+
"X-RapidAPI-Host": "nomad-list-cities.p.rapidapi.com"
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 69 |
+
try:
|
| 70 |
+
observation = response.json()
|
| 71 |
+
except:
|
| 72 |
+
observation = response.text
|
| 73 |
+
return observation
|
| 74 |
+
|
| 75 |
+
def middle_east(page: str='1', sort: str='desc', sort_by: str='overall_score', size: str='20', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 76 |
+
"""
|
| 77 |
+
"Get Middle East cities sorted by overall score by default.
|
| 78 |
+
|
| 79 |
+
Pagination: size & page
|
| 80 |
+
sort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.
|
| 81 |
+
sort: asc | desc"
|
| 82 |
+
|
| 83 |
+
"""
|
| 84 |
+
url = f"https://nomad-list-cities.p.rapidapi.com/nomad-list/middle-east"
|
| 85 |
+
querystring = {}
|
| 86 |
+
if page:
|
| 87 |
+
querystring['page'] = page
|
| 88 |
+
if sort:
|
| 89 |
+
querystring['sort'] = sort
|
| 90 |
+
if sort_by:
|
| 91 |
+
querystring['sort_by'] = sort_by
|
| 92 |
+
if size:
|
| 93 |
+
querystring['size'] = size
|
| 94 |
+
|
| 95 |
+
headers = {
|
| 96 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 97 |
+
"X-RapidAPI-Host": "nomad-list-cities.p.rapidapi.com"
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 102 |
+
try:
|
| 103 |
+
observation = response.json()
|
| 104 |
+
except:
|
| 105 |
+
observation = response.text
|
| 106 |
+
return observation
|
| 107 |
+
|
| 108 |
+
def oceania(sort_by: str='overall_score', page: str='1', sort: str='desc', size: str='20', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 109 |
+
"""
|
| 110 |
+
"Get Oceania cities sorted by overall score by default.
|
| 111 |
+
|
| 112 |
+
Pagination: size & page
|
| 113 |
+
sort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.
|
| 114 |
+
sort: asc | desc"
|
| 115 |
+
|
| 116 |
+
"""
|
| 117 |
+
url = f"https://nomad-list-cities.p.rapidapi.com/nomad-list/oceania"
|
| 118 |
+
querystring = {}
|
| 119 |
+
if sort_by:
|
| 120 |
+
querystring['sort_by'] = sort_by
|
| 121 |
+
if page:
|
| 122 |
+
querystring['page'] = page
|
| 123 |
+
if sort:
|
| 124 |
+
querystring['sort'] = sort
|
| 125 |
+
if size:
|
| 126 |
+
querystring['size'] = size
|
| 127 |
+
|
| 128 |
+
headers = {
|
| 129 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 130 |
+
"X-RapidAPI-Host": "nomad-list-cities.p.rapidapi.com"
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 135 |
+
try:
|
| 136 |
+
observation = response.json()
|
| 137 |
+
except:
|
| 138 |
+
observation = response.text
|
| 139 |
+
return observation
|
| 140 |
+
|
| 141 |
+
def africa(sort: str='desc', sort_by: str='overall_score', page: str='1', size: str='20', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 142 |
+
"""
|
| 143 |
+
"Get African cities sorted by overall score by default.
|
| 144 |
+
|
| 145 |
+
Pagination: size & page
|
| 146 |
+
sort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.
|
| 147 |
+
sort: asc | desc"
|
| 148 |
+
|
| 149 |
+
"""
|
| 150 |
+
url = f"https://nomad-list-cities.p.rapidapi.com/nomad-list/africa"
|
| 151 |
+
querystring = {}
|
| 152 |
+
if sort:
|
| 153 |
+
querystring['sort'] = sort
|
| 154 |
+
if sort_by:
|
| 155 |
+
querystring['sort_by'] = sort_by
|
| 156 |
+
if page:
|
| 157 |
+
querystring['page'] = page
|
| 158 |
+
if size:
|
| 159 |
+
querystring['size'] = size
|
| 160 |
+
|
| 161 |
+
headers = {
|
| 162 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 163 |
+
"X-RapidAPI-Host": "nomad-list-cities.p.rapidapi.com"
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 168 |
+
try:
|
| 169 |
+
observation = response.json()
|
| 170 |
+
except:
|
| 171 |
+
observation = response.text
|
| 172 |
+
return observation
|
| 173 |
+
|
| 174 |
+
def asia(sort: str='desc', sort_by: str='overall_score', size: str='20', page: str='1', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 175 |
+
"""
|
| 176 |
+
"Get Asian cities sorted by overall score by default.
|
| 177 |
+
|
| 178 |
+
Pagination: size & page
|
| 179 |
+
sort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.
|
| 180 |
+
sort: asc | desc"
|
| 181 |
+
|
| 182 |
+
"""
|
| 183 |
+
url = f"https://nomad-list-cities.p.rapidapi.com/nomad-list/asia"
|
| 184 |
+
querystring = {}
|
| 185 |
+
if sort:
|
| 186 |
+
querystring['sort'] = sort
|
| 187 |
+
if sort_by:
|
| 188 |
+
querystring['sort_by'] = sort_by
|
| 189 |
+
if size:
|
| 190 |
+
querystring['size'] = size
|
| 191 |
+
if page:
|
| 192 |
+
querystring['page'] = page
|
| 193 |
+
|
| 194 |
+
headers = {
|
| 195 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 196 |
+
"X-RapidAPI-Host": "nomad-list-cities.p.rapidapi.com"
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 201 |
+
try:
|
| 202 |
+
observation = response.json()
|
| 203 |
+
except:
|
| 204 |
+
observation = response.text
|
| 205 |
+
return observation
|
| 206 |
+
|
| 207 |
+
def europe(sort: str='desc', page: str='1', sort_by: str='overall_score', size: str='20', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 208 |
+
"""
|
| 209 |
+
"Get European cities sorted by overall score by default.
|
| 210 |
+
|
| 211 |
+
Pagination: size & page
|
| 212 |
+
sort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.
|
| 213 |
+
sort: asc | desc"
|
| 214 |
+
|
| 215 |
+
"""
|
| 216 |
+
url = f"https://nomad-list-cities.p.rapidapi.com/nomad-list/europe"
|
| 217 |
+
querystring = {}
|
| 218 |
+
if sort:
|
| 219 |
+
querystring['sort'] = sort
|
| 220 |
+
if page:
|
| 221 |
+
querystring['page'] = page
|
| 222 |
+
if sort_by:
|
| 223 |
+
querystring['sort_by'] = sort_by
|
| 224 |
+
if size:
|
| 225 |
+
querystring['size'] = size
|
| 226 |
+
|
| 227 |
+
headers = {
|
| 228 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 229 |
+
"X-RapidAPI-Host": "nomad-list-cities.p.rapidapi.com"
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 234 |
+
try:
|
| 235 |
+
observation = response.json()
|
| 236 |
+
except:
|
| 237 |
+
observation = response.text
|
| 238 |
+
return observation
|
| 239 |
+
|
| 240 |
+
def all_citites(sort: str='desc', sort_by: str='overall_score', size: str='20', page: str='1', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 241 |
+
"""
|
| 242 |
+
"Get all cities sorted by overall score.
|
| 243 |
+
|
| 244 |
+
Pagination: size & page
|
| 245 |
+
sort_by: you can sort by any numeric value like fore example internet_speed, temperatureC, cost_for_family_in_usd and so on.
|
| 246 |
+
sort: asc | desc"
|
| 247 |
+
|
| 248 |
+
"""
|
| 249 |
+
url = f"https://nomad-list-cities.p.rapidapi.com/nomad-list"
|
| 250 |
+
querystring = {}
|
| 251 |
+
if sort:
|
| 252 |
+
querystring['sort'] = sort
|
| 253 |
+
if sort_by:
|
| 254 |
+
querystring['sort_by'] = sort_by
|
| 255 |
+
if size:
|
| 256 |
+
querystring['size'] = size
|
| 257 |
+
if page:
|
| 258 |
+
querystring['page'] = page
|
| 259 |
+
|
| 260 |
+
headers = {
|
| 261 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 262 |
+
"X-RapidAPI-Host": "nomad-list-cities.p.rapidapi.com"
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
|
| 266 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 267 |
+
try:
|
| 268 |
+
observation = response.json()
|
| 269 |
+
except:
|
| 270 |
+
observation = response.text
|
| 271 |
+
return observation
|
| 272 |
+
|
toolbench/toolenv/tools/Travel/online_travel_booking_solution.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"online travel booking solution",
|
| 3 |
+
"tool_description":"Tripfro platform consist of many components assembled to get your one stop travel software and travel technology, to automate travel business process and configured in many ways to meet your business goals.\nTripfro booking Engines designed to reduce cost and increase revenues, enable you to deliver the highest level of customer service.\n•\tTrustworthy Security\n•\tSupport for multi-location environment\n•\tReal time online bookings\n•\tFlexible commission and mark-up settings against suppliers\n•\tReduced time and cost of report design and distribution\n•\tGlobal Suppliers",
|
| 4 |
+
"title":"online travel booking solution",
|
| 5 |
+
"pricing":"FREE",
|
| 6 |
+
"score":{
|
| 7 |
+
"avgServiceLevel":100,
|
| 8 |
+
"avgLatency":892,
|
| 9 |
+
"avgSuccessRate":100,
|
| 10 |
+
"popularityScore":9.3,
|
| 11 |
+
"__typename":"Score"
|
| 12 |
+
},
|
| 13 |
+
"home_url":"https://rapidapi.com/TripFro/api/online-travel-booking-solution/",
|
| 14 |
+
"host":"online-travel-booking-solution.p.rapidapi.com",
|
| 15 |
+
"api_list":[
|
| 16 |
+
{
|
| 17 |
+
"name":"David Peeter",
|
| 18 |
+
"url":"https://online-travel-booking-solution.p.rapidapi.com/",
|
| 19 |
+
"description":"Tripfro platform consist of many components assembled to get your one stop travel software and travel technology, to automate travel business process and configured in many ways to meet your business goals. Our service never stops with the sales of our softwares or API Solutions. It goes on in the form of after-sales service since we understand that our products are designed to satisfy your requirements for many years to come. Whatever your Business requirement, Tripfro offers completely managed best fit online travel booking solution. Join with us to expand your business with exclusive benefits.\n•\tFlight\nGet lowest airfares, highest commission on domestic and international flight tickets to 5000 cities.\n•\tHotel\nSearch and book the best hotel for your customers with highest commissions! . We offer you more Hotels across the world.\n•\tCar\nWe provide customers with international car rental and private transfer that are tailored to meet their needs.\n•\tTransfers\nYour customers will be met at the Hotel and taken to hotel with variety of vehicles.\n\nTHE TRIPFRO ADVANTAGE EARN MORE\nON EVERY BOOKING\nTripfro booking Engines designed to reduce cost and increase revenues, enable you to deliver the highest level of customer service.\n•\tTrustworthy Security\n•\tSupport for multi-location environment\n•\tReal time online bookings\n•\tFlexible commission and mark-up settings against suppliers\n•\tReduced time and cost of report design and distribution\n•\tGlobal Suppliers\n•\tEmpower people at all levels of your organization to make informed measures using software that is familiar and easy to use\n•\tLargest Travel Network\nOur platform is powered by 70+ suppliers across flight, hotels, car,transfers and other services.\n•\tFull Service Model\nFor all Type of travel companies, we have several product bundles available.\n•\tIncrease Profitability\nAccess to Tripfro will give you best Inventory and Pricing worldwide\n•\tProducts & Services\nAccess to best rates for flights, hotels ,cars, transfers and more. World Class Support, Realtime Dashboard and Reporting.\n•\tWidest Product Range\nGrow Your Travel Business & Earn in More with Tripfro\n•\tBest Benefits\nExclusive benefits like highest commission, widest range of products and best prices.\n\n\nTo know more about TripFro, please visit \nhttps://www.tripfro.com/",
|
| 20 |
+
"method":"GET",
|
| 21 |
+
"required_parameters":[],
|
| 22 |
+
"optional_parameters":[],
|
| 23 |
+
"code":"import requests\n\nurl = \"https://online-travel-booking-solution.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"online-travel-booking-solution.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 24 |
+
"statuscode":111,
|
| 25 |
+
"body":"",
|
| 26 |
+
"headers":"",
|
| 27 |
+
"schema":""
|
| 28 |
+
}
|
| 29 |
+
]
|
| 30 |
+
}
|
toolbench/toolenv/tools/Travel/online_travel_booking_solution/api.py
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def david_peeter(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Tripfro platform consist of many components assembled to get your one stop travel software and travel technology, to automate travel business process and configured in many ways to meet your business goals. Our service never stops with the sales of our softwares or API Solutions. It goes on in the form of after-sales service since we understand that our products are designed to satisfy your requirements for many years to come. Whatever your Business requirement, Tripfro offers completely managed best fit online travel booking solution. Join with us to expand your business with exclusive benefits.
|
| 12 |
+
• Flight
|
| 13 |
+
Get lowest airfares, highest commission on domestic and international flight tickets to 5000 cities.
|
| 14 |
+
• Hotel
|
| 15 |
+
Search and book the best hotel for your customers with highest commissions! . We offer you more Hotels across the world.
|
| 16 |
+
• Car
|
| 17 |
+
We provide customers with international car rental and private transfer that are tailored to meet their needs.
|
| 18 |
+
• Transfers
|
| 19 |
+
Your customers will be met at the Hotel and taken to hotel with variety of vehicles.
|
| 20 |
+
|
| 21 |
+
THE TRIPFRO ADVANTAGE EARN MORE
|
| 22 |
+
ON EVERY BOOKING
|
| 23 |
+
Tripfro booking Engines designed to reduce cost and increase revenues, enable you to deliver the highest level of customer service.
|
| 24 |
+
• Trustworthy Security
|
| 25 |
+
• Support for multi-location environment
|
| 26 |
+
• Real time online bookings
|
| 27 |
+
• Flexible commission and mark-up settings against suppliers
|
| 28 |
+
• Reduced time and cost of report design and distribution
|
| 29 |
+
• Global Suppliers
|
| 30 |
+
• Empower people at all levels of your organization to make informed measures using software that is familiar and easy to use
|
| 31 |
+
• Largest Travel Network
|
| 32 |
+
Our platform is powered by 70+ suppliers across flight, hotels, car,transfers and other services.
|
| 33 |
+
• Full Service Model
|
| 34 |
+
For all Type of travel companies, we have several product bundles available.
|
| 35 |
+
• Increase Profitability
|
| 36 |
+
Access to Tripfro will give you best Inventory and Pricing worldwide
|
| 37 |
+
• Products & Services
|
| 38 |
+
Access to best rates for flights, hotels ,cars, transfers and more. World Class Support, Realtime Dashboard and Reporting.
|
| 39 |
+
• Widest Product Range
|
| 40 |
+
Grow Your Travel Business & Earn in More with Tripfro
|
| 41 |
+
• Best Benefits
|
| 42 |
+
Exclusive benefits like highest commission, widest range of products and best prices.
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
To know more about TripFro, please visit
|
| 46 |
+
https://www.tripfro.com/"
|
| 47 |
+
|
| 48 |
+
"""
|
| 49 |
+
url = f"https://online-travel-booking-solution.p.rapidapi.com/"
|
| 50 |
+
querystring = {}
|
| 51 |
+
|
| 52 |
+
headers = {
|
| 53 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 54 |
+
"X-RapidAPI-Host": "online-travel-booking-solution.p.rapidapi.com"
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 59 |
+
try:
|
| 60 |
+
observation = response.json()
|
| 61 |
+
except:
|
| 62 |
+
observation = response.text
|
| 63 |
+
return observation
|
| 64 |
+
|
toolbench/toolenv/tools/Travel/otrams_airline_reservation_system_work.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"OTRAMS - Airline Reservation System Work",
|
| 3 |
+
"tool_description":"If you are a Travel Agency, looking to add Flight reservation services to your online travel portal, here is how our Online flight booking engine works for you.",
|
| 4 |
+
"title":"OTRAMS - Airline Reservation System Work",
|
| 5 |
+
"pricing":"FREE",
|
| 6 |
+
"score":{
|
| 7 |
+
"avgServiceLevel":100,
|
| 8 |
+
"avgLatency":887,
|
| 9 |
+
"avgSuccessRate":0,
|
| 10 |
+
"popularityScore":0.1,
|
| 11 |
+
"__typename":"Score"
|
| 12 |
+
},
|
| 13 |
+
"home_url":"https://rapidapi.com/otramssoftware-UbOeygPxV9G/api/otrams-airline-reservation-system-work/",
|
| 14 |
+
"host":"otrams-airline-reservation-system-work.p.rapidapi.com",
|
| 15 |
+
"api_list":[
|
| 16 |
+
{
|
| 17 |
+
"name":"Flight Reservation System",
|
| 18 |
+
"url":"https://otrams-airline-reservation-system-work.p.rapidapi.com/",
|
| 19 |
+
"description":"OTRAMS provides a customized airline booking system with a complete flight reservation system solution for a travel agent with dynamic packages.",
|
| 20 |
+
"method":"GET",
|
| 21 |
+
"required_parameters":[],
|
| 22 |
+
"optional_parameters":[],
|
| 23 |
+
"code":"import requests\n\nurl = \"https://otrams-airline-reservation-system-work.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"otrams-airline-reservation-system-work.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 24 |
+
"statuscode":111,
|
| 25 |
+
"body":"",
|
| 26 |
+
"headers":"",
|
| 27 |
+
"schema":""
|
| 28 |
+
}
|
| 29 |
+
]
|
| 30 |
+
}
|
toolbench/toolenv/tools/Travel/otrams_airline_reservation_system_work/api.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def flight_reservation_system(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"OTRAMS provides a customized airline booking system with a complete flight reservation system solution for a travel agent with dynamic packages."
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://otrams-airline-reservation-system-work.p.rapidapi.com/"
|
| 15 |
+
querystring = {}
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "otrams-airline-reservation-system-work.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
toolbench/toolenv/tools/Travel/pikme.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"pikme",
|
| 3 |
+
"tool_description":"pikme",
|
| 4 |
+
"title":"pikme",
|
| 5 |
+
"pricing":"FREE",
|
| 6 |
+
"score":null,
|
| 7 |
+
"home_url":"https://rapidapi.com/seop66me-O_nYHS-Cowe/api/pikme/",
|
| 8 |
+
"host":"pikme.p.rapidapi.com",
|
| 9 |
+
"api_list":[
|
| 10 |
+
{
|
| 11 |
+
"name":"pikemusa.com",
|
| 12 |
+
"url":"https://pikme.p.rapidapi.com/",
|
| 13 |
+
"description":"pikemusa.com",
|
| 14 |
+
"method":"GET",
|
| 15 |
+
"required_parameters":[],
|
| 16 |
+
"optional_parameters":[
|
| 17 |
+
{
|
| 18 |
+
"name":"pikemusa",
|
| 19 |
+
"type":"STRING",
|
| 20 |
+
"description":"",
|
| 21 |
+
"default":""
|
| 22 |
+
}
|
| 23 |
+
],
|
| 24 |
+
"code":"import requests\n\nurl = \"https://pikme.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pikme.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 25 |
+
"statuscode":111,
|
| 26 |
+
"body":"",
|
| 27 |
+
"headers":"",
|
| 28 |
+
"schema":""
|
| 29 |
+
}
|
| 30 |
+
]
|
| 31 |
+
}
|
toolbench/toolenv/tools/Travel/pikme/api.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def pikemusa_com(pikemusa: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"pikemusa.com"
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://pikme.p.rapidapi.com/"
|
| 15 |
+
querystring = {}
|
| 16 |
+
if pikemusa:
|
| 17 |
+
querystring['pikemusa'] = pikemusa
|
| 18 |
+
|
| 19 |
+
headers = {
|
| 20 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 21 |
+
"X-RapidAPI-Host": "pikme.p.rapidapi.com"
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 26 |
+
try:
|
| 27 |
+
observation = response.json()
|
| 28 |
+
except:
|
| 29 |
+
observation = response.text
|
| 30 |
+
return observation
|
| 31 |
+
|
toolbench/toolenv/tools/Travel/pnr_converter.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"product_id": "api_762cbf99-dd38-4135-8b7d-ad85af15f7e1",
|
| 3 |
+
"tool_description": "Made for Galileo, Smartpoint, Amadeus and Sabre formats",
|
| 4 |
+
"home_url": "https://rapidapi.com/rodrigopiston/api/pnr-converter1/",
|
| 5 |
+
"name": "PNR Converter ",
|
| 6 |
+
"title": "PNR Converter ",
|
| 7 |
+
"pricing": "FREEMIUM",
|
| 8 |
+
"tool_name": "PNR Converter ",
|
| 9 |
+
"score": {
|
| 10 |
+
"avgServiceLevel": 0,
|
| 11 |
+
"avgLatency": 382,
|
| 12 |
+
"avgSuccessRate": 0,
|
| 13 |
+
"popularityScore": 0,
|
| 14 |
+
"__typename": "Score"
|
| 15 |
+
},
|
| 16 |
+
"host": "pnr-converter1.p.rapidapi.com",
|
| 17 |
+
"api_list": [
|
| 18 |
+
{
|
| 19 |
+
"name": "Convert PNR",
|
| 20 |
+
"url": "https://pnr-converter1.p.rapidapi.com/post_pnr",
|
| 21 |
+
"description": "PNR Converter",
|
| 22 |
+
"method": "POST",
|
| 23 |
+
"required_parameters": [],
|
| 24 |
+
"optional_parameters": [],
|
| 25 |
+
"code": "import requests\n\nurl = \"https://pnr-converter1.p.rapidapi.com/post_pnr\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pnr-converter1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
|
| 26 |
+
"convert_code": "import requests\n\nurl = \"https://pnr-converter1.p.rapidapi.com/post_pnr\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pnr-converter1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
|
| 27 |
+
"test_endpoint": ""
|
| 28 |
+
}
|
| 29 |
+
]
|
| 30 |
+
}
|
toolbench/toolenv/tools/Travel/pnr_status_indian_railway.json
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name":"PNR STATUS - INDIAN RAILWAY",
|
| 3 |
+
"tool_description":"Get PNR status and additional passenger info of Indian railways using this easy API, this is developed for educational purposes only and we are not affiliated to Indian railways in any form and this is not an official API.",
|
| 4 |
+
"title":"PNR STATUS - INDIAN RAILWAY",
|
| 5 |
+
"pricing":"FREEMIUM",
|
| 6 |
+
"score":{
|
| 7 |
+
"avgServiceLevel":100,
|
| 8 |
+
"avgLatency":1151,
|
| 9 |
+
"avgSuccessRate":100,
|
| 10 |
+
"popularityScore":9.6,
|
| 11 |
+
"__typename":"Score"
|
| 12 |
+
},
|
| 13 |
+
"home_url":"https://rapidapi.com/dev2919/api/pnr-status-indian-railway/",
|
| 14 |
+
"host":"pnr-status-indian-railway.p.rapidapi.com",
|
| 15 |
+
"api_list":[
|
| 16 |
+
{
|
| 17 |
+
"name":"PNR number",
|
| 18 |
+
"url":"https://pnr-status-indian-railway.p.rapidapi.com/pnr-check/{pnr}",
|
| 19 |
+
"description":"PNR number parameter is mandatory. The API will fetch all the info if the PNR is valid or not expired",
|
| 20 |
+
"method":"GET",
|
| 21 |
+
"required_parameters":[
|
| 22 |
+
{
|
| 23 |
+
"name":"PNR",
|
| 24 |
+
"type":"string",
|
| 25 |
+
"description":"",
|
| 26 |
+
"default":"8531575878"
|
| 27 |
+
}
|
| 28 |
+
],
|
| 29 |
+
"optional_parameters":[],
|
| 30 |
+
"code":"import requests\n\nurl = \"https://pnr-status-indian-railway.p.rapidapi.com/pnr-check/{pnr}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pnr-status-indian-railway.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 31 |
+
"statuscode":200,
|
| 32 |
+
"body":{
|
| 33 |
+
"arrival_data":{
|
| 34 |
+
"arrival_date":"Tue, 09 Jun 04:45",
|
| 35 |
+
"arrival_time":"Tue, 09 Jun 04:45"
|
| 36 |
+
},
|
| 37 |
+
"boarding_station":"Bhusaval Junction-BSL",
|
| 38 |
+
"chart_status":"Chart Prepared",
|
| 39 |
+
"class":"3A",
|
| 40 |
+
"departure_data":{
|
| 41 |
+
"departure_date":"Sun, 07 Jun 06:25",
|
| 42 |
+
"departure_time":"Sun, 07 Jun 06:25"
|
| 43 |
+
},
|
| 44 |
+
"passenger":[
|
| 45 |
+
{
|
| 46 |
+
"booking_status":"W/L 6,RLGN",
|
| 47 |
+
"current_status":"CNF B2 1",
|
| 48 |
+
"name":"Passenger 1"
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"booking_status":"W/L 7,RLGN",
|
| 52 |
+
"current_status":"CNF B2 4",
|
| 53 |
+
"name":"Passenger 2"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"booking_status":"W/L 8,RLGN",
|
| 57 |
+
"current_status":"RLWL 1",
|
| 58 |
+
"name":"Passenger 3"
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"booking_status":"W/L 9,RLGN",
|
| 62 |
+
"current_status":"RLWL 2",
|
| 63 |
+
"name":"Passenger 4"
|
| 64 |
+
}
|
| 65 |
+
],
|
| 66 |
+
"quota":"",
|
| 67 |
+
"reservation_upto":"Patliputra Junction-PPTA",
|
| 68 |
+
"train_name":"LTT PPTA SPL-02141",
|
| 69 |
+
"train_number":"LTT PPTA SPL-02141"
|
| 70 |
+
},
|
| 71 |
+
"headers":{
|
| 72 |
+
"rail":"8531575878"
|
| 73 |
+
},
|
| 74 |
+
"schema":{
|
| 75 |
+
"properties":{
|
| 76 |
+
"arrival_data":{
|
| 77 |
+
"properties":{
|
| 78 |
+
"arrival_date":{
|
| 79 |
+
"type":"string"
|
| 80 |
+
},
|
| 81 |
+
"arrival_time":{
|
| 82 |
+
"type":"string"
|
| 83 |
+
}
|
| 84 |
+
},
|
| 85 |
+
"required":[
|
| 86 |
+
"arrival_date",
|
| 87 |
+
"arrival_time"
|
| 88 |
+
],
|
| 89 |
+
"type":"object"
|
| 90 |
+
},
|
| 91 |
+
"boarding_station":{
|
| 92 |
+
"type":"string"
|
| 93 |
+
},
|
| 94 |
+
"chart_status":{
|
| 95 |
+
"type":"string"
|
| 96 |
+
},
|
| 97 |
+
"class":{
|
| 98 |
+
"type":"string"
|
| 99 |
+
},
|
| 100 |
+
"departure_data":{
|
| 101 |
+
"properties":{
|
| 102 |
+
"departure_date":{
|
| 103 |
+
"type":"string"
|
| 104 |
+
},
|
| 105 |
+
"departure_time":{
|
| 106 |
+
"type":"string"
|
| 107 |
+
}
|
| 108 |
+
},
|
| 109 |
+
"required":[
|
| 110 |
+
"departure_date",
|
| 111 |
+
"departure_time"
|
| 112 |
+
],
|
| 113 |
+
"type":"object"
|
| 114 |
+
},
|
| 115 |
+
"passenger":{
|
| 116 |
+
"items":[
|
| 117 |
+
{
|
| 118 |
+
"properties":{
|
| 119 |
+
"booking_status":{
|
| 120 |
+
"type":"string"
|
| 121 |
+
},
|
| 122 |
+
"current_status":{
|
| 123 |
+
"type":"string"
|
| 124 |
+
},
|
| 125 |
+
"name":{
|
| 126 |
+
"type":"string"
|
| 127 |
+
}
|
| 128 |
+
},
|
| 129 |
+
"required":[
|
| 130 |
+
"name",
|
| 131 |
+
"booking_status",
|
| 132 |
+
"current_status"
|
| 133 |
+
],
|
| 134 |
+
"type":"object"
|
| 135 |
+
},
|
| 136 |
+
{
|
| 137 |
+
"properties":{
|
| 138 |
+
"booking_status":{
|
| 139 |
+
"type":"string"
|
| 140 |
+
},
|
| 141 |
+
"current_status":{
|
| 142 |
+
"type":"string"
|
| 143 |
+
},
|
| 144 |
+
"name":{
|
| 145 |
+
"type":"string"
|
| 146 |
+
}
|
| 147 |
+
},
|
| 148 |
+
"required":[
|
| 149 |
+
"name",
|
| 150 |
+
"booking_status",
|
| 151 |
+
"current_status"
|
| 152 |
+
],
|
| 153 |
+
"type":"object"
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"properties":{
|
| 157 |
+
"booking_status":{
|
| 158 |
+
"type":"string"
|
| 159 |
+
},
|
| 160 |
+
"current_status":{
|
| 161 |
+
"type":"string"
|
| 162 |
+
},
|
| 163 |
+
"name":{
|
| 164 |
+
"type":"string"
|
| 165 |
+
}
|
| 166 |
+
},
|
| 167 |
+
"required":[
|
| 168 |
+
"name",
|
| 169 |
+
"booking_status",
|
| 170 |
+
"current_status"
|
| 171 |
+
],
|
| 172 |
+
"type":"object"
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"properties":{
|
| 176 |
+
"booking_status":{
|
| 177 |
+
"type":"string"
|
| 178 |
+
},
|
| 179 |
+
"current_status":{
|
| 180 |
+
"type":"string"
|
| 181 |
+
},
|
| 182 |
+
"name":{
|
| 183 |
+
"type":"string"
|
| 184 |
+
}
|
| 185 |
+
},
|
| 186 |
+
"required":[
|
| 187 |
+
"name",
|
| 188 |
+
"booking_status",
|
| 189 |
+
"current_status"
|
| 190 |
+
],
|
| 191 |
+
"type":"object"
|
| 192 |
+
}
|
| 193 |
+
],
|
| 194 |
+
"type":"array"
|
| 195 |
+
},
|
| 196 |
+
"quota":{
|
| 197 |
+
"type":"string"
|
| 198 |
+
},
|
| 199 |
+
"reservation_upto":{
|
| 200 |
+
"type":"string"
|
| 201 |
+
},
|
| 202 |
+
"train_name":{
|
| 203 |
+
"type":"string"
|
| 204 |
+
},
|
| 205 |
+
"train_number":{
|
| 206 |
+
"type":"string"
|
| 207 |
+
}
|
| 208 |
+
},
|
| 209 |
+
"required":[
|
| 210 |
+
"passenger",
|
| 211 |
+
"boarding_station",
|
| 212 |
+
"reservation_upto",
|
| 213 |
+
"departure_data",
|
| 214 |
+
"arrival_data",
|
| 215 |
+
"quota",
|
| 216 |
+
"class",
|
| 217 |
+
"chart_status",
|
| 218 |
+
"train_name",
|
| 219 |
+
"train_number"
|
| 220 |
+
],
|
| 221 |
+
"type":"object"
|
| 222 |
+
}
|
| 223 |
+
}
|
| 224 |
+
]
|
| 225 |
+
}
|
toolbench/toolenv/tools/Travel/pnr_status_indian_railway/api.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def pnr_number(pnr: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"PNR number parameter is mandatory. The API will fetch all the info if the PNR is valid or not expired"
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://pnr-status-indian-railway.p.rapidapi.com/pnr-check/{pnr}"
|
| 15 |
+
querystring = {}
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "pnr-status-indian-railway.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
toolbench/toolenv/tools/Travel/popular_us_cities_api.json
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tool_name": "Popular US cities API",
|
| 3 |
+
"tool_description": "Introducing our most popular US cities API - the ultimate resource for accessing vital information about America's most populated urban centers. With detailed data on each city's name, latitude, longitude, population, and timezone, our API makes it easy to integrate this information into your own applications and projects. Whether you're building a travel app, analyzing demographic trends, or creating a tool for remote workers, our API provides accurate and up-to-date information that can hel...",
|
| 4 |
+
"title": "Popular US cities API",
|
| 5 |
+
"pricing": "FREEMIUM",
|
| 6 |
+
"score": null,
|
| 7 |
+
"home_url": "https://rapidapi.com/abinanthan2204/api/popular-us-cities-api/",
|
| 8 |
+
"host": "popular-us-cities-api.p.rapidapi.com",
|
| 9 |
+
"api_list": [
|
| 10 |
+
{
|
| 11 |
+
"name": "GET by id",
|
| 12 |
+
"url": "https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities/1",
|
| 13 |
+
"description": "Get by ID",
|
| 14 |
+
"method": "GET",
|
| 15 |
+
"required_parameters": [],
|
| 16 |
+
"optional_parameters": [],
|
| 17 |
+
"code": "import requests\n\nurl = \"https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities/1\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"popular-us-cities-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 18 |
+
"statuscode": 111,
|
| 19 |
+
"body": "",
|
| 20 |
+
"headers": "",
|
| 21 |
+
"schema": ""
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"name": "GET Filter",
|
| 25 |
+
"url": "https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities?name=value",
|
| 26 |
+
"description": "Get By Names Filter Values",
|
| 27 |
+
"method": "GET",
|
| 28 |
+
"required_parameters": [],
|
| 29 |
+
"optional_parameters": [],
|
| 30 |
+
"code": "import requests\n\nurl = \"https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities?name=value\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"popular-us-cities-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 31 |
+
"statuscode": 111,
|
| 32 |
+
"body": "",
|
| 33 |
+
"headers": "",
|
| 34 |
+
"schema": ""
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"name": "DELETE",
|
| 38 |
+
"url": "https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities/1",
|
| 39 |
+
"description": "Delete Request",
|
| 40 |
+
"method": "DELETE",
|
| 41 |
+
"required_parameters": [],
|
| 42 |
+
"optional_parameters": [],
|
| 43 |
+
"code": "import requests\n\nurl = \"https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities/1\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"popular-us-cities-api.p.rapidapi.com\"\n}\n\nresponse = requests.delete(url, headers=headers)\n\nprint(response.json())\n",
|
| 44 |
+
"statuscode": 111,
|
| 45 |
+
"body": "",
|
| 46 |
+
"headers": "",
|
| 47 |
+
"schema": ""
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"name": "PATCH",
|
| 51 |
+
"url": "https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities/1",
|
| 52 |
+
"description": "Patch Request",
|
| 53 |
+
"method": "PATCH",
|
| 54 |
+
"required_parameters": [],
|
| 55 |
+
"optional_parameters": [],
|
| 56 |
+
"code": "import requests\n\nurl = \"https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities/1\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"popular-us-cities-api.p.rapidapi.com\"\n}\n\nresponse = requests.patch(url, headers=headers)\n\nprint(response.json())\n",
|
| 57 |
+
"statuscode": 111,
|
| 58 |
+
"body": "",
|
| 59 |
+
"headers": "",
|
| 60 |
+
"schema": ""
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"name": "PUT Request",
|
| 64 |
+
"url": "https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities/1",
|
| 65 |
+
"description": "PUT Request for UScities",
|
| 66 |
+
"method": "PUT",
|
| 67 |
+
"required_parameters": [],
|
| 68 |
+
"optional_parameters": [],
|
| 69 |
+
"code": "import requests\n\nurl = \"https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities/1\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"popular-us-cities-api.p.rapidapi.com\"\n}\n\nresponse = requests.put(url, headers=headers)\n\nprint(response.json())\n",
|
| 70 |
+
"statuscode": 111,
|
| 71 |
+
"body": "",
|
| 72 |
+
"headers": "",
|
| 73 |
+
"schema": ""
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"name": "POST Request for Us cities",
|
| 77 |
+
"url": "https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities",
|
| 78 |
+
"description": "Post Request for US Cities",
|
| 79 |
+
"method": "POST",
|
| 80 |
+
"required_parameters": [],
|
| 81 |
+
"optional_parameters": [],
|
| 82 |
+
"code": "import requests\n\nurl = \"https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"popular-us-cities-api.p.rapidapi.com\"\n}\n\nresponse = requests.post(url, headers=headers)\n\nprint(response.json())\n",
|
| 83 |
+
"statuscode": 111,
|
| 84 |
+
"body": "",
|
| 85 |
+
"headers": "",
|
| 86 |
+
"schema": ""
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
"name": "GET request",
|
| 90 |
+
"url": "https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities",
|
| 91 |
+
"description": "get request",
|
| 92 |
+
"method": "GET",
|
| 93 |
+
"required_parameters": [],
|
| 94 |
+
"optional_parameters": [],
|
| 95 |
+
"code": "import requests\n\nurl = \"https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"popular-us-cities-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
|
| 96 |
+
"statuscode": 111,
|
| 97 |
+
"body": "",
|
| 98 |
+
"headers": "",
|
| 99 |
+
"schema": ""
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"name": "POST Request for Us cities",
|
| 103 |
+
"url": "https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities",
|
| 104 |
+
"description": "Post Request for US Cities",
|
| 105 |
+
"method": "POST",
|
| 106 |
+
"required_parameters": [],
|
| 107 |
+
"optional_parameters": [],
|
| 108 |
+
"code": "import requests\n\nurl = \"https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"popular-us-cities-api.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
|
| 109 |
+
"convert_code": "import requests\n\nurl = \"https://popular-us-cities-api.p.rapidapi.com/U5akkP/uscities\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"popular-us-cities-api.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
|
| 110 |
+
"test_endpoint": ""
|
| 111 |
+
}
|
| 112 |
+
]
|
| 113 |
+
}
|
toolbench/toolenv/tools/Travel/popular_us_cities_api/api.py
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def get_by_id(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Get by ID"
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://popular-us-cities-api.p.rapidapi.com/u5akkp/uscities/1"
|
| 15 |
+
querystring = {}
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "popular-us-cities-api.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
| 30 |
+
def get_filter(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 31 |
+
"""
|
| 32 |
+
"Get By Names Filter Values"
|
| 33 |
+
|
| 34 |
+
"""
|
| 35 |
+
url = f"https://popular-us-cities-api.p.rapidapi.com/u5akkp/uscities?name=value"
|
| 36 |
+
querystring = {}
|
| 37 |
+
|
| 38 |
+
headers = {
|
| 39 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 40 |
+
"X-RapidAPI-Host": "popular-us-cities-api.p.rapidapi.com"
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 45 |
+
try:
|
| 46 |
+
observation = response.json()
|
| 47 |
+
except:
|
| 48 |
+
observation = response.text
|
| 49 |
+
return observation
|
| 50 |
+
|
| 51 |
+
def get_request(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 52 |
+
"""
|
| 53 |
+
"get request"
|
| 54 |
+
|
| 55 |
+
"""
|
| 56 |
+
url = f"https://popular-us-cities-api.p.rapidapi.com/u5akkp/uscities"
|
| 57 |
+
querystring = {}
|
| 58 |
+
|
| 59 |
+
headers = {
|
| 60 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 61 |
+
"X-RapidAPI-Host": "popular-us-cities-api.p.rapidapi.com"
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 66 |
+
try:
|
| 67 |
+
observation = response.json()
|
| 68 |
+
except:
|
| 69 |
+
observation = response.text
|
| 70 |
+
return observation
|
| 71 |
+
|
toolbench/toolenv/tools/Travel/priceline_com.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
toolbench/toolenv/tools/Travel/priceline_com/api.py
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
from datetime import date, datetime, timedelta
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from typing import Optional, Dict, Union, List
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def car_rental_location(q: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 10 |
+
"""
|
| 11 |
+
"Search car rental location"
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
url = f"https://priceline-com.p.rapidapi.com/cars/location/search"
|
| 15 |
+
querystring = {'q': q, }
|
| 16 |
+
|
| 17 |
+
headers = {
|
| 18 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 19 |
+
"X-RapidAPI-Host": "priceline-com.p.rapidapi.com"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 24 |
+
try:
|
| 25 |
+
observation = response.json()
|
| 26 |
+
except:
|
| 27 |
+
observation = response.text
|
| 28 |
+
return observation
|
| 29 |
+
|
| 30 |
+
def flights_round_trip(departure_date: str, return_date: str, destination: str, origin: str, adults: int=1, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 31 |
+
"""
|
| 32 |
+
"Search round trip flights"
|
| 33 |
+
|
| 34 |
+
"""
|
| 35 |
+
url = f"https://priceline-com.p.rapidapi.com/flights/{origin}/{destination}/{departure_date}/{return_date}"
|
| 36 |
+
querystring = {}
|
| 37 |
+
if adults:
|
| 38 |
+
querystring['adults'] = adults
|
| 39 |
+
|
| 40 |
+
headers = {
|
| 41 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 42 |
+
"X-RapidAPI-Host": "priceline-com.p.rapidapi.com"
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 47 |
+
try:
|
| 48 |
+
observation = response.json()
|
| 49 |
+
except:
|
| 50 |
+
observation = response.text
|
| 51 |
+
return observation
|
| 52 |
+
|
| 53 |
+
def flights_one_way(destination: str, departure_date: str, origin: str, adults: int=1, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 54 |
+
"""
|
| 55 |
+
"Search one way flights"
|
| 56 |
+
|
| 57 |
+
"""
|
| 58 |
+
url = f"https://priceline-com.p.rapidapi.com/flights/{origin}/{destination}/{departure_date}"
|
| 59 |
+
querystring = {}
|
| 60 |
+
if adults:
|
| 61 |
+
querystring['adults'] = adults
|
| 62 |
+
|
| 63 |
+
headers = {
|
| 64 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 65 |
+
"X-RapidAPI-Host": "priceline-com.p.rapidapi.com"
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 70 |
+
try:
|
| 71 |
+
observation = response.json()
|
| 72 |
+
except:
|
| 73 |
+
observation = response.text
|
| 74 |
+
return observation
|
| 75 |
+
|
| 76 |
+
def car_rental_prices(pickup_location_id: str, pickup_date: str, return_date: str, return_location_id: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 77 |
+
"""
|
| 78 |
+
"Search car rental prices"
|
| 79 |
+
|
| 80 |
+
"""
|
| 81 |
+
url = f"https://priceline-com.p.rapidapi.com/cars/{pickup_location_id}"
|
| 82 |
+
querystring = {'pickup_date': pickup_date, 'return_date': return_date, }
|
| 83 |
+
if return_location_id:
|
| 84 |
+
querystring['return_location_id'] = return_location_id
|
| 85 |
+
|
| 86 |
+
headers = {
|
| 87 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 88 |
+
"X-RapidAPI-Host": "priceline-com.p.rapidapi.com"
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 93 |
+
try:
|
| 94 |
+
observation = response.json()
|
| 95 |
+
except:
|
| 96 |
+
observation = response.text
|
| 97 |
+
return observation
|
| 98 |
+
|
| 99 |
+
def hotel_city_search(q: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 100 |
+
"""
|
| 101 |
+
"Search city id by keyword"
|
| 102 |
+
|
| 103 |
+
"""
|
| 104 |
+
url = f"https://priceline-com.p.rapidapi.com/hotels/city/search"
|
| 105 |
+
querystring = {'q': q, }
|
| 106 |
+
|
| 107 |
+
headers = {
|
| 108 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 109 |
+
"X-RapidAPI-Host": "priceline-com.p.rapidapi.com"
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 114 |
+
try:
|
| 115 |
+
observation = response.json()
|
| 116 |
+
except:
|
| 117 |
+
observation = response.text
|
| 118 |
+
return observation
|
| 119 |
+
|
| 120 |
+
def hotel_city_nearby(longitude: str, latitude: str, radius: int=100, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 121 |
+
"""
|
| 122 |
+
"Search city id by geolocation"
|
| 123 |
+
|
| 124 |
+
"""
|
| 125 |
+
url = f"https://priceline-com.p.rapidapi.com/hotels/city/nearby/{latitude}/{longitude}"
|
| 126 |
+
querystring = {}
|
| 127 |
+
if radius:
|
| 128 |
+
querystring['radius'] = radius
|
| 129 |
+
|
| 130 |
+
headers = {
|
| 131 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 132 |
+
"X-RapidAPI-Host": "priceline-com.p.rapidapi.com"
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 137 |
+
try:
|
| 138 |
+
observation = response.json()
|
| 139 |
+
except:
|
| 140 |
+
observation = response.text
|
| 141 |
+
return observation
|
| 142 |
+
|
| 143 |
+
def hotel_list(city_id: int, checkin_date: str, checkout_date: str, currency: str='USD', offset: str='0', rooms: int=1, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 144 |
+
"""
|
| 145 |
+
"List hotels by city ID"
|
| 146 |
+
|
| 147 |
+
"""
|
| 148 |
+
url = f"https://priceline-com.p.rapidapi.com/hotels/{city_id}"
|
| 149 |
+
querystring = {'checkin_date': checkin_date, 'checkout_date': checkout_date, }
|
| 150 |
+
if currency:
|
| 151 |
+
querystring['currency'] = currency
|
| 152 |
+
if offset:
|
| 153 |
+
querystring['offset'] = offset
|
| 154 |
+
if rooms:
|
| 155 |
+
querystring['rooms'] = rooms
|
| 156 |
+
|
| 157 |
+
headers = {
|
| 158 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 159 |
+
"X-RapidAPI-Host": "priceline-com.p.rapidapi.com"
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 164 |
+
try:
|
| 165 |
+
observation = response.json()
|
| 166 |
+
except:
|
| 167 |
+
observation = response.text
|
| 168 |
+
return observation
|
| 169 |
+
|
| 170 |
+
def hotel_details(checkin_date: str, is_id: int, checkout_date: str, rooms: int=1, currency: str='USD', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
|
| 171 |
+
"""
|
| 172 |
+
"Get hotel details"
|
| 173 |
+
|
| 174 |
+
"""
|
| 175 |
+
url = f"https://priceline-com.p.rapidapi.com/hotel/{is_id}"
|
| 176 |
+
querystring = {'checkin_date': checkin_date, 'checkout_date': checkout_date, }
|
| 177 |
+
if rooms:
|
| 178 |
+
querystring['rooms'] = rooms
|
| 179 |
+
if currency:
|
| 180 |
+
querystring['currency'] = currency
|
| 181 |
+
|
| 182 |
+
headers = {
|
| 183 |
+
"X-RapidAPI-Key": toolbench_rapidapi_key,
|
| 184 |
+
"X-RapidAPI-Host": "priceline-com.p.rapidapi.com"
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
response = requests.get(url, headers=headers, params=querystring)
|
| 189 |
+
try:
|
| 190 |
+
observation = response.json()
|
| 191 |
+
except:
|
| 192 |
+
observation = response.text
|
| 193 |
+
return observation
|
| 194 |
+
|