Septzzz commited on
Commit
e50b0a2
·
verified ·
1 Parent(s): 33f13dd

Upload folder using huggingface_hub (part 17)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +2 -0
  2. toolbench/toolenv/tools/Location/partenaires_mobilis.json +95 -0
  3. toolbench/toolenv/tools/Location/pastru.json +159 -0
  4. toolbench/toolenv/tools/Location/pastru/api.py +29 -0
  5. toolbench/toolenv/tools/Location/pharmacies_de_garde_nc.json +37 -0
  6. toolbench/toolenv/tools/Location/pharmacies_de_garde_nc/api.py +50 -0
  7. toolbench/toolenv/tools/Location/photo_geolocation.json +37 -0
  8. toolbench/toolenv/tools/Location/pin_code_api/api.py +29 -0
  9. toolbench/toolenv/tools/Location/pin_codes_india.json +45 -0
  10. toolbench/toolenv/tools/Location/pincode_distance_measurement.json +37 -0
  11. toolbench/toolenv/tools/Location/pincode_distance_measurement/api.py +29 -0
  12. toolbench/toolenv/tools/Location/pincode_search.json +31 -0
  13. toolbench/toolenv/tools/Location/pincode_search/api.py +29 -0
  14. toolbench/toolenv/tools/Location/polish_postcode/api.py +29 -0
  15. toolbench/toolenv/tools/Location/politicaldivitioncolombia.json +51 -0
  16. toolbench/toolenv/tools/Location/politicaldivitioncolombia/api.py +50 -0
  17. toolbench/toolenv/tools/Location/positionstack.json +30 -0
  18. toolbench/toolenv/tools/Location/positionstack/api.py +29 -0
  19. toolbench/toolenv/tools/Location/precise_ip_location_and_other_data.json +31 -0
  20. toolbench/toolenv/tools/Location/precise_ip_location_and_other_data/api.py +29 -0
  21. toolbench/toolenv/tools/Location/pt_postcodes.json +104 -0
  22. toolbench/toolenv/tools/Location/pt_postcodes/api.py +29 -0
  23. toolbench/toolenv/tools/Location/public_toilets_uk.json +26 -0
  24. toolbench/toolenv/tools/Location/quick_geo_location.json +0 -0
  25. toolbench/toolenv/tools/Location/quick_geo_location/api.py +29 -0
  26. toolbench/toolenv/tools/Location/railway_stations_india.json +32 -0
  27. toolbench/toolenv/tools/Location/real_estate.json +24 -0
  28. toolbench/toolenv/tools/Location/real_estate/api.py +29 -0
  29. toolbench/toolenv/tools/Location/real_estate_value.json +26 -0
  30. toolbench/toolenv/tools/Location/redline_zipcode.json +272 -0
  31. toolbench/toolenv/tools/Location/redline_zipcode/api.py +53 -0
  32. toolbench/toolenv/tools/Location/referential.json +1091 -0
  33. toolbench/toolenv/tools/Location/referential/api.py +478 -0
  34. toolbench/toolenv/tools/Location/rest_country_api.json +1415 -0
  35. toolbench/toolenv/tools/Location/rest_country_api/api.py +51 -0
  36. toolbench/toolenv/tools/Location/reverse_geocode.json +31 -0
  37. toolbench/toolenv/tools/Location/reverse_geocode/api.py +31 -0
  38. toolbench/toolenv/tools/Location/reverse_geocoder.json +31 -0
  39. toolbench/toolenv/tools/Location/reverse_geocoder/api.py +29 -0
  40. toolbench/toolenv/tools/Location/reverse_geocoding/api.py +29 -0
  41. toolbench/toolenv/tools/Location/reverse_geocoding_to_city.json +50 -0
  42. toolbench/toolenv/tools/Location/reverse_geocoding_to_city/api.py +31 -0
  43. toolbench/toolenv/tools/Location/reverse_geocoding_v2.json +38 -0
  44. toolbench/toolenv/tools/Location/reverse_geocoding_v2/api.py +29 -0
  45. toolbench/toolenv/tools/Location/reverse_geocoding_v3.json +91 -0
  46. toolbench/toolenv/tools/Location/reverse_geocoding_v3/api.py +29 -0
  47. toolbench/toolenv/tools/Location/reverse_geocoding_with_timezone.json +44 -0
  48. toolbench/toolenv/tools/Location/reverse_geocoding_with_timezone/api.py +31 -0
  49. toolbench/toolenv/tools/Location/reverse_geolocation.json +37 -0
  50. toolbench/toolenv/tools/Location/reverse_geolocation/api.py +29 -0
.gitattributes CHANGED
@@ -70,3 +70,5 @@ toolbench/toolenv/tools/Finance/prague_stock_exchange.json filter=lfs diff=lfs m
70
  toolbench/toolenv/tools/Finance/sec_edgar.json filter=lfs diff=lfs merge=lfs -text
71
  toolbench/toolenv/tools/Food/tasty.json filter=lfs diff=lfs merge=lfs -text
72
  toolbench/toolenv/tools/Gaming/cod_api_2_0.json filter=lfs diff=lfs merge=lfs -text
 
 
 
70
  toolbench/toolenv/tools/Finance/sec_edgar.json filter=lfs diff=lfs merge=lfs -text
71
  toolbench/toolenv/tools/Food/tasty.json filter=lfs diff=lfs merge=lfs -text
72
  toolbench/toolenv/tools/Gaming/cod_api_2_0.json filter=lfs diff=lfs merge=lfs -text
73
+ toolbench/toolenv/tools/Mapping/boundaries_io.json filter=lfs diff=lfs merge=lfs -text
74
+ toolbench/toolenv/tools/Medical/the_cancer_imaging_archive.json filter=lfs diff=lfs merge=lfs -text
toolbench/toolenv/tools/Location/partenaires_mobilis.json ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Partenaires Mobilis",
3
+ "tool_description":"Connaître et localiser les partenaires Mobilis de l'OPT-NC",
4
+ "title":"Partenaires Mobilis",
5
+ "pricing":"FREE",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":307,
9
+ "avgSuccessRate":99,
10
+ "popularityScore":9.4,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/opt-nc-opt-nc-default/api/partenaires-mobilis/",
14
+ "host":"partenaires-mobilis.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Partenaire par id",
18
+ "url":"https://partenaires-mobilis.p.rapidapi.com/api/partenaires/{id}",
19
+ "description":"Récupérer un partenaire par son id",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"id",
24
+ "type":"string",
25
+ "description":"id du partenaire fourni par API.",
26
+ "default":"14"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://partenaires-mobilis.p.rapidapi.com/api/partenaires/{id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"partenaires-mobilis.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":"Get ALL partenaires",
38
+ "url":"https://partenaires-mobilis.p.rapidapi.com/api/partenaires",
39
+ "description":"Récupérer tous les partenaires.",
40
+ "method":"GET",
41
+ "required_parameters":[],
42
+ "optional_parameters":[],
43
+ "code":"import requests\n\nurl = \"https://partenaires-mobilis.p.rapidapi.com/api/partenaires\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"partenaires-mobilis.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
44
+ "statuscode":111,
45
+ "body":"",
46
+ "headers":"",
47
+ "schema":""
48
+ },
49
+ {
50
+ "name":"Géolocaliser les partenaires",
51
+ "url":"https://partenaires-mobilis.p.rapidapi.com/api/partenaires",
52
+ "description":"Récupérer tous les partenaires, ou récupérer tous les partenaires dans un rayon donné autour d'un point donné :\n\n- **nearByLon**= {longitude du centre du cercle de la zone de recherche}\n- **nearByLat**= {latitude du centre du cercle de la zone de recherche}\n- **nearByDistance**= {rayon du cercle de la zone de recherche}",
53
+ "method":"GET",
54
+ "required_parameters":[],
55
+ "optional_parameters":[
56
+ {
57
+ "name":"nearByDistance",
58
+ "type":"STRING",
59
+ "description":"",
60
+ "default":"2000"
61
+ },
62
+ {
63
+ "name":"nearByLon",
64
+ "type":"STRING",
65
+ "description":"",
66
+ "default":"166.448744"
67
+ },
68
+ {
69
+ "name":"nearByLat",
70
+ "type":"STRING",
71
+ "description":"",
72
+ "default":"-22.302828"
73
+ }
74
+ ],
75
+ "code":"import requests\n\nurl = \"https://partenaires-mobilis.p.rapidapi.com/api/partenaires\"\nquerystring = {\"nearByDistance\": nearbydistance, \"nearByLon\": nearbylon, \"nearByLat\": nearbylat}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"partenaires-mobilis.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
76
+ "statuscode":111,
77
+ "body":"",
78
+ "headers":"",
79
+ "schema":""
80
+ },
81
+ {
82
+ "name":"Health",
83
+ "url":"https://partenaires-mobilis.p.rapidapi.com/actuator/health",
84
+ "description":"Donne l'état de santé de l'API",
85
+ "method":"GET",
86
+ "required_parameters":[],
87
+ "optional_parameters":[],
88
+ "code":"import requests\n\nurl = \"https://partenaires-mobilis.p.rapidapi.com/actuator/health\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"partenaires-mobilis.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
89
+ "statuscode":111,
90
+ "body":"",
91
+ "headers":"",
92
+ "schema":""
93
+ }
94
+ ]
95
+ }
toolbench/toolenv/tools/Location/pastru.json ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name": "Pastru",
3
+ "tool_description": "An Api that also you to make api call from different geographical regions",
4
+ "title": "Pastru",
5
+ "pricing": "FREEMIUM",
6
+ "score": null,
7
+ "home_url": "https://rapidapi.com/strangestar-pastru/api/pastru/",
8
+ "host": "pastru.p.rapidapi.com",
9
+ "api_list": [
10
+ {
11
+ "name": "getPastru",
12
+ "url": "https://pastru.p.rapidapi.com/pastru/{location}",
13
+ "description": "Pastru GET request",
14
+ "method": "GET",
15
+ "required_parameters": [
16
+ {
17
+ "name": "X-Forward",
18
+ "type": "STRING",
19
+ "description": "",
20
+ "default": "http://api.open-notify.org/astros.json"
21
+ },
22
+ {
23
+ "name": "location",
24
+ "type": "string",
25
+ "description": "",
26
+ "default": "iowa"
27
+ }
28
+ ],
29
+ "optional_parameters": [],
30
+ "code": "import requests\n\nurl = \"https://pastru.p.rapidapi.com/pastru/{location}\"\nquerystring = {\"X-Forward\": x_forward}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pastru.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
+ "name": "postPastru",
38
+ "url": "https://pastru.p.rapidapi.com/pastru/{location}",
39
+ "description": "Pastru POST request",
40
+ "method": "POST",
41
+ "required_parameters": [
42
+ {
43
+ "name": "X-Forward",
44
+ "type": "STRING",
45
+ "description": "",
46
+ "default": ""
47
+ },
48
+ {
49
+ "name": "location",
50
+ "type": "string",
51
+ "description": "",
52
+ "default": "iowa"
53
+ }
54
+ ],
55
+ "optional_parameters": [],
56
+ "code": "import requests\n\nurl = \"https://pastru.p.rapidapi.com/pastru/{location}\"\nquerystring = {\"X-Forward\": x_forward}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pastru.p.rapidapi.com\"\n}\n\nresponse = requests.post(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
57
+ "statuscode": 111,
58
+ "body": "",
59
+ "headers": "",
60
+ "schema": ""
61
+ },
62
+ {
63
+ "name": "putPastru",
64
+ "url": "https://pastru.p.rapidapi.com/pastru/{location}",
65
+ "description": "Pastru PUT request",
66
+ "method": "PUT",
67
+ "required_parameters": [
68
+ {
69
+ "name": "X-Forward",
70
+ "type": "STRING",
71
+ "description": "",
72
+ "default": ""
73
+ },
74
+ {
75
+ "name": "location",
76
+ "type": "string",
77
+ "description": "",
78
+ "default": "iowa"
79
+ }
80
+ ],
81
+ "optional_parameters": [],
82
+ "code": "import requests\n\nurl = \"https://pastru.p.rapidapi.com/pastru/{location}\"\nquerystring = {\"X-Forward\": x_forward}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pastru.p.rapidapi.com\"\n}\n\nresponse = requests.put(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
83
+ "statuscode": 111,
84
+ "body": "",
85
+ "headers": "",
86
+ "schema": ""
87
+ },
88
+ {
89
+ "name": "deletePastru",
90
+ "url": "https://pastru.p.rapidapi.com/pastru/{location}",
91
+ "description": "Pastru DELETE request",
92
+ "method": "DELETE",
93
+ "required_parameters": [
94
+ {
95
+ "name": "X-Forward",
96
+ "type": "STRING",
97
+ "description": "",
98
+ "default": ""
99
+ },
100
+ {
101
+ "name": "location",
102
+ "type": "string",
103
+ "description": "",
104
+ "default": "iowa"
105
+ }
106
+ ],
107
+ "optional_parameters": [],
108
+ "code": "import requests\n\nurl = \"https://pastru.p.rapidapi.com/pastru/{location}\"\nquerystring = {\"X-Forward\": x_forward}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pastru.p.rapidapi.com\"\n}\n\nresponse = requests.delete(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
109
+ "statuscode": 111,
110
+ "body": "",
111
+ "headers": "",
112
+ "schema": ""
113
+ },
114
+ {
115
+ "name": "patchPastru",
116
+ "url": "https://pastru.p.rapidapi.com/pastru/{location}",
117
+ "description": "Pastru PATCH request",
118
+ "method": "PATCH",
119
+ "required_parameters": [
120
+ {
121
+ "name": "X-Forward",
122
+ "type": "STRING",
123
+ "description": "",
124
+ "default": ""
125
+ },
126
+ {
127
+ "name": "location",
128
+ "type": "string",
129
+ "description": "",
130
+ "default": "iowa"
131
+ }
132
+ ],
133
+ "optional_parameters": [],
134
+ "code": "import requests\n\nurl = \"https://pastru.p.rapidapi.com/pastru/{location}\"\nquerystring = {\"X-Forward\": x_forward}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pastru.p.rapidapi.com\"\n}\n\nresponse = requests.patch(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
135
+ "statuscode": 111,
136
+ "body": "",
137
+ "headers": "",
138
+ "schema": ""
139
+ },
140
+ {
141
+ "name": "postPastru",
142
+ "url": "https://pastru.p.rapidapi.com/pastru/iowa",
143
+ "description": "Pastru POST request",
144
+ "method": "POST",
145
+ "required_parameters": [
146
+ {
147
+ "name": "location",
148
+ "type": "string",
149
+ "description": "",
150
+ "default": "iowa"
151
+ }
152
+ ],
153
+ "optional_parameters": [],
154
+ "code": "import requests\n\nurl = \"https://pastru.p.rapidapi.com/pastru/iowa\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pastru.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
155
+ "convert_code": "import requests\n\nurl = \"https://pastru.p.rapidapi.com/pastru/{location}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pastru.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
156
+ "test_endpoint": ""
157
+ }
158
+ ]
159
+ }
toolbench/toolenv/tools/Location/pastru/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 getpastru(x_forward: str, location: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Pastru GET request"
12
+
13
+ """
14
+ url = f"https://pastru.p.rapidapi.com/pastru/{location}"
15
+ querystring = {'X-Forward': x_forward, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "pastru.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/Location/pharmacies_de_garde_nc.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Pharmacies de garde NC",
3
+ "tool_description":"API permettant d'obtenir les informations sur les pharmacies de garde en Nouvelle-Calédonie",
4
+ "title":"Pharmacies de garde NC",
5
+ "pricing":"FREE",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/opt-nc-opt-nc-default/api/pharmacies-de-garde-nc/",
8
+ "host":"pharmacies-de-garde-nc.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Health",
12
+ "url":"https://pharmacies-de-garde-nc.p.rapidapi.com/q/health",
13
+ "description":"Renvoie le statut de l'application : up ou down",
14
+ "method":"GET",
15
+ "required_parameters":[],
16
+ "optional_parameters":[],
17
+ "code":"import requests\n\nurl = \"https://pharmacies-de-garde-nc.p.rapidapi.com/q/health\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pharmacies-de-garde-nc.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":"All",
25
+ "url":"https://pharmacies-de-garde-nc.p.rapidapi.com/gardes",
26
+ "description":"Renvoie les pharmacies de garde de Nouvelle-Calédonie",
27
+ "method":"GET",
28
+ "required_parameters":[],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://pharmacies-de-garde-nc.p.rapidapi.com/gardes\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pharmacies-de-garde-nc.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
+ }
toolbench/toolenv/tools/Location/pharmacies_de_garde_nc/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 health(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Renvoie le statut de l'application : up ou down"
12
+
13
+ """
14
+ url = f"https://pharmacies-de-garde-nc.p.rapidapi.com/q/health"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "pharmacies-de-garde-nc.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 all(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Renvoie les pharmacies de garde de Nouvelle-Calédonie"
33
+
34
+ """
35
+ url = f"https://pharmacies-de-garde-nc.p.rapidapi.com/gardes"
36
+ querystring = {}
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "pharmacies-de-garde-nc.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/Location/photo_geolocation.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "api_43e9b23d-38da-4c4d-bbed-8e25ab27c4ae",
3
+ "tool_description": "An API to get geolocation data (latitude and longitude) for an image file. Also, it generates Google Maps URL",
4
+ "home_url": "https://rapidapi.com/justahmed99/api/photo-geolocation/",
5
+ "name": "Photo Geolocation",
6
+ "title": "Photo Geolocation",
7
+ "pricing": "FREEMIUM",
8
+ "tool_name": "Photo Geolocation",
9
+ "score": {
10
+ "avgServiceLevel": 100,
11
+ "avgLatency": 36,
12
+ "avgSuccessRate": 0,
13
+ "popularityScore": 0,
14
+ "__typename": "Score"
15
+ },
16
+ "host": "photo-geolocation.p.rapidapi.com",
17
+ "api_list": [
18
+ {
19
+ "name": "Get Exif Geolocation From Photo",
20
+ "url": "https://photo-geolocation.p.rapidapi.com/get-exif",
21
+ "description": "This API returns geolocation data (latitude and longitude) for an image file. Also, it generates Google Maps URL",
22
+ "method": "POST",
23
+ "required_parameters": [
24
+ {
25
+ "name": "file",
26
+ "type": "BINARY",
27
+ "description": "",
28
+ "default": ""
29
+ }
30
+ ],
31
+ "optional_parameters": [],
32
+ "code": "import requests\n\nurl = \"https://photo-geolocation.p.rapidapi.com/get-exif\"\nquerystring = {\"file\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"photo-geolocation.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://photo-geolocation.p.rapidapi.com/get-exif\"\nquerystring = {\"file\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"photo-geolocation.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
34
+ "test_endpoint": ""
35
+ }
36
+ ]
37
+ }
toolbench/toolenv/tools/Location/pin_code_api/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 getcityname(pincode: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "getCityName.php?pincode=201301"
12
+
13
+ """
14
+ url = f"https://pin-code-api1.p.rapidapi.com/api/getcityname.php/{pincode}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "pin-code-api1.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/Location/pin_codes_india.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "5638a3fbe4b0f255c2d285f4",
3
+ "tool_description": "Find a list of post offices using either a postal code/pincode or search string in location name.",
4
+ "home_url": "https://rapidapi.com/navii/api/pin-codes-india/",
5
+ "name": "Pin Codes - India",
6
+ "title": "Pin Codes - India",
7
+ "pricing": "FREE",
8
+ "tool_name": "Pin Codes - India",
9
+ "score": {
10
+ "avgServiceLevel": 100,
11
+ "avgLatency": 867,
12
+ "avgSuccessRate": 78,
13
+ "popularityScore": 9.8,
14
+ "__typename": "Score"
15
+ },
16
+ "host": "pincode.p.rapidapi.com",
17
+ "api_list": [
18
+ {
19
+ "name": "PIN",
20
+ "url": "https://pincode.p.rapidapi.com/",
21
+ "description": "Search by pin code.",
22
+ "method": "POST",
23
+ "required_parameters": [],
24
+ "optional_parameters": [],
25
+ "code": "import requests\n\nurl = \"https://pincode.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pincode.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
26
+ "convert_code": "import requests\n\nurl = \"https://pincode.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pincode.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
27
+ "test_endpoint": "",
28
+ "statuscode": 1,
29
+ "schema": ""
30
+ },
31
+ {
32
+ "name": "ADDRESS",
33
+ "url": "https://pincode.p.rapidapi.com/",
34
+ "description": "Search by location name. Please check the \"OVERVIEW\" Tab for the list of State IDs to use with this API.",
35
+ "method": "POST",
36
+ "required_parameters": [],
37
+ "optional_parameters": [],
38
+ "code": "import requests\n\nurl = \"https://pincode.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pincode.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
39
+ "convert_code": "import requests\n\nurl = \"https://pincode.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pincode.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
40
+ "test_endpoint": "",
41
+ "statuscode": 1,
42
+ "schema": ""
43
+ }
44
+ ]
45
+ }
toolbench/toolenv/tools/Location/pincode_distance_measurement.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Pincode Distance Measurement ",
3
+ "tool_description":"Pincode distance calculator API allows users to calculate the distance between two or more pin codes or zip codes. ",
4
+ "title":"Pincode Distance Measurement ",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/rahilkhan224/api/pincode-distance-measurement/",
8
+ "host":"pincode-distance-measurement.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Fetch Distance between two pincodes",
12
+ "url":"https://pincode-distance-measurement.p.rapidapi.com/pincode",
13
+ "description":"Enter two valid pincodes.",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"from",
18
+ "type":"STRING",
19
+ "description":"",
20
+ "default":"415612"
21
+ },
22
+ {
23
+ "name":"to",
24
+ "type":"STRING",
25
+ "description":"",
26
+ "default":"415639"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://pincode-distance-measurement.p.rapidapi.com/pincode\"\nquerystring = {\"from\": is_from, \"to\": to}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pincode-distance-measurement.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/Location/pincode_distance_measurement/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 fetch_distance_between_two_pincodes(is_from: str, to: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Enter two valid pincodes."
12
+
13
+ """
14
+ url = f"https://pincode-distance-measurement.p.rapidapi.com/pincode"
15
+ querystring = {'from': is_from, 'to': to, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "pincode-distance-measurement.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/Location/pincode_search.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"pincode search",
3
+ "tool_description":"This is a pincode search",
4
+ "title":"pincode search",
5
+ "pricing":"FREE",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/jayiguru123/api/pincode-search/",
8
+ "host":"pincode-search.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"postode",
12
+ "url":"https://pincode-search.p.rapidapi.com/chapter/add",
13
+ "description":"This is a postcode API",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"postcode",
18
+ "type":"STRING",
19
+ "description":"",
20
+ "default":"EC2A 3PT"
21
+ }
22
+ ],
23
+ "optional_parameters":[],
24
+ "code":"import requests\n\nurl = \"https://pincode-search.p.rapidapi.com/chapter/add\"\nquerystring = {\"postcode\": postcode}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pincode-search.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
25
+ "statuscode":111,
26
+ "body":"",
27
+ "headers":"",
28
+ "schema":""
29
+ }
30
+ ]
31
+ }
toolbench/toolenv/tools/Location/pincode_search/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 postode(postcode: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "This is a postcode API"
12
+
13
+ """
14
+ url = f"https://pincode-search.p.rapidapi.com/chapter/add"
15
+ querystring = {'postcode': postcode, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "pincode-search.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/Location/polish_postcode/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 postcode(postcode: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Add Postcode to URL. Format XXXXX or XX-XXX"
12
+
13
+ """
14
+ url = f"https://polish-postcode.p.rapidapi.com/{postcode}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "polish-postcode.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/Location/politicaldivitioncolombia.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"PoliticalDivitionColombia",
3
+ "tool_description":"It allows you to know the closest name of the city or department of Colombia",
4
+ "title":"PoliticalDivitionColombia",
5
+ "pricing":"FREE",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/macorreag/api/politicaldivitioncolombia/",
8
+ "host":"politicaldivitioncolombia.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Verificar Departamento",
12
+ "url":"https://politicaldivitioncolombia.p.rapidapi.com/AKfycbzSTiwLZNeD_XdQuY51NLr1hrxtLESIESYcFYdkMz2UBZ6r7gkG--ENC5OXNXf9rmGm/exec",
13
+ "description":"Permite obtener los departamentos de colombia",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"department",
18
+ "type":"STRING",
19
+ "description":"",
20
+ "default":"CUND"
21
+ }
22
+ ],
23
+ "optional_parameters":[],
24
+ "code":"import requests\n\nurl = \"https://politicaldivitioncolombia.p.rapidapi.com/AKfycbzSTiwLZNeD_XdQuY51NLr1hrxtLESIESYcFYdkMz2UBZ6r7gkG--ENC5OXNXf9rmGm/exec\"\nquerystring = {\"department\": department}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"politicaldivitioncolombia.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
25
+ "statuscode":200,
26
+ "body":{},
27
+ "headers":{},
28
+ "schema":{}
29
+ },
30
+ {
31
+ "name":"Verificar Departamento",
32
+ "url":"https://politicaldivitioncolombia.p.rapidapi.com/AKfycbzSTiwLZNeD_XdQuY51NLr1hrxtLESIESYcFYdkMz2UBZ6r7gkG--ENC5OXNXf9rmGm/exec",
33
+ "description":"Permite obtener los departamentos de colombia",
34
+ "method":"GET",
35
+ "required_parameters":[
36
+ {
37
+ "name":"department",
38
+ "type":"STRING",
39
+ "description":"",
40
+ "default":"CUND"
41
+ }
42
+ ],
43
+ "optional_parameters":[],
44
+ "code":"import requests\n\nurl = \"https://politicaldivitioncolombia.p.rapidapi.com/AKfycbzSTiwLZNeD_XdQuY51NLr1hrxtLESIESYcFYdkMz2UBZ6r7gkG--ENC5OXNXf9rmGm/exec\"\nquerystring = {\"department\": department}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"politicaldivitioncolombia.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
45
+ "statuscode":200,
46
+ "body":"text example!",
47
+ "headers":{},
48
+ "schema":{}
49
+ }
50
+ ]
51
+ }
toolbench/toolenv/tools/Location/politicaldivitioncolombia/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 verificar_departamento(department: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Permite obtener los departamentos de colombia"
12
+
13
+ """
14
+ url = f"https://politicaldivitioncolombia.p.rapidapi.com/akfycbzstiwlzned_xdquy51nlr1hrxtlesiesycfydkmz2ubz6r7gkg--enc5oxnxf9rmgm/exec"
15
+ querystring = {'department': department, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "politicaldivitioncolombia.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 verificar_departamento(department: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Permite obtener los departamentos de colombia"
33
+
34
+ """
35
+ url = f"https://politicaldivitioncolombia.p.rapidapi.com/akfycbzstiwlzned_xdquy51nlr1hrxtlesiesycfydkmz2ubz6r7gkg--enc5oxnxf9rmgm/exec"
36
+ querystring = {'department': department, }
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "politicaldivitioncolombia.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/Location/positionstack.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"positionstack",
3
+ "tool_description":"Accurate Forward & Reverse\nBatch Geocoding REST API\nFree geocoding for global places and coordinates\ntrusted by developers and businesses worldwide",
4
+ "title":"positionstack",
5
+ "pricing":"FREE",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":289,
9
+ "avgSuccessRate":0,
10
+ "popularityScore":0,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/apilayerapi-apilayerapi-default/api/positionstack/",
14
+ "host":"positionstack.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"get",
18
+ "url":"https://positionstack.p.rapidapi.com/api.positionstack.com/v1/forward",
19
+ "description":"example",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[],
23
+ "code":"import requests\n\nurl = \"https://positionstack.p.rapidapi.com/api.positionstack.com/v1/forward\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"positionstack.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/Location/positionstack/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 get(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "example"
12
+
13
+ """
14
+ url = f"https://positionstack.p.rapidapi.com/api.positionstack.com/v1/forward"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "positionstack.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/Location/precise_ip_location_and_other_data.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Precise IP Location and other data",
3
+ "tool_description":"Fastest 100% uptime API giving you Precise/Accurate location of IP address + Link to Google Maps. Info provided: Latitude , Longitude , GOOGLE MAPS LINK, City, Country, Region, Region name, Country Code, ISP, Timezone, ZIP code ",
4
+ "title":"Precise IP Location and other data",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/turazashvili/api/precise-ip-location-and-other-data/",
8
+ "host":"precise-ip-location-and-other-data.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Get Location and other data for IP address",
12
+ "url":"https://precise-ip-location-and-other-data.p.rapidapi.com/location",
13
+ "description":"This end point takes a 'GET' request with IP address as parameter and returns json file with data",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"ip",
18
+ "type":"STRING",
19
+ "description":"",
20
+ "default":"8.8.8.8"
21
+ }
22
+ ],
23
+ "optional_parameters":[],
24
+ "code":"import requests\n\nurl = \"https://precise-ip-location-and-other-data.p.rapidapi.com/location\"\nquerystring = {\"ip\": ip}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"precise-ip-location-and-other-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
25
+ "statuscode":111,
26
+ "body":"",
27
+ "headers":"",
28
+ "schema":""
29
+ }
30
+ ]
31
+ }
toolbench/toolenv/tools/Location/precise_ip_location_and_other_data/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 get_location_and_other_data_for_ip_address(ip: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "This end point takes a 'GET' request with IP address as parameter and returns json file with data"
12
+
13
+ """
14
+ url = f"https://precise-ip-location-and-other-data.p.rapidapi.com/location"
15
+ querystring = {'ip': ip, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "precise-ip-location-and-other-data.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/Location/pt_postcodes.json ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"PT Postcodes",
3
+ "tool_description":"Portuguese postcode lookup",
4
+ "title":"PT Postcodes",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":7,
9
+ "avgSuccessRate":100,
10
+ "popularityScore":8.5,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/johnny-dev-johnny-dev-default/api/pt-postcodes/",
14
+ "host":"pt-postcodes.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Get addresses by postcode",
18
+ "url":"https://pt-postcodes.p.rapidapi.com/pt/address/{cp4}/{cp3}",
19
+ "description":"Get the list of addresses/street by specifying the postcode",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"cp4",
24
+ "type":"STRING",
25
+ "description":"",
26
+ "default":"3750"
27
+ },
28
+ {
29
+ "name":"cp3",
30
+ "type":"STRING",
31
+ "description":"",
32
+ "default":"016"
33
+ }
34
+ ],
35
+ "optional_parameters":[],
36
+ "code":"import requests\n\nurl = \"https://pt-postcodes.p.rapidapi.com/pt/address/{cp4}/{cp3}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"pt-postcodes.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
+ "type":"array",
45
+ "items":{
46
+ "type":"object",
47
+ "properties":{
48
+ "artId":{
49
+ "type":"string"
50
+ },
51
+ "artLocal":{
52
+ "type":"string"
53
+ },
54
+ "artName":{
55
+ "type":"string"
56
+ },
57
+ "artTitle":{
58
+ "type":"string"
59
+ },
60
+ "artType":{
61
+ "type":"string"
62
+ },
63
+ "client":{
64
+ "type":"string"
65
+ },
66
+ "council":{
67
+ "type":"string"
68
+ },
69
+ "cp3":{
70
+ "type":"string"
71
+ },
72
+ "cp4":{
73
+ "type":"string"
74
+ },
75
+ "district":{
76
+ "type":"string"
77
+ },
78
+ "firstPrep":{
79
+ "type":"string"
80
+ },
81
+ "id":{
82
+ "type":"string"
83
+ },
84
+ "locality":{
85
+ "type":"string"
86
+ },
87
+ "number":{
88
+ "type":"string"
89
+ },
90
+ "postalName":{
91
+ "type":"string"
92
+ },
93
+ "secondPrep":{
94
+ "type":"string"
95
+ },
96
+ "trocoDescription":{
97
+ "type":"string"
98
+ }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ ]
104
+ }
toolbench/toolenv/tools/Location/pt_postcodes/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 get_addresses_by_postcode(cp4: str, cp3: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Get the list of addresses/street by specifying the postcode"
12
+
13
+ """
14
+ url = f"https://pt-postcodes.p.rapidapi.com/pt/address/{cp4}/{cp3}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "pt-postcodes.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/Location/public_toilets_uk.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "api_6f4d20ff-b369-4ee0-aded-9efbd64045e7",
3
+ "tool_description": "An API that displays information on all public toilets in the United Kingdom.",
4
+ "home_url": "https://rapidapi.com/95Kevid/api/public-toilets-uk/",
5
+ "name": "Public Toilets UK",
6
+ "title": "Public Toilets UK",
7
+ "pricing": "FREEMIUM",
8
+ "tool_name": "Public Toilets UK",
9
+ "score": null,
10
+ "host": "public-toilets-uk.p.rapidapi.com",
11
+ "api_list": [
12
+ {
13
+ "name": "Public Toilet GraphQL",
14
+ "url": "https://public-toilets-uk.p.rapidapi.com/",
15
+ "description": "The GraphQL endpoint to use for querying all data on public toilets in the UK. Examples of use could be entering coordinates of a location and a radius to get all public toilets within that search area. Public toilet information can include its coordinates, whether its free to use, has a changing table, has disabled access etc..",
16
+ "method": "POST",
17
+ "required_parameters": [],
18
+ "optional_parameters": [],
19
+ "code": "import requests\n\nurl = \"https://public-toilets-uk.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"public-toilets-uk.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
20
+ "convert_code": "import requests\n\nurl = \"https://public-toilets-uk.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"public-toilets-uk.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
21
+ "test_endpoint": "",
22
+ "statuscode": 200,
23
+ "schema": {}
24
+ }
25
+ ]
26
+ }
toolbench/toolenv/tools/Location/quick_geo_location.json ADDED
The diff for this file is too large to render. See raw diff
 
toolbench/toolenv/tools/Location/quick_geo_location/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 autocomplete(q: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "You may quickly discover all the information about any location by using the AutoComplete APIs. It returns an array containing coordinates, properties, location, and addresses."
12
+
13
+ """
14
+ url = f"https://quick-geo-location.p.rapidapi.com/search/autocomplete"
15
+ querystring = {'q': q, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "quick-geo-location.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/Location/railway_stations_india.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "5638ac3ee4b0beaa7de9222d",
3
+ "tool_description": "Search for a list of Indian Railway stations either through Station Name or Station Code.",
4
+ "home_url": "https://rapidapi.com/navii/api/railway-stations-india/",
5
+ "name": "Railway Stations - India",
6
+ "title": "Railway Stations - India",
7
+ "pricing": "FREE",
8
+ "tool_name": "Railway Stations - India",
9
+ "score": {
10
+ "avgServiceLevel": 100,
11
+ "avgLatency": 3893,
12
+ "avgSuccessRate": 65,
13
+ "popularityScore": 9.7,
14
+ "__typename": "Score"
15
+ },
16
+ "host": "rstations.p.rapidapi.com",
17
+ "api_list": [
18
+ {
19
+ "name": "SEARCH",
20
+ "url": "https://rstations.p.rapidapi.com/",
21
+ "description": "",
22
+ "method": "POST",
23
+ "required_parameters": [],
24
+ "optional_parameters": [],
25
+ "code": "import requests\n\nurl = \"https://rstations.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"rstations.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
26
+ "convert_code": "import requests\n\nurl = \"https://rstations.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"rstations.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
27
+ "test_endpoint": "",
28
+ "statuscode": 1,
29
+ "schema": ""
30
+ }
31
+ ]
32
+ }
toolbench/toolenv/tools/Location/real_estate.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"real estate",
3
+ "tool_description":"this is the backend api",
4
+ "title":"real estate",
5
+ "pricing":"FREE",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/estateagent-estateagent-default/api/real-estate14/",
8
+ "host":"real-estate14.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Get all users",
12
+ "url":"https://real-estate14.p.rapidapi.com/user/getAll",
13
+ "description":"This endpoint gets all registered users of the app.",
14
+ "method":"GET",
15
+ "required_parameters":[],
16
+ "optional_parameters":[],
17
+ "code":"import requests\n\nurl = \"https://real-estate14.p.rapidapi.com/user/getAll\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"real-estate14.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
+ }
toolbench/toolenv/tools/Location/real_estate/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 get_all_users(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "This endpoint gets all registered users of the app."
12
+
13
+ """
14
+ url = f"https://real-estate14.p.rapidapi.com/user/getall"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "real-estate14.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/Location/real_estate_value.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "api_f27de810-9f49-4819-a366-44eb9d1ed78e",
3
+ "tool_description": "Site economics - average residential buy and rent price of a location",
4
+ "home_url": "https://rapidapi.com/geoiq-india-geoiq-india-default/api/real-estate-value/",
5
+ "name": "Real estate value",
6
+ "title": "Real estate value",
7
+ "pricing": "FREEMIUM",
8
+ "tool_name": "Real estate value",
9
+ "score": null,
10
+ "host": "real-estate-value.p.rapidapi.com",
11
+ "api_list": [
12
+ {
13
+ "name": "/get_residential_buy_rent_rates",
14
+ "url": "https://real-estate-value.p.rapidapi.com/get_residential_buy_rent_rates",
15
+ "description": "The rent and buy rates for residential properties is predicted as an average of the rates within an area about the central point of the given location. Location can be given as lat + lng, geohash, h3 index or an address. Rate is returned in Rupees per square foot.",
16
+ "method": "POST",
17
+ "required_parameters": [],
18
+ "optional_parameters": [],
19
+ "code": "import requests\n\nurl = \"https://real-estate-value.p.rapidapi.com/get_residential_buy_rent_rates\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"real-estate-value.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
20
+ "convert_code": "import requests\n\nurl = \"https://real-estate-value.p.rapidapi.com/get_residential_buy_rent_rates\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"real-estate-value.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
21
+ "test_endpoint": "",
22
+ "statuscode": 1,
23
+ "schema": ""
24
+ }
25
+ ]
26
+ }
toolbench/toolenv/tools/Location/redline_zipcode.json ADDED
@@ -0,0 +1,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name": "RedLine Zipcode",
3
+ "tool_description": "The Zip Code API provides the following functions: Distance Between Zip Code API - The API allows you to quickly and easily figure out the distance between zip codes.Zip Codes in Radius API - You can use this API to find all zip codes within a given radius from another zip code.Zip Code to City and State API and Zip Code to Latitude/Longitude API - The API can convert a zip code to the primary location for the zip code. This includes the city, state, latitude, and longitude for the primary lo...",
4
+ "title": "RedLine Zipcode",
5
+ "pricing": "FREEMIUM",
6
+ "score": {
7
+ "avgServiceLevel": 100,
8
+ "avgLatency": 98,
9
+ "avgSuccessRate": 95,
10
+ "popularityScore": 9.9,
11
+ "__typename": "Score"
12
+ },
13
+ "home_url": "https://rapidapi.com/redline/api/redline-zipcode/",
14
+ "host": "redline-redline-zipcode.p.rapidapi.com",
15
+ "api_list": [
16
+ {
17
+ "name": "Multiple Zip Codes to Location Information",
18
+ "url": "https://redline-redline-zipcode.p.rapidapi.com/rest/multi-info.json/{zipcodes}/{units}",
19
+ "description": "Returns location information for multiple zip codes (up to 100). This information includes city, state, latitude, longitude, and time zone information. It also contains a list of other acceptable city names for the locations. **Each zip code provided will count as a separate request.** For example, if you send 5 zip codes, you will be charged for 5 requests.",
20
+ "method": "GET",
21
+ "required_parameters": [
22
+ {
23
+ "name": "zipcodes",
24
+ "type": "STRING",
25
+ "description": "Zip Codes (Comma separated) - 100 Max",
26
+ "default": "08057,08055"
27
+ },
28
+ {
29
+ "name": "units",
30
+ "type": "STRING",
31
+ "description": "Units: degrees or radians",
32
+ "default": "degrees"
33
+ }
34
+ ],
35
+ "optional_parameters": [],
36
+ "code": "import requests\n\nurl = \"https://redline-redline-zipcode.p.rapidapi.com/rest/multi-info.json/{zipcodes}/{units}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"redline-redline-zipcode.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
37
+ "statuscode": 200,
38
+ "body": {
39
+ "08057": {
40
+ "zip_code": "08057",
41
+ "lat": 39.979676,
42
+ "lng": -74.941163,
43
+ "city": "Moorestown",
44
+ "state": "NJ",
45
+ "timezone": {
46
+ "timezone_identifier": "America/New_York",
47
+ "timezone_abbr": "EDT",
48
+ "utc_offset_sec": -14400,
49
+ "is_dst": "T"
50
+ },
51
+ "acceptable_city_names": [
52
+ {
53
+ "city": "Lenola",
54
+ "state": "NJ"
55
+ }
56
+ ]
57
+ },
58
+ "08055": {
59
+ "zip_code": "08055",
60
+ "lat": 39.862678,
61
+ "lng": -74.822557,
62
+ "city": "Medford",
63
+ "state": "NJ",
64
+ "timezone": {
65
+ "timezone_identifier": "America/New_York",
66
+ "timezone_abbr": "EDT",
67
+ "utc_offset_sec": -14400,
68
+ "is_dst": "T"
69
+ },
70
+ "acceptable_city_names": [
71
+ {
72
+ "city": "Medford Lakes",
73
+ "state": "NJ"
74
+ },
75
+ {
76
+ "city": "Medford Lakes Boro",
77
+ "state": "NJ"
78
+ },
79
+ {
80
+ "city": "Medford Township",
81
+ "state": "NJ"
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ "headers": {},
87
+ "schema": {
88
+ "type": "object",
89
+ "properties": {
90
+ "08057": {
91
+ "type": "object",
92
+ "properties": {
93
+ "zip_code": {
94
+ "type": "string"
95
+ },
96
+ "lat": {
97
+ "type": "number"
98
+ },
99
+ "lng": {
100
+ "type": "number"
101
+ },
102
+ "city": {
103
+ "type": "string"
104
+ },
105
+ "state": {
106
+ "type": "string"
107
+ },
108
+ "timezone": {
109
+ "type": "object",
110
+ "properties": {
111
+ "timezone_identifier": {
112
+ "type": "string"
113
+ },
114
+ "timezone_abbr": {
115
+ "type": "string"
116
+ },
117
+ "utc_offset_sec": {
118
+ "type": "integer"
119
+ },
120
+ "is_dst": {
121
+ "type": "string"
122
+ }
123
+ }
124
+ },
125
+ "acceptable_city_names": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "object",
129
+ "properties": {
130
+ "city": {
131
+ "type": "string"
132
+ },
133
+ "state": {
134
+ "type": "string"
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ },
141
+ "08055": {
142
+ "type": "object",
143
+ "properties": {
144
+ "zip_code": {
145
+ "type": "string"
146
+ },
147
+ "lat": {
148
+ "type": "number"
149
+ },
150
+ "lng": {
151
+ "type": "number"
152
+ },
153
+ "city": {
154
+ "type": "string"
155
+ },
156
+ "state": {
157
+ "type": "string"
158
+ },
159
+ "timezone": {
160
+ "type": "object",
161
+ "properties": {
162
+ "timezone_identifier": {
163
+ "type": "string"
164
+ },
165
+ "timezone_abbr": {
166
+ "type": "string"
167
+ },
168
+ "utc_offset_sec": {
169
+ "type": "integer"
170
+ },
171
+ "is_dst": {
172
+ "type": "string"
173
+ }
174
+ }
175
+ },
176
+ "acceptable_city_names": {
177
+ "type": "array",
178
+ "items": {
179
+ "type": "object",
180
+ "properties": {
181
+ "city": {
182
+ "type": "string"
183
+ },
184
+ "state": {
185
+ "type": "string"
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+ },
195
+ {
196
+ "name": "State to Zip Codes",
197
+ "url": "https://redline-redline-zipcode.p.rapidapi.com/rest/state-zips.json/{state}",
198
+ "description": "Get all zip codes for a state. **Each 10 zip codes returned are charged as separate request.** For example, if the state you select returns 200 zip codes, you will be charged for 20 requests.",
199
+ "method": "GET",
200
+ "required_parameters": [
201
+ {
202
+ "name": "state",
203
+ "type": "STRING",
204
+ "description": "State Abbreviation (e.g. RI)",
205
+ "default": "RI"
206
+ }
207
+ ],
208
+ "optional_parameters": [],
209
+ "code": "import requests\n\nurl = \"https://redline-redline-zipcode.p.rapidapi.com/rest/state-zips.json/{state}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"redline-redline-zipcode.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
210
+ "statuscode": 200,
211
+ "body": {
212
+ "zip_codes": [
213
+ "12345",
214
+ "54321",
215
+ "67890",
216
+ "09876"
217
+ ]
218
+ },
219
+ "headers": {},
220
+ "schema": {
221
+ "type": "object",
222
+ "properties": {
223
+ "zip_codes": {
224
+ "type": "array",
225
+ "items": {
226
+ "type": "string"
227
+ }
228
+ }
229
+ }
230
+ }
231
+ },
232
+ {
233
+ "name": "Multiple Zip Codes by Radius",
234
+ "url": "https://redline-redline-zipcode.p.rapidapi.com/rest/multi-radius.json/10/mile",
235
+ "description": "Use this API to find all zip codes within a given radius of multiple zip codes. Each line is charged as a separate request.",
236
+ "method": "POST",
237
+ "required_parameters": [
238
+ {
239
+ "name": "distance",
240
+ "type": "NUMBER",
241
+ "description": "Radius (in appropriate units)",
242
+ "default": "10"
243
+ },
244
+ {
245
+ "name": "units",
246
+ "type": "STRING",
247
+ "description": "Distance units: mile or km",
248
+ "default": "mile"
249
+ }
250
+ ],
251
+ "optional_parameters": [
252
+ {
253
+ "name": "zip_codes",
254
+ "type": "STRING",
255
+ "description": "Zip codes (one per line; max 100). You may only send one of zip_codes or addrs.",
256
+ "default": ""
257
+ },
258
+ {
259
+ "name": "addrs",
260
+ "type": "STRING",
261
+ "description": "Addresses (one per line; max 100). E.g. \"123 Main St. Moorestown NJ 08057\". Each line is charged as a separate request.",
262
+ "default": ""
263
+ }
264
+ ],
265
+ "code": "import requests\n\nurl = \"https://redline-redline-zipcode.p.rapidapi.com/rest/multi-radius.json/10/mile\"\nquerystring = {\"zip_codes\": \"\", \"addrs\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"redline-redline-zipcode.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
266
+ "convert_code": "import requests\n\nurl = \"https://redline-redline-zipcode.p.rapidapi.com/rest/multi-radius.json/{distance}/{units}\"\nquerystring = {\"zip_codes\": \"\", \"addrs\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"redline-redline-zipcode.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
267
+ "test_endpoint": "",
268
+ "statuscode": 1,
269
+ "schema": ""
270
+ }
271
+ ]
272
+ }
toolbench/toolenv/tools/Location/redline_zipcode/api.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 multiple_zip_codes_to_location_information(zipcodes: str, units: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Returns location information for multiple zip codes (up to 100). This information includes city, state, latitude, longitude, and time zone information. It also contains a list of other acceptable city names for the locations. **Each zip code provided will count as a separate request.** For example, if you send 5 zip codes, you will be charged for 5 requests."
12
+ zipcodes: Zip Codes (Comma separated) - 100 Max
13
+ units: Units: degrees or radians
14
+
15
+ """
16
+ url = f"https://redline-redline-zipcode.p.rapidapi.com/rest/multi-info.json/{zipcodes}/{units}"
17
+ querystring = {}
18
+
19
+ headers = {
20
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
21
+ "X-RapidAPI-Host": "redline-redline-zipcode.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
+
32
+ def state_to_zip_codes(state: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
33
+ """
34
+ "Get all zip codes for a state. **Each 10 zip codes returned are charged as separate request.** For example, if the state you select returns 200 zip codes, you will be charged for 20 requests."
35
+ state: State Abbreviation (e.g. RI)
36
+
37
+ """
38
+ url = f"https://redline-redline-zipcode.p.rapidapi.com/rest/state-zips.json/{state}"
39
+ querystring = {}
40
+
41
+ headers = {
42
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
43
+ "X-RapidAPI-Host": "redline-redline-zipcode.p.rapidapi.com"
44
+ }
45
+
46
+
47
+ response = requests.get(url, headers=headers, params=querystring)
48
+ try:
49
+ observation = response.json()
50
+ except:
51
+ observation = response.text
52
+ return observation
53
+
toolbench/toolenv/tools/Location/referential.json ADDED
@@ -0,0 +1,1091 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Referential",
3
+ "tool_description":"The fastest API to access countries, states, cities, continents, dial and zip codes in up to 20 languages. A collection of data APIs to support forms, signups, search and lookup. Our endpoints are optimized for speed and size. Our data is regularly maintained and comes from International Standardization bodies, the United Nations, government surveys and GIS datasets. We do not scrape WikiPedia etc",
4
+ "title":"Referential",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":41,
9
+ "avgSuccessRate":99,
10
+ "popularityScore":9.9,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/referential/api/referential/",
14
+ "host":"referential.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"City by IP address (Geo IP)",
18
+ "url":"https://referential.p.rapidapi.com/v1/city",
19
+ "description":"Find a city, state, country and continent by IP address. For some results, the closest result within 10 miles will be provided.",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"ip",
24
+ "type":"STRING",
25
+ "description":"ip4 pr ip6 formatted IP address",
26
+ "default":"128.218.229.26"
27
+ }
28
+ ],
29
+ "optional_parameters":[
30
+ {
31
+ "name":"fields",
32
+ "type":"STRING",
33
+ "description":"Select fields to return in result [geonameid, timezone,state_code,iso_a2]",
34
+ "default":""
35
+ }
36
+ ],
37
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/city\"\nquerystring = {\"ip\": ip}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
38
+ "statuscode":200,
39
+ "body":{
40
+ "value":"São Paulo",
41
+ "key":"SAO PAULO|BR-SP"
42
+ },
43
+ "headers":{
44
+ "alt-svc":"clear",
45
+ "content-encoding":"UTF-8",
46
+ "content-language":"en",
47
+ "content-type":"application/json",
48
+ "date":"Fri, 08 May 2020 16:49:40 GMT",
49
+ "server":"RapidAPI-1.1.6",
50
+ "via":"1.1 google",
51
+ "x-rapidapi-region":"AWS - us-west-2",
52
+ "x-rapidapi-version":"1.1.6",
53
+ "content-length":"48",
54
+ "connection":"Close"
55
+ },
56
+ "schema":{
57
+ "items":{
58
+ "properties":{
59
+ "key":{
60
+ "type":"string"
61
+ },
62
+ "value":{
63
+ "type":"string"
64
+ }
65
+ },
66
+ "type":"object"
67
+ },
68
+ "type":"array"
69
+ }
70
+ },
71
+ {
72
+ "name":"Countries",
73
+ "url":"https://referential.p.rapidapi.com/v1/country",
74
+ "description":"List or search countries of the world in different languages.. Get iso a2, a3 country code and localized country name",
75
+ "method":"GET",
76
+ "required_parameters":[],
77
+ "optional_parameters":[
78
+ {
79
+ "name":"currency",
80
+ "type":"STRING",
81
+ "description":"Filter on currency name in chosen lang",
82
+ "default":""
83
+ },
84
+ {
85
+ "name":"dial_code",
86
+ "type":"NUMBER",
87
+ "description":"Filter on country dial code",
88
+ "default":""
89
+ },
90
+ {
91
+ "name":"currency_code",
92
+ "type":"STRING",
93
+ "description":"Filter on 3 letter currency code (ISO)",
94
+ "default":""
95
+ },
96
+ {
97
+ "name":"fields",
98
+ "type":"STRING",
99
+ "description":"Select fields to return for each country [iso_a2, iso_a3, continent_code, dial_code, currency_code, currency_num_code, currency]",
100
+ "default":"currency,currency_num_code,currency_code,continent_code,currency,iso_a3,dial_code"
101
+ },
102
+ {
103
+ "name":"iso_a2",
104
+ "type":"STRING",
105
+ "description":"Filter on 2 letter iso country code",
106
+ "default":""
107
+ },
108
+ {
109
+ "name":"name",
110
+ "type":"STRING",
111
+ "description":"Country name search string. Can be partial contains...",
112
+ "default":""
113
+ },
114
+ {
115
+ "name":"limit",
116
+ "type":"NUMBER",
117
+ "description":"",
118
+ "default":"250"
119
+ },
120
+ {
121
+ "name":"continent_code",
122
+ "type":"STRING",
123
+ "description":"Two letter region/continent code (eu, na, sa, as, af, oc, an). Lookup at /v1/continent.",
124
+ "default":""
125
+ },
126
+ {
127
+ "name":"iso_a3",
128
+ "type":"STRING",
129
+ "description":"Filter on 3 letter iso country code",
130
+ "default":""
131
+ },
132
+ {
133
+ "name":"currency_num_code",
134
+ "type":"STRING",
135
+ "description":"Filter on 3 digit numeric currency code (ISO)",
136
+ "default":""
137
+ },
138
+ {
139
+ "name":"lang",
140
+ "type":"STRING",
141
+ "description":"Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en",
142
+ "default":""
143
+ }
144
+ ],
145
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/country\"\nquerystring = {\"fields\": fields, \"limit\": limit}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
146
+ "statuscode":200,
147
+ "body":{
148
+ "continent_code":"AF",
149
+ "iso_a3":"Eri",
150
+ "value":"Eritrea",
151
+ "currency_code":"ERN",
152
+ "key":"ER",
153
+ "currency_num_code":"232"
154
+ },
155
+ "headers":{
156
+ "alt-svc":"clear",
157
+ "cache-control":"max-age=604800, s-maxage=604800, public",
158
+ "content-encoding":"UTF-8",
159
+ "content-language":"en",
160
+ "content-type":"application/json",
161
+ "date":"Fri, 21 Feb 2020 20:03:13 GMT",
162
+ "server":"RapidAPI-1.0.39",
163
+ "via":"1.1 google",
164
+ "x-rapidapi-region":"AWS - us-west-2",
165
+ "x-rapidapi-version":"1.0.39",
166
+ "content-length":"24394",
167
+ "connection":"Close"
168
+ },
169
+ "schema":{
170
+ "type":"array",
171
+ "items":{
172
+ "type":"object"
173
+ }
174
+ }
175
+ },
176
+ {
177
+ "name":"Cities",
178
+ "url":"https://referential.p.rapidapi.com/v1/city",
179
+ "description":"List and search over 75,000 world cities in 20 languages.",
180
+ "method":"GET",
181
+ "required_parameters":[],
182
+ "optional_parameters":[
183
+ {
184
+ "name":"limit",
185
+ "type":"NUMBER",
186
+ "description":"Limit results to N results",
187
+ "default":"250"
188
+ },
189
+ {
190
+ "name":"state_hasc",
191
+ "type":"STRING",
192
+ "description":"Filter on state's HASC code. List at /v1/state.",
193
+ "default":""
194
+ },
195
+ {
196
+ "name":"timezone",
197
+ "type":"STRING",
198
+ "description":"Filter on timezone name. List at /v1/timezone.",
199
+ "default":""
200
+ },
201
+ {
202
+ "name":"geonameid",
203
+ "type":"STRING",
204
+ "description":"Filter on geonameid",
205
+ "default":""
206
+ },
207
+ {
208
+ "name":"prefix",
209
+ "type":"STRING",
210
+ "description":"Search by names starting with prefix. See also limit, order and sort fields.",
211
+ "default":"san fr"
212
+ },
213
+ {
214
+ "name":"timezone_offset",
215
+ "type":"NUMBER",
216
+ "description":"Filter on timezone offset in hours",
217
+ "default":""
218
+ },
219
+ {
220
+ "name":"sort",
221
+ "type":"STRING",
222
+ "description":"Sort on field [population, state_code, name, timezone, state_hasc, iso_a2]. Please see limit and order fields.",
223
+ "default":""
224
+ },
225
+ {
226
+ "name":"lang",
227
+ "type":"STRING",
228
+ "description":"Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en",
229
+ "default":"en"
230
+ },
231
+ {
232
+ "name":"iso_a2",
233
+ "type":"STRING",
234
+ "description":"Filter on 2 letter country code",
235
+ "default":"us"
236
+ },
237
+ {
238
+ "name":"name",
239
+ "type":"STRING",
240
+ "description":"Search as \\\"contains\\\" on city name in chosen lang",
241
+ "default":""
242
+ },
243
+ {
244
+ "name":"state_code",
245
+ "type":"STRING",
246
+ "description":"Filter on state's ISO-3166-2 letter code. List at /v1/state",
247
+ "default":"US-CA"
248
+ },
249
+ {
250
+ "name":"fields",
251
+ "type":"STRING",
252
+ "description":"Select fields to return in result [iso_a2,state_code,timezone,timezone_offset,state_hasc,geonameid]",
253
+ "default":"iso_a2,state_code,state_hasc,timezone,timezone_offset"
254
+ },
255
+ {
256
+ "name":"order",
257
+ "type":"STRING",
258
+ "description":"Sort order [asc | desc]",
259
+ "default":""
260
+ }
261
+ ],
262
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/city\"\nquerystring = {\"limit\": limit, \"prefix\": prefix, \"lang\": lang, \"iso_a2\": iso_a2, \"state_code\": state_code, \"fields\": fields}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
263
+ "statuscode":200,
264
+ "body":{
265
+ "timezone":"America/Los_Angeles",
266
+ "timezone_offset":"-28800000",
267
+ "state_code":"US-WA",
268
+ "value":"Tacoma",
269
+ "iso_a2":"US",
270
+ "state_hasc":"US.WA",
271
+ "key":"TACOMA|US-WA"
272
+ },
273
+ "headers":{
274
+ "age":"91",
275
+ "alt-svc":"clear",
276
+ "cache-control":"max-age=604800, s-maxage=604800, public",
277
+ "content-encoding":"UTF-8",
278
+ "content-language":"en",
279
+ "content-type":"application/json",
280
+ "date":"Fri, 21 Feb 2020 20:43:45 GMT",
281
+ "server":"RapidAPI-1.0.39",
282
+ "via":"1.1 google",
283
+ "x-rapidapi-region":"AWS - us-west-2",
284
+ "x-rapidapi-version":"1.0.39",
285
+ "transfer-encoding":"chunked",
286
+ "connection":"Close"
287
+ },
288
+ "schema":{
289
+ "items":{
290
+ "properties":{
291
+ "iso_a2":{
292
+ "type":"string"
293
+ },
294
+ "key":{
295
+ "type":"string"
296
+ },
297
+ "state_code":{
298
+ "type":"string"
299
+ },
300
+ "state_hasc":{
301
+ "type":"string"
302
+ },
303
+ "timezone":{
304
+ "type":"string"
305
+ },
306
+ "timezone_offset":{
307
+ "type":"string"
308
+ },
309
+ "value":{
310
+ "type":"string"
311
+ }
312
+ },
313
+ "type":"object"
314
+ },
315
+ "type":"array"
316
+ }
317
+ },
318
+ {
319
+ "name":"State",
320
+ "url":"https://referential.p.rapidapi.com/v1/state",
321
+ "description":"List the sub-regions/states/provinces/departments of the world's countries",
322
+ "method":"GET",
323
+ "required_parameters":[],
324
+ "optional_parameters":[
325
+ {
326
+ "name":"limit",
327
+ "type":"NUMBER",
328
+ "description":"",
329
+ "default":"250"
330
+ },
331
+ {
332
+ "name":"iso_a2",
333
+ "type":"STRING",
334
+ "description":"Filter on 2 letter country code",
335
+ "default":"us"
336
+ },
337
+ {
338
+ "name":"iso_3166_2",
339
+ "type":"STRING",
340
+ "description":"Filter on Subregion's ISO-3166-2 letter code",
341
+ "default":""
342
+ },
343
+ {
344
+ "name":"fields",
345
+ "type":"STRING",
346
+ "description":"Select fields to select in the result [iso_a2]",
347
+ "default":"iso_a2"
348
+ },
349
+ {
350
+ "name":"name",
351
+ "type":"STRING",
352
+ "description":"Filter as \\\"contains\\\" on the states's name in chosen lang",
353
+ "default":"tex"
354
+ },
355
+ {
356
+ "name":"lang",
357
+ "type":"STRING",
358
+ "description":"Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en",
359
+ "default":"en"
360
+ }
361
+ ],
362
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/state\"\nquerystring = {\"limit\": limit, \"iso_a2\": iso_a2, \"fields\": fields, \"name\": name, \"lang\": lang}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
363
+ "statuscode":200,
364
+ "body":{
365
+ "value":"Entre Ríos Province",
366
+ "iso_a2":"Ar",
367
+ "key":"AR-E"
368
+ },
369
+ "headers":{
370
+ "alt-svc":"clear",
371
+ "cache-control":"max-age=604800, s-maxage=604800, public",
372
+ "content-encoding":"UTF-8",
373
+ "content-language":"en",
374
+ "content-type":"application/json",
375
+ "date":"Fri, 21 Feb 2020 20:30:11 GMT",
376
+ "server":"RapidAPI-1.0.39",
377
+ "via":"1.1 google",
378
+ "x-rapidapi-region":"AWS - us-west-2",
379
+ "x-rapidapi-version":"1.0.39",
380
+ "transfer-encoding":"chunked",
381
+ "connection":"Close"
382
+ },
383
+ "schema":{
384
+ "items":{
385
+ "properties":{
386
+ "iso_a2":{
387
+ "type":"string"
388
+ },
389
+ "key":{
390
+ "type":"string"
391
+ },
392
+ "value":{
393
+ "type":"string"
394
+ }
395
+ },
396
+ "type":"object"
397
+ },
398
+ "type":"array"
399
+ }
400
+ },
401
+ {
402
+ "name":"Timezones",
403
+ "url":"https://referential.p.rapidapi.com/v1/timezone",
404
+ "description":"List the world's time zones in 20 languages",
405
+ "method":"GET",
406
+ "required_parameters":[],
407
+ "optional_parameters":[
408
+ {
409
+ "name":"offset",
410
+ "type":"STRING",
411
+ "description":"Filter on non daylights savings offset in hours",
412
+ "default":""
413
+ },
414
+ {
415
+ "name":"name",
416
+ "type":"STRING",
417
+ "description":"Filter as \"contains\" on timezone name in chosen lang",
418
+ "default":""
419
+ },
420
+ {
421
+ "name":"code",
422
+ "type":"STRING",
423
+ "description":"Filter on 3 letter non daylight savings timezone code (not unique)",
424
+ "default":""
425
+ },
426
+ {
427
+ "name":"timezone",
428
+ "type":"STRING",
429
+ "description":"Filter on timezone name in english",
430
+ "default":""
431
+ },
432
+ {
433
+ "name":"daylights_offset",
434
+ "type":"STRING",
435
+ "description":"Filter on daylights savings offset in hours",
436
+ "default":""
437
+ },
438
+ {
439
+ "name":"lang",
440
+ "type":"STRING",
441
+ "description":"Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en",
442
+ "default":"de"
443
+ },
444
+ {
445
+ "name":"daylights_code",
446
+ "type":"STRING",
447
+ "description":"Filter on daylights savings letter code (not unique)",
448
+ "default":""
449
+ },
450
+ {
451
+ "name":"fields",
452
+ "type":"STRING",
453
+ "description":"Select fields to return in result [code,timezone,daylights_code,daylights_offset,daylights,hours_offset,offset]",
454
+ "default":"offset,daylights_offset,daylights,daylights_code,timezone"
455
+ },
456
+ {
457
+ "name":"daylights",
458
+ "type":"STRING",
459
+ "description":"Filter on daylights savings/non daylight savings timezones (true,false)",
460
+ "default":""
461
+ }
462
+ ],
463
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/timezone\"\nquerystring = {\"lang\": lang, \"fields\": fields}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
464
+ "statuscode":200,
465
+ "body":{
466
+ "offset":"0",
467
+ "timezone":"Africa/Abidjan",
468
+ "daylights_offset":"0",
469
+ "daylights":"false",
470
+ "value":"Mittlere Greenwich-Zeit",
471
+ "key":"Africa/Abidjan"
472
+ },
473
+ "headers":{
474
+ "alt-svc":"clear",
475
+ "cache-control":"max-age=604800, s-maxage=604800, public",
476
+ "content-encoding":"UTF-8",
477
+ "content-language":"de",
478
+ "content-type":"application/json",
479
+ "date":"Fri, 21 Feb 2020 21:09:21 GMT",
480
+ "server":"RapidAPI-1.0.39",
481
+ "via":"1.1 google",
482
+ "x-rapidapi-region":"AWS - us-west-2",
483
+ "x-rapidapi-version":"1.0.39",
484
+ "transfer-encoding":"chunked",
485
+ "connection":"Close"
486
+ },
487
+ "schema":{
488
+ "items":{
489
+ "properties":{
490
+ "daylights":{
491
+ "type":"string"
492
+ },
493
+ "daylights_offset":{
494
+ "type":"string"
495
+ },
496
+ "key":{
497
+ "type":"string"
498
+ },
499
+ "offset":{
500
+ "type":"string"
501
+ },
502
+ "timezone":{
503
+ "type":"string"
504
+ },
505
+ "value":{
506
+ "type":"string"
507
+ }
508
+ },
509
+ "type":"object"
510
+ },
511
+ "type":"array"
512
+ }
513
+ },
514
+ {
515
+ "name":"City by id",
516
+ "url":"https://referential.p.rapidapi.com/v1/city/{id}",
517
+ "description":"Direct lookup of over 75,000 cities by id. See the v1/city API to search for city ids.",
518
+ "method":"GET",
519
+ "required_parameters":[
520
+ {
521
+ "name":"id",
522
+ "type":"string",
523
+ "description":"Lookup at /v1/city.",
524
+ "default":"DULUTH|US-GA"
525
+ }
526
+ ],
527
+ "optional_parameters":[
528
+ {
529
+ "name":"lang",
530
+ "type":"STRING",
531
+ "description":"Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en",
532
+ "default":"en"
533
+ },
534
+ {
535
+ "name":"fields",
536
+ "type":"STRING",
537
+ "description":"Select fields to return in result [iso_a2,state_code,timezone,timezone_offset,state_hasc]",
538
+ "default":"iso_a2,state_code,state_hasc,timezone, timezone_offset"
539
+ }
540
+ ],
541
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/city/{id}\"\nquerystring = {\"lang\": lang, \"fields\": fields}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
542
+ "statuscode":200,
543
+ "body":{
544
+ "timezone":"America/New_York",
545
+ "timezone_offset":"-18000000",
546
+ "state_code":"US-GA",
547
+ "value":"Duluth",
548
+ "iso_a2":"US",
549
+ "state_hasc":"US.GA",
550
+ "key":"DULUTH|US-GA"
551
+ },
552
+ "headers":{
553
+ "age":"19",
554
+ "alt-svc":"clear",
555
+ "cache-control":"max-age=604800, s-maxage=604800, public",
556
+ "content-encoding":"UTF-8",
557
+ "content-language":"en",
558
+ "content-type":"application/json",
559
+ "date":"Fri, 21 Feb 2020 20:49:46 GMT",
560
+ "server":"RapidAPI-1.0.39",
561
+ "via":"1.1 google",
562
+ "x-rapidapi-region":"AWS - us-west-2",
563
+ "x-rapidapi-version":"1.0.39",
564
+ "content-length":"155",
565
+ "connection":"Close"
566
+ },
567
+ "schema":{
568
+ "type":"object",
569
+ "properties":{
570
+ "get":{
571
+ "type":"string"
572
+ },
573
+ "parameters":{
574
+ "type":"array"
575
+ },
576
+ "errors":{
577
+ "type":"array"
578
+ },
579
+ "results":{
580
+ "type":"integer"
581
+ },
582
+ "response":{
583
+ "type":"array",
584
+ "items":{
585
+ "type":"object"
586
+ }
587
+ }
588
+ }
589
+ }
590
+ },
591
+ {
592
+ "name":"Country by iso code",
593
+ "url":"https://referential.p.rapidapi.com/v1/country/{iso_code}",
594
+ "description":"Get country by 2 letter iso code localized to a given language",
595
+ "method":"GET",
596
+ "required_parameters":[
597
+ {
598
+ "name":"iso_code",
599
+ "type":"string",
600
+ "description":"2 letter iso country code. ",
601
+ "default":"US"
602
+ }
603
+ ],
604
+ "optional_parameters":[
605
+ {
606
+ "name":"fields",
607
+ "type":"STRING",
608
+ "description":"Comma deliminated list of fields to return in response",
609
+ "default":""
610
+ },
611
+ {
612
+ "name":"lang",
613
+ "type":"STRING",
614
+ "description":"2 letter iso language code to localize country name",
615
+ "default":"en"
616
+ }
617
+ ],
618
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/country/{iso_code}\"\nquerystring = {\"lang\": lang}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
619
+ "statuscode":200,
620
+ "body":{
621
+ "value":"United States Of America",
622
+ "key":"US"
623
+ },
624
+ "headers":{
625
+ "alt-svc":"clear",
626
+ "cache-control":"max-age=604800, s-maxage=604800, public",
627
+ "content-encoding":"UTF-8",
628
+ "content-language":"en",
629
+ "content-type":"application/json",
630
+ "date":"Fri, 21 Feb 2020 08:25:52 GMT",
631
+ "server":"RapidAPI-1.0.39",
632
+ "via":"1.1 google",
633
+ "x-rapidapi-region":"AWS - us-west-2",
634
+ "x-rapidapi-version":"1.0.39",
635
+ "content-length":"47",
636
+ "connection":"Close"
637
+ },
638
+ "schema":{
639
+ "type":"object",
640
+ "properties":{
641
+ "get":{
642
+ "type":"string"
643
+ },
644
+ "parameters":{
645
+ "type":"array"
646
+ },
647
+ "errors":{
648
+ "type":"array"
649
+ },
650
+ "results":{
651
+ "type":"integer"
652
+ },
653
+ "response":{
654
+ "type":"array",
655
+ "items":{
656
+ "type":"object"
657
+ }
658
+ }
659
+ }
660
+ }
661
+ },
662
+ {
663
+ "name":"State by id",
664
+ "url":"https://referential.p.rapidapi.com/v1/state/{code}",
665
+ "description":"Lookup sub-regions/states/provinces/departments by iso 3166-2 code",
666
+ "method":"GET",
667
+ "required_parameters":[
668
+ {
669
+ "name":"code",
670
+ "type":"string",
671
+ "description":"ISO 3166-2 state/province/deparm",
672
+ "default":"US-MN"
673
+ }
674
+ ],
675
+ "optional_parameters":[
676
+ {
677
+ "name":"fields",
678
+ "type":"STRING",
679
+ "description":"Select fields to return in result [iso_a2]",
680
+ "default":""
681
+ },
682
+ {
683
+ "name":"lang",
684
+ "type":"STRING",
685
+ "description":"Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en",
686
+ "default":""
687
+ }
688
+ ],
689
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/state/{code}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
690
+ "statuscode":200,
691
+ "body":{
692
+ "value":"Minnesota",
693
+ "key":"US-MN"
694
+ },
695
+ "headers":{
696
+ "alt-svc":"clear",
697
+ "cache-control":"max-age=604800, s-maxage=604800, public",
698
+ "content-encoding":"UTF-8",
699
+ "content-language":"en",
700
+ "content-type":"application/json",
701
+ "date":"Fri, 21 Feb 2020 20:34:33 GMT",
702
+ "server":"RapidAPI-1.0.39",
703
+ "via":"1.1 google",
704
+ "x-rapidapi-region":"AWS - us-west-2",
705
+ "x-rapidapi-version":"1.0.39",
706
+ "content-length":"35",
707
+ "connection":"Close"
708
+ },
709
+ "schema":{
710
+ "type":"object",
711
+ "properties":{
712
+ "get":{
713
+ "type":"string"
714
+ },
715
+ "parameters":{
716
+ "type":"array"
717
+ },
718
+ "errors":{
719
+ "type":"array"
720
+ },
721
+ "results":{
722
+ "type":"integer"
723
+ },
724
+ "response":{
725
+ "type":"array",
726
+ "items":{
727
+ "type":"object"
728
+ }
729
+ }
730
+ }
731
+ }
732
+ },
733
+ {
734
+ "name":"Continent by id",
735
+ "url":"https://referential.p.rapidapi.com/v1/continent/{code}",
736
+ "description":"Lookup a continent by id",
737
+ "method":"GET",
738
+ "required_parameters":[
739
+ {
740
+ "name":"code",
741
+ "type":"string",
742
+ "description":"Two letter iso continent code. Lookup /v1/continent.",
743
+ "default":"NA"
744
+ }
745
+ ],
746
+ "optional_parameters":[
747
+ {
748
+ "name":"lang",
749
+ "type":"STRING",
750
+ "description":"Two letter iso 639-2 language code (i.e. en, sv, pl etc). Lookup /v1/lang.",
751
+ "default":""
752
+ },
753
+ {
754
+ "name":"continent_code",
755
+ "type":"STRING",
756
+ "description":"Filter on 2 letter continent code",
757
+ "default":""
758
+ },
759
+ {
760
+ "name":"name",
761
+ "type":"STRING",
762
+ "description":"Filter on continent name (value field) as \\\"contains\\\"",
763
+ "default":""
764
+ },
765
+ {
766
+ "name":"fields",
767
+ "type":"STRING",
768
+ "description":"Select fields to return for each continent [iso_a2, iso_a3, continent_code, dial_code, currency_code, currency_num_code, currency]",
769
+ "default":""
770
+ }
771
+ ],
772
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/continent/{code}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
773
+ "statuscode":200,
774
+ "body":{
775
+ "value":"North America",
776
+ "key":"NA"
777
+ },
778
+ "headers":{
779
+ "alt-svc":"clear",
780
+ "cache-control":"max-age=604800, s-maxage=604800, public",
781
+ "content-encoding":"UTF-8",
782
+ "content-language":"en",
783
+ "content-type":"application/json",
784
+ "date":"Fri, 21 Feb 2020 20:12:33 GMT",
785
+ "server":"RapidAPI-1.0.39",
786
+ "via":"1.1 google",
787
+ "x-rapidapi-region":"AWS - us-west-2",
788
+ "x-rapidapi-version":"1.0.39",
789
+ "content-length":"36",
790
+ "connection":"Close"
791
+ },
792
+ "schema":{
793
+ "type":"object",
794
+ "properties":{
795
+ "get":{
796
+ "type":"string"
797
+ },
798
+ "parameters":{
799
+ "type":"array"
800
+ },
801
+ "errors":{
802
+ "type":"array"
803
+ },
804
+ "results":{
805
+ "type":"integer"
806
+ },
807
+ "response":{
808
+ "type":"array",
809
+ "items":{
810
+ "type":"object"
811
+ }
812
+ }
813
+ }
814
+ }
815
+ },
816
+ {
817
+ "name":"Continents",
818
+ "url":"https://referential.p.rapidapi.com/v1/continent",
819
+ "description":"List continents of the world localized to requested language",
820
+ "method":"GET",
821
+ "required_parameters":[],
822
+ "optional_parameters":[
823
+ {
824
+ "name":"fields",
825
+ "type":"STRING",
826
+ "description":"Select fields to return for each continent [iso_a2, iso_a3, continent_code, dial_code, currency_code, currency_num_code, currency]",
827
+ "default":""
828
+ },
829
+ {
830
+ "name":"continent_code",
831
+ "type":"STRING",
832
+ "description":"Filter on 2 letter continent code",
833
+ "default":""
834
+ },
835
+ {
836
+ "name":"lang",
837
+ "type":"STRING",
838
+ "description":"Two letter iso 639-2 language code (i.e. en, sv, pl etc). Lookup /v1/lang.",
839
+ "default":""
840
+ },
841
+ {
842
+ "name":"name",
843
+ "type":"STRING",
844
+ "description":"Filter as \"contains\" on continent name in chosen lang",
845
+ "default":""
846
+ }
847
+ ],
848
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/continent\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
849
+ "statuscode":200,
850
+ "body":{
851
+ "value":"Africa",
852
+ "key":"AF"
853
+ },
854
+ "headers":{
855
+ "alt-svc":"clear",
856
+ "cache-control":"max-age=604800, s-maxage=604800, public",
857
+ "content-encoding":"UTF-8",
858
+ "content-language":"en",
859
+ "content-type":"application/json",
860
+ "date":"Fri, 21 Feb 2020 20:08:18 GMT",
861
+ "server":"RapidAPI-1.0.39",
862
+ "via":"1.1 google",
863
+ "x-rapidapi-region":"AWS - us-west-2",
864
+ "x-rapidapi-version":"1.0.39",
865
+ "content-length":"228",
866
+ "connection":"Close"
867
+ },
868
+ "schema":{
869
+ "type":"object",
870
+ "properties":{
871
+ "get":{
872
+ "type":"string"
873
+ },
874
+ "parameters":{
875
+ "type":"array"
876
+ },
877
+ "errors":{
878
+ "type":"array"
879
+ },
880
+ "results":{
881
+ "type":"integer"
882
+ },
883
+ "response":{
884
+ "type":"array",
885
+ "items":{
886
+ "type":"object"
887
+ }
888
+ }
889
+ }
890
+ }
891
+ },
892
+ {
893
+ "name":"Languages",
894
+ "url":"https://referential.p.rapidapi.com/v1/lang",
895
+ "description":"List the world's languages translated into 20 languages",
896
+ "method":"GET",
897
+ "required_parameters":[],
898
+ "optional_parameters":[
899
+ {
900
+ "name":"lang_3",
901
+ "type":"STRING",
902
+ "description":"Filter by 3 letter ISO language code",
903
+ "default":""
904
+ },
905
+ {
906
+ "name":"iso_a2",
907
+ "type":"STRING",
908
+ "description":"Filter on 2 letter country code",
909
+ "default":""
910
+ },
911
+ {
912
+ "name":"fields",
913
+ "type":"STRING",
914
+ "description":"Select fields to return in result [flag,iso_a2,lang_3,lang]",
915
+ "default":"iso_a2,lang_3,flag"
916
+ },
917
+ {
918
+ "name":"lang",
919
+ "type":"STRING",
920
+ "description":"Returns a language translated into lang language",
921
+ "default":"en"
922
+ }
923
+ ],
924
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/lang\"\nquerystring = {\"fields\": fields, \"lang\": lang}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
925
+ "statuscode":200,
926
+ "body":{
927
+ "flag":"https://referential.io/img/al.gif",
928
+ "lang_3":"alb",
929
+ "value":"Albanian",
930
+ "iso_a2":"al",
931
+ "key":"SQ"
932
+ },
933
+ "headers":{
934
+ "alt-svc":"clear",
935
+ "cache-control":"max-age=604800, s-maxage=604800, public",
936
+ "content-encoding":"UTF-8",
937
+ "content-language":"en",
938
+ "content-type":"application/json",
939
+ "date":"Fri, 21 Feb 2020 20:19:34 GMT",
940
+ "server":"RapidAPI-1.0.39",
941
+ "via":"1.1 google",
942
+ "x-rapidapi-region":"AWS - us-west-2",
943
+ "x-rapidapi-version":"1.0.39",
944
+ "content-length":"6518",
945
+ "connection":"Close"
946
+ },
947
+ "schema":{
948
+ "type":"object",
949
+ "properties":{
950
+ "get":{
951
+ "type":"string"
952
+ },
953
+ "parameters":{
954
+ "type":"array"
955
+ },
956
+ "errors":{
957
+ "type":"array"
958
+ },
959
+ "results":{
960
+ "type":"integer"
961
+ },
962
+ "response":{
963
+ "type":"array",
964
+ "items":{
965
+ "type":"object"
966
+ }
967
+ }
968
+ }
969
+ }
970
+ },
971
+ {
972
+ "name":"Language by id",
973
+ "url":"https://referential.p.rapidapi.com/v1/lang/{lang}",
974
+ "description":"Find language by id translated into 20 languages",
975
+ "method":"GET",
976
+ "required_parameters":[
977
+ {
978
+ "name":"lang",
979
+ "type":"string",
980
+ "description":"2 letter iso language code. Lookup at /v1/lang.",
981
+ "default":"es"
982
+ }
983
+ ],
984
+ "optional_parameters":[
985
+ {
986
+ "name":"lang",
987
+ "type":"STRING",
988
+ "description":"Returns a language translated into lang language",
989
+ "default":"sv"
990
+ },
991
+ {
992
+ "name":"lang_3",
993
+ "type":"STRING",
994
+ "description":"Filter by 3 letter ISO language code",
995
+ "default":""
996
+ },
997
+ {
998
+ "name":"iso_a2",
999
+ "type":"STRING",
1000
+ "description":"Filter on 2 letter country code",
1001
+ "default":""
1002
+ },
1003
+ {
1004
+ "name":"fields",
1005
+ "type":"STRING",
1006
+ "description":"Select fields to return in result [flag,iso_a2,lang_3,lang]",
1007
+ "default":"iso_a2,lang_3,flag"
1008
+ }
1009
+ ],
1010
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/lang/{lang}\"\nquerystring = {\"fields\": fields}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
1011
+ "statuscode":200,
1012
+ "body":{
1013
+ "flag":"https://referential.io/img/es.gif",
1014
+ "lang_3":"spa",
1015
+ "value":"Spanska",
1016
+ "iso_a2":"es",
1017
+ "key":"ES"
1018
+ },
1019
+ "headers":{
1020
+ "alt-svc":"clear",
1021
+ "cache-control":"max-age=604800, s-maxage=604800, public",
1022
+ "content-encoding":"UTF-8",
1023
+ "content-language":"sv",
1024
+ "content-type":"application/json",
1025
+ "date":"Fri, 21 Feb 2020 20:21:33 GMT",
1026
+ "server":"RapidAPI-1.0.39",
1027
+ "via":"1.1 google",
1028
+ "x-rapidapi-region":"AWS - us-west-2",
1029
+ "x-rapidapi-version":"1.0.39",
1030
+ "content-length":"102",
1031
+ "connection":"Close"
1032
+ },
1033
+ "schema":{
1034
+ "type":"object",
1035
+ "properties":{
1036
+ "get":{
1037
+ "type":"string"
1038
+ },
1039
+ "parameters":{
1040
+ "type":"array"
1041
+ },
1042
+ "errors":{
1043
+ "type":"array"
1044
+ },
1045
+ "results":{
1046
+ "type":"integer"
1047
+ },
1048
+ "response":{
1049
+ "type":"array",
1050
+ "items":{
1051
+ "type":"object"
1052
+ }
1053
+ }
1054
+ }
1055
+ }
1056
+ },
1057
+ {
1058
+ "name":"Timezone by id",
1059
+ "url":"https://referential.p.rapidapi.com/v1/timezone/{timezone}",
1060
+ "description":"Lookup a time zone",
1061
+ "method":"GET",
1062
+ "required_parameters":[
1063
+ {
1064
+ "name":"timezone",
1065
+ "type":"string",
1066
+ "description":"Timezone",
1067
+ "default":"Afrika/Dakar"
1068
+ }
1069
+ ],
1070
+ "optional_parameters":[
1071
+ {
1072
+ "name":"fields",
1073
+ "type":"STRING",
1074
+ "description":"Select fields to return in result [code,timezone,daylights_code,daylights_offset,daylights,hours_offset,offset]",
1075
+ "default":"offset,daylights_offset,daylights,daylights_code,timezone"
1076
+ },
1077
+ {
1078
+ "name":"lang",
1079
+ "type":"STRING",
1080
+ "description":"Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en",
1081
+ "default":"de"
1082
+ }
1083
+ ],
1084
+ "code":"import requests\n\nurl = \"https://referential.p.rapidapi.com/v1/timezone/{timezone}\"\nquerystring = {\"fields\": fields, \"lang\": lang}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"referential.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
1085
+ "statuscode":111,
1086
+ "body":"",
1087
+ "headers":"",
1088
+ "schema":""
1089
+ }
1090
+ ]
1091
+ }
toolbench/toolenv/tools/Location/referential/api.py ADDED
@@ -0,0 +1,478 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 city_by_ip_address_geo_ip(ip: str, fields: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Find a city, state, country and continent by IP address. For some results, the closest result within 10 miles will be provided."
12
+ ip: ip4 pr ip6 formatted IP address
13
+ fields: Select fields to return in result [geonameid, timezone,state_code,iso_a2]
14
+
15
+ """
16
+ url = f"https://referential.p.rapidapi.com/v1/city"
17
+ querystring = {'ip': ip, }
18
+ if fields:
19
+ querystring['fields'] = fields
20
+
21
+ headers = {
22
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
23
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
24
+ }
25
+
26
+
27
+ response = requests.get(url, headers=headers, params=querystring)
28
+ try:
29
+ observation = response.json()
30
+ except:
31
+ observation = response.text
32
+ return observation
33
+
34
+ def countries(currency: str=None, dial_code: int=None, currency_code: str=None, fields: str='currency,currency_num_code,currency_code,continent_code,currency,iso_a3,dial_code', iso_a2: str=None, name: str=None, limit: int=250, continent_code: str=None, iso_a3: str=None, currency_num_code: str=None, lang: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
35
+ """
36
+ "List or search countries of the world in different languages.. Get iso a2, a3 country code and localized country name"
37
+ currency: Filter on currency name in chosen lang
38
+ dial_code: Filter on country dial code
39
+ currency_code: Filter on 3 letter currency code (ISO)
40
+ fields: Select fields to return for each country [iso_a2, iso_a3, continent_code, dial_code, currency_code, currency_num_code, currency]
41
+ iso_a2: Filter on 2 letter iso country code
42
+ name: Country name search string. Can be partial contains...
43
+ continent_code: Two letter region/continent code (eu, na, sa, as, af, oc, an). Lookup at /v1/continent.
44
+ iso_a3: Filter on 3 letter iso country code
45
+ currency_num_code: Filter on 3 digit numeric currency code (ISO)
46
+ lang: Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en
47
+
48
+ """
49
+ url = f"https://referential.p.rapidapi.com/v1/country"
50
+ querystring = {}
51
+ if currency:
52
+ querystring['currency'] = currency
53
+ if dial_code:
54
+ querystring['dial_code'] = dial_code
55
+ if currency_code:
56
+ querystring['currency_code'] = currency_code
57
+ if fields:
58
+ querystring['fields'] = fields
59
+ if iso_a2:
60
+ querystring['iso_a2'] = iso_a2
61
+ if name:
62
+ querystring['name'] = name
63
+ if limit:
64
+ querystring['limit'] = limit
65
+ if continent_code:
66
+ querystring['continent_code'] = continent_code
67
+ if iso_a3:
68
+ querystring['iso_a3'] = iso_a3
69
+ if currency_num_code:
70
+ querystring['currency_num_code'] = currency_num_code
71
+ if lang:
72
+ querystring['lang'] = lang
73
+
74
+ headers = {
75
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
76
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
77
+ }
78
+
79
+
80
+ response = requests.get(url, headers=headers, params=querystring)
81
+ try:
82
+ observation = response.json()
83
+ except:
84
+ observation = response.text
85
+ return observation
86
+
87
+ def cities(limit: int=250, state_hasc: str=None, timezone: str=None, geonameid: str=None, prefix: str='san fr', timezone_offset: int=None, sort: str=None, lang: str='en', iso_a2: str='us', name: str=None, state_code: str='US-CA', fields: str='iso_a2,state_code,state_hasc,timezone,timezone_offset', order: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
88
+ """
89
+ "List and search over 75,000 world cities in 20 languages."
90
+ limit: Limit results to N results
91
+ state_hasc: Filter on state's HASC code. List at /v1/state.
92
+ timezone: Filter on timezone name. List at /v1/timezone.
93
+ geonameid: Filter on geonameid
94
+ prefix: Search by names starting with prefix. See also limit, order and sort fields.
95
+ timezone_offset: Filter on timezone offset in hours
96
+ sort: Sort on field [population, state_code, name, timezone, state_hasc, iso_a2]. Please see limit and order fields.
97
+ lang: Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en
98
+ iso_a2: Filter on 2 letter country code
99
+ name: Search as \"contains\" on city name in chosen lang
100
+ state_code: Filter on state's ISO-3166-2 letter code. List at /v1/state
101
+ fields: Select fields to return in result [iso_a2,state_code,timezone,timezone_offset,state_hasc,geonameid]
102
+ order: Sort order [asc | desc]
103
+
104
+ """
105
+ url = f"https://referential.p.rapidapi.com/v1/city"
106
+ querystring = {}
107
+ if limit:
108
+ querystring['limit'] = limit
109
+ if state_hasc:
110
+ querystring['state_hasc'] = state_hasc
111
+ if timezone:
112
+ querystring['timezone'] = timezone
113
+ if geonameid:
114
+ querystring['geonameid'] = geonameid
115
+ if prefix:
116
+ querystring['prefix'] = prefix
117
+ if timezone_offset:
118
+ querystring['timezone_offset'] = timezone_offset
119
+ if sort:
120
+ querystring['sort'] = sort
121
+ if lang:
122
+ querystring['lang'] = lang
123
+ if iso_a2:
124
+ querystring['iso_a2'] = iso_a2
125
+ if name:
126
+ querystring['name'] = name
127
+ if state_code:
128
+ querystring['state_code'] = state_code
129
+ if fields:
130
+ querystring['fields'] = fields
131
+ if order:
132
+ querystring['order'] = order
133
+
134
+ headers = {
135
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
136
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
137
+ }
138
+
139
+
140
+ response = requests.get(url, headers=headers, params=querystring)
141
+ try:
142
+ observation = response.json()
143
+ except:
144
+ observation = response.text
145
+ return observation
146
+
147
+ def state(limit: int=250, iso_a2: str='us', iso_3166_2: str=None, fields: str='iso_a2', name: str='tex', lang: str='en', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
148
+ """
149
+ "List the sub-regions/states/provinces/departments of the world's countries"
150
+ iso_a2: Filter on 2 letter country code
151
+ iso_3166_2: Filter on Subregion's ISO-3166-2 letter code
152
+ fields: Select fields to select in the result [iso_a2]
153
+ name: Filter as \"contains\" on the states's name in chosen lang
154
+ lang: Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en
155
+
156
+ """
157
+ url = f"https://referential.p.rapidapi.com/v1/state"
158
+ querystring = {}
159
+ if limit:
160
+ querystring['limit'] = limit
161
+ if iso_a2:
162
+ querystring['iso_a2'] = iso_a2
163
+ if iso_3166_2:
164
+ querystring['iso_3166_2'] = iso_3166_2
165
+ if fields:
166
+ querystring['fields'] = fields
167
+ if name:
168
+ querystring['name'] = name
169
+ if lang:
170
+ querystring['lang'] = lang
171
+
172
+ headers = {
173
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
174
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
175
+ }
176
+
177
+
178
+ response = requests.get(url, headers=headers, params=querystring)
179
+ try:
180
+ observation = response.json()
181
+ except:
182
+ observation = response.text
183
+ return observation
184
+
185
+ def timezones(offset: str=None, name: str=None, code: str=None, timezone: str=None, daylights_offset: str=None, lang: str='de', daylights_code: str=None, fields: str='offset,daylights_offset,daylights,daylights_code,timezone', daylights: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
186
+ """
187
+ "List the world's time zones in 20 languages"
188
+ offset: Filter on non daylights savings offset in hours
189
+ name: Filter as "contains" on timezone name in chosen lang
190
+ code: Filter on 3 letter non daylight savings timezone code (not unique)
191
+ timezone: Filter on timezone name in english
192
+ daylights_offset: Filter on daylights savings offset in hours
193
+ lang: Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en
194
+ daylights_code: Filter on daylights savings letter code (not unique)
195
+ fields: Select fields to return in result [code,timezone,daylights_code,daylights_offset,daylights,hours_offset,offset]
196
+ daylights: Filter on daylights savings/non daylight savings timezones (true,false)
197
+
198
+ """
199
+ url = f"https://referential.p.rapidapi.com/v1/timezone"
200
+ querystring = {}
201
+ if offset:
202
+ querystring['offset'] = offset
203
+ if name:
204
+ querystring['name'] = name
205
+ if code:
206
+ querystring['code'] = code
207
+ if timezone:
208
+ querystring['timezone'] = timezone
209
+ if daylights_offset:
210
+ querystring['daylights_offset'] = daylights_offset
211
+ if lang:
212
+ querystring['lang'] = lang
213
+ if daylights_code:
214
+ querystring['daylights_code'] = daylights_code
215
+ if fields:
216
+ querystring['fields'] = fields
217
+ if daylights:
218
+ querystring['daylights'] = daylights
219
+
220
+ headers = {
221
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
222
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
223
+ }
224
+
225
+
226
+ response = requests.get(url, headers=headers, params=querystring)
227
+ try:
228
+ observation = response.json()
229
+ except:
230
+ observation = response.text
231
+ return observation
232
+
233
+ def city_by_id(is_id: str, lang: str='en', fields: str='iso_a2,state_code,state_hasc,timezone, timezone_offset', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
234
+ """
235
+ "Direct lookup of over 75,000 cities by id. See the v1/city API to search for city ids."
236
+ id: Lookup at /v1/city.
237
+ lang: Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en
238
+ fields: Select fields to return in result [iso_a2,state_code,timezone,timezone_offset,state_hasc]
239
+
240
+ """
241
+ url = f"https://referential.p.rapidapi.com/v1/city/{is_id}"
242
+ querystring = {}
243
+ if lang:
244
+ querystring['lang'] = lang
245
+ if fields:
246
+ querystring['fields'] = fields
247
+
248
+ headers = {
249
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
250
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
251
+ }
252
+
253
+
254
+ response = requests.get(url, headers=headers, params=querystring)
255
+ try:
256
+ observation = response.json()
257
+ except:
258
+ observation = response.text
259
+ return observation
260
+
261
+ def country_by_iso_code(iso_code: str, fields: str=None, lang: str='en', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
262
+ """
263
+ "Get country by 2 letter iso code localized to a given language"
264
+ iso_code: 2 letter iso country code.
265
+ fields: Comma deliminated list of fields to return in response
266
+ lang: 2 letter iso language code to localize country name
267
+
268
+ """
269
+ url = f"https://referential.p.rapidapi.com/v1/country/{iso_code}"
270
+ querystring = {}
271
+ if fields:
272
+ querystring['fields'] = fields
273
+ if lang:
274
+ querystring['lang'] = lang
275
+
276
+ headers = {
277
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
278
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
279
+ }
280
+
281
+
282
+ response = requests.get(url, headers=headers, params=querystring)
283
+ try:
284
+ observation = response.json()
285
+ except:
286
+ observation = response.text
287
+ return observation
288
+
289
+ def state_by_id(code: str, fields: str=None, lang: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
290
+ """
291
+ "Lookup sub-regions/states/provinces/departments by iso 3166-2 code"
292
+ code: ISO 3166-2 state/province/deparm
293
+ fields: Select fields to return in result [iso_a2]
294
+ lang: Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en
295
+
296
+ """
297
+ url = f"https://referential.p.rapidapi.com/v1/state/{code}"
298
+ querystring = {}
299
+ if fields:
300
+ querystring['fields'] = fields
301
+ if lang:
302
+ querystring['lang'] = lang
303
+
304
+ headers = {
305
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
306
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
307
+ }
308
+
309
+
310
+ response = requests.get(url, headers=headers, params=querystring)
311
+ try:
312
+ observation = response.json()
313
+ except:
314
+ observation = response.text
315
+ return observation
316
+
317
+ def continent_by_id(code: str, lang: str=None, continent_code: str=None, name: str=None, fields: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
318
+ """
319
+ "Lookup a continent by id"
320
+ code: Two letter iso continent code. Lookup /v1/continent.
321
+ lang: Two letter iso 639-2 language code (i.e. en, sv, pl etc). Lookup /v1/lang.
322
+ continent_code: Filter on 2 letter continent code
323
+ name: Filter on continent name (value field) as \"contains\"
324
+ fields: Select fields to return for each continent [iso_a2, iso_a3, continent_code, dial_code, currency_code, currency_num_code, currency]
325
+
326
+ """
327
+ url = f"https://referential.p.rapidapi.com/v1/continent/{code}"
328
+ querystring = {}
329
+ if lang:
330
+ querystring['lang'] = lang
331
+ if continent_code:
332
+ querystring['continent_code'] = continent_code
333
+ if name:
334
+ querystring['name'] = name
335
+ if fields:
336
+ querystring['fields'] = fields
337
+
338
+ headers = {
339
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
340
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
341
+ }
342
+
343
+
344
+ response = requests.get(url, headers=headers, params=querystring)
345
+ try:
346
+ observation = response.json()
347
+ except:
348
+ observation = response.text
349
+ return observation
350
+
351
+ def continents(fields: str=None, continent_code: str=None, lang: str=None, name: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
352
+ """
353
+ "List continents of the world localized to requested language"
354
+ fields: Select fields to return for each continent [iso_a2, iso_a3, continent_code, dial_code, currency_code, currency_num_code, currency]
355
+ continent_code: Filter on 2 letter continent code
356
+ lang: Two letter iso 639-2 language code (i.e. en, sv, pl etc). Lookup /v1/lang.
357
+ name: Filter as "contains" on continent name in chosen lang
358
+
359
+ """
360
+ url = f"https://referential.p.rapidapi.com/v1/continent"
361
+ querystring = {}
362
+ if fields:
363
+ querystring['fields'] = fields
364
+ if continent_code:
365
+ querystring['continent_code'] = continent_code
366
+ if lang:
367
+ querystring['lang'] = lang
368
+ if name:
369
+ querystring['name'] = name
370
+
371
+ headers = {
372
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
373
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
374
+ }
375
+
376
+
377
+ response = requests.get(url, headers=headers, params=querystring)
378
+ try:
379
+ observation = response.json()
380
+ except:
381
+ observation = response.text
382
+ return observation
383
+
384
+ def languages(lang_3: str=None, iso_a2: str=None, fields: str='iso_a2,lang_3,flag', lang: str='en', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
385
+ """
386
+ "List the world's languages translated into 20 languages"
387
+ lang_3: Filter by 3 letter ISO language code
388
+ iso_a2: Filter on 2 letter country code
389
+ fields: Select fields to return in result [flag,iso_a2,lang_3,lang]
390
+ lang: Returns a language translated into lang language
391
+
392
+ """
393
+ url = f"https://referential.p.rapidapi.com/v1/lang"
394
+ querystring = {}
395
+ if lang_3:
396
+ querystring['lang_3'] = lang_3
397
+ if iso_a2:
398
+ querystring['iso_a2'] = iso_a2
399
+ if fields:
400
+ querystring['fields'] = fields
401
+ if lang:
402
+ querystring['lang'] = lang
403
+
404
+ headers = {
405
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
406
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
407
+ }
408
+
409
+
410
+ response = requests.get(url, headers=headers, params=querystring)
411
+ try:
412
+ observation = response.json()
413
+ except:
414
+ observation = response.text
415
+ return observation
416
+
417
+ def language_by_id(lang: str, lang_3: str=None, iso_a2: str=None, fields: str='iso_a2,lang_3,flag', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
418
+ """
419
+ "Find language by id translated into 20 languages"
420
+ lang: 2 letter iso language code. Lookup at /v1/lang.
421
+ lang: Returns a language translated into lang language
422
+ lang_3: Filter by 3 letter ISO language code
423
+ iso_a2: Filter on 2 letter country code
424
+ fields: Select fields to return in result [flag,iso_a2,lang_3,lang]
425
+
426
+ """
427
+ url = f"https://referential.p.rapidapi.com/v1/lang/{lang}"
428
+ querystring = {}
429
+ if lang:
430
+ querystring['lang'] = lang
431
+ if lang_3:
432
+ querystring['lang_3'] = lang_3
433
+ if iso_a2:
434
+ querystring['iso_a2'] = iso_a2
435
+ if fields:
436
+ querystring['fields'] = fields
437
+
438
+ headers = {
439
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
440
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
441
+ }
442
+
443
+
444
+ response = requests.get(url, headers=headers, params=querystring)
445
+ try:
446
+ observation = response.json()
447
+ except:
448
+ observation = response.text
449
+ return observation
450
+
451
+ def timezone_by_id(timezone: str, fields: str='offset,daylights_offset,daylights,daylights_code,timezone', lang: str='de', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
452
+ """
453
+ "Lookup a time zone"
454
+ timezone: Timezone
455
+ fields: Select fields to return in result [code,timezone,daylights_code,daylights_offset,daylights,hours_offset,offset]
456
+ lang: Language selection ISO 639-2 letter code. Overrides Accept-Language header. Defaults to browser value. Default: en
457
+
458
+ """
459
+ url = f"https://referential.p.rapidapi.com/v1/timezone/{timezone}"
460
+ querystring = {}
461
+ if fields:
462
+ querystring['fields'] = fields
463
+ if lang:
464
+ querystring['lang'] = lang
465
+
466
+ headers = {
467
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
468
+ "X-RapidAPI-Host": "referential.p.rapidapi.com"
469
+ }
470
+
471
+
472
+ response = requests.get(url, headers=headers, params=querystring)
473
+ try:
474
+ observation = response.json()
475
+ except:
476
+ observation = response.text
477
+ return observation
478
+
toolbench/toolenv/tools/Location/rest_country_api.json ADDED
@@ -0,0 +1,1415 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Rest Country API",
3
+ "tool_description":"This project is a resource for accessing information about countries around the world through a REST API (Application Programming Interface). It is inspired by the website restcountries.com and is freely available for anyone to use. The project is open source, meaning that the source code is publicly available and can be modified by anyone. It allows users to retrieve data about each country, including details about its geography, population, and more, through simple API calls. Whether you're...",
4
+ "title":"Rest Country API",
5
+ "pricing":"FREE",
6
+ "score":{
7
+ "avgServiceLevel":0,
8
+ "avgLatency":26,
9
+ "avgSuccessRate":0,
10
+ "popularityScore":0.1,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/saif.ali40/api/rest-country-api/",
14
+ "host":"rest-country-api.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"getByUniqueId",
18
+ "url":"https://rest-country-api.p.rapidapi.com/{uniqueids}",
19
+ "description":"Returns a single pet",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"uniqueIds",
24
+ "type":"STRING",
25
+ "description":"name, cca2, cca3, fifa",
26
+ "default":"india"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://rest-country-api.p.rapidapi.com/{uniqueids}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"rest-country-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":200,
32
+ "body":{
33
+ "name":{
34
+ "common":"India",
35
+ "official":"Republic of India",
36
+ "nativeName":{
37
+ "eng":{
38
+ "official":"Republic of India",
39
+ "common":"India"
40
+ },
41
+ "hin":{
42
+ "official":"भारत गणराज्य",
43
+ "common":"भारत"
44
+ },
45
+ "tam":{
46
+ "official":"இந்தியக் குடியரசு",
47
+ "common":"இந்தியா"
48
+ }
49
+ }
50
+ },
51
+ "tld":[],
52
+ "cca2":"IN",
53
+ "ccn3":"356",
54
+ "cca3":"IND",
55
+ "cioc":"IND",
56
+ "fifa":"IND",
57
+ "independent":true,
58
+ "status":"officially-assigned",
59
+ "unMember":true,
60
+ "currencies":{
61
+ "INR":{
62
+ "name":"Indian rupee",
63
+ "symbol":"₹"
64
+ }
65
+ },
66
+ "idd":{
67
+ "root":"+9",
68
+ "suffixes":[]
69
+ },
70
+ "capital":[],
71
+ "altSpellings":[],
72
+ "region":"Asia",
73
+ "subregion":"Southern Asia",
74
+ "continents":[],
75
+ "languages":{
76
+ "eng":"English",
77
+ "hin":"Hindi",
78
+ "tam":"Tamil"
79
+ },
80
+ "translations":{
81
+ "ara":{
82
+ "official":"جمهورية الهند",
83
+ "common":"الهند"
84
+ },
85
+ "bre":{
86
+ "official":"Republik India",
87
+ "common":"India"
88
+ },
89
+ "ces":{
90
+ "official":"Indická republika",
91
+ "common":"Indie"
92
+ },
93
+ "cym":{
94
+ "official":"Republic of India",
95
+ "common":"India"
96
+ },
97
+ "deu":{
98
+ "official":"Republik Indien",
99
+ "common":"Indien"
100
+ },
101
+ "est":{
102
+ "official":"India Vabariik",
103
+ "common":"India"
104
+ },
105
+ "fin":{
106
+ "official":"Intian tasavalta",
107
+ "common":"Intia"
108
+ },
109
+ "fra":{
110
+ "official":"République de l'Inde",
111
+ "common":"Inde"
112
+ },
113
+ "hrv":{
114
+ "official":"Republika Indija",
115
+ "common":"Indija"
116
+ },
117
+ "hun":{
118
+ "official":"Indiai Köztársaság",
119
+ "common":"India"
120
+ },
121
+ "ita":{
122
+ "official":"Repubblica dell'India",
123
+ "common":"India"
124
+ },
125
+ "jpn":{
126
+ "official":"インド共和国",
127
+ "common":"インド"
128
+ },
129
+ "kor":{
130
+ "official":"인도 공화국",
131
+ "common":"인도"
132
+ },
133
+ "nld":{
134
+ "official":"Republiek India",
135
+ "common":"India"
136
+ },
137
+ "per":{
138
+ "official":"جمهوری هندوستان",
139
+ "common":"هند"
140
+ },
141
+ "pol":{
142
+ "official":"Republika Indii",
143
+ "common":"Indie"
144
+ },
145
+ "por":{
146
+ "official":"República da Índia",
147
+ "common":"Índia"
148
+ },
149
+ "rus":{
150
+ "official":"Республика Индия",
151
+ "common":"Индия"
152
+ },
153
+ "slk":{
154
+ "official":"Indická republika",
155
+ "common":"India"
156
+ },
157
+ "spa":{
158
+ "official":"República de la India",
159
+ "common":"India"
160
+ },
161
+ "swe":{
162
+ "official":"Republiken Indien",
163
+ "common":"Indien"
164
+ },
165
+ "urd":{
166
+ "official":"جمہوریہ بھارت",
167
+ "common":"بھارت"
168
+ },
169
+ "zho":{
170
+ "official":"印度共和国",
171
+ "common":"印度"
172
+ }
173
+ },
174
+ "latlng":[],
175
+ "landlocked":true,
176
+ "borders":[],
177
+ "area":3287590,
178
+ "flag":"🇮🇳",
179
+ "demonyms":{
180
+ "eng":{
181
+ "f":"Indian",
182
+ "m":"Indian"
183
+ },
184
+ "fra":{
185
+ "f":"Indienne",
186
+ "m":"Indien"
187
+ }
188
+ },
189
+ "flags":[],
190
+ "population":1380004385,
191
+ "maps":{
192
+ "googleMaps":"https://goo.gl/maps/WSk3fLwG4vtPQetp7",
193
+ "openStreetMaps":"https://www.openstreetmap.org/relation/304716"
194
+ },
195
+ "gini":{
196
+ "2011":35.7
197
+ },
198
+ "car":{
199
+ "signs":[],
200
+ "side":"left"
201
+ },
202
+ "timezones":[],
203
+ "postal":"[1-9][0-9]{5}"
204
+ },
205
+ "headers":{},
206
+ "schema":{
207
+ "type":"object",
208
+ "properties":{
209
+ "name":{
210
+ "type":"object",
211
+ "properties":{
212
+ "common":{
213
+ "type":"string"
214
+ },
215
+ "official":{
216
+ "type":"string"
217
+ },
218
+ "nativeName":{
219
+ "type":"object",
220
+ "properties":{
221
+ "eng":{
222
+ "type":"object",
223
+ "properties":{
224
+ "official":{
225
+ "type":"string"
226
+ },
227
+ "common":{
228
+ "type":"string"
229
+ }
230
+ }
231
+ },
232
+ "hin":{
233
+ "type":"object",
234
+ "properties":{
235
+ "official":{
236
+ "type":"string"
237
+ },
238
+ "common":{
239
+ "type":"string"
240
+ }
241
+ }
242
+ },
243
+ "tam":{
244
+ "type":"object",
245
+ "properties":{
246
+ "official":{
247
+ "type":"string"
248
+ },
249
+ "common":{
250
+ "type":"string"
251
+ }
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ },
258
+ "tld":{
259
+ "type":"array",
260
+ "items":{
261
+ "type":"string"
262
+ }
263
+ },
264
+ "cca2":{
265
+ "type":"string"
266
+ },
267
+ "ccn3":{
268
+ "type":"string"
269
+ },
270
+ "cca3":{
271
+ "type":"string"
272
+ },
273
+ "cioc":{
274
+ "type":"string"
275
+ },
276
+ "fifa":{
277
+ "type":"string"
278
+ },
279
+ "independent":{
280
+ "type":"boolean"
281
+ },
282
+ "status":{
283
+ "type":"string"
284
+ },
285
+ "unMember":{
286
+ "type":"boolean"
287
+ },
288
+ "currencies":{
289
+ "type":"object",
290
+ "properties":{
291
+ "INR":{
292
+ "type":"object",
293
+ "properties":{
294
+ "name":{
295
+ "type":"string"
296
+ },
297
+ "symbol":{
298
+ "type":"string"
299
+ }
300
+ }
301
+ }
302
+ }
303
+ },
304
+ "idd":{
305
+ "type":"object",
306
+ "properties":{
307
+ "root":{
308
+ "type":"string"
309
+ },
310
+ "suffixes":{
311
+ "type":"array",
312
+ "items":{
313
+ "type":"string"
314
+ }
315
+ }
316
+ }
317
+ },
318
+ "capital":{
319
+ "type":"array",
320
+ "items":{
321
+ "type":"string"
322
+ }
323
+ },
324
+ "altSpellings":{
325
+ "type":"array",
326
+ "items":{
327
+ "type":"string"
328
+ }
329
+ },
330
+ "region":{
331
+ "type":"string"
332
+ },
333
+ "subregion":{
334
+ "type":"string"
335
+ },
336
+ "continents":{
337
+ "type":"array",
338
+ "items":{
339
+ "type":"string"
340
+ }
341
+ },
342
+ "languages":{
343
+ "type":"object",
344
+ "properties":{
345
+ "eng":{
346
+ "type":"string"
347
+ },
348
+ "hin":{
349
+ "type":"string"
350
+ },
351
+ "tam":{
352
+ "type":"string"
353
+ }
354
+ }
355
+ },
356
+ "translations":{
357
+ "type":"object",
358
+ "properties":{
359
+ "ara":{
360
+ "type":"object",
361
+ "properties":{
362
+ "official":{
363
+ "type":"string"
364
+ },
365
+ "common":{
366
+ "type":"string"
367
+ }
368
+ }
369
+ },
370
+ "bre":{
371
+ "type":"object",
372
+ "properties":{
373
+ "official":{
374
+ "type":"string"
375
+ },
376
+ "common":{
377
+ "type":"string"
378
+ }
379
+ }
380
+ },
381
+ "ces":{
382
+ "type":"object",
383
+ "properties":{
384
+ "official":{
385
+ "type":"string"
386
+ },
387
+ "common":{
388
+ "type":"string"
389
+ }
390
+ }
391
+ },
392
+ "cym":{
393
+ "type":"object",
394
+ "properties":{
395
+ "official":{
396
+ "type":"string"
397
+ },
398
+ "common":{
399
+ "type":"string"
400
+ }
401
+ }
402
+ },
403
+ "deu":{
404
+ "type":"object",
405
+ "properties":{
406
+ "official":{
407
+ "type":"string"
408
+ },
409
+ "common":{
410
+ "type":"string"
411
+ }
412
+ }
413
+ },
414
+ "est":{
415
+ "type":"object",
416
+ "properties":{
417
+ "official":{
418
+ "type":"string"
419
+ },
420
+ "common":{
421
+ "type":"string"
422
+ }
423
+ }
424
+ },
425
+ "fin":{
426
+ "type":"object",
427
+ "properties":{
428
+ "official":{
429
+ "type":"string"
430
+ },
431
+ "common":{
432
+ "type":"string"
433
+ }
434
+ }
435
+ },
436
+ "fra":{
437
+ "type":"object",
438
+ "properties":{
439
+ "official":{
440
+ "type":"string"
441
+ },
442
+ "common":{
443
+ "type":"string"
444
+ }
445
+ }
446
+ },
447
+ "hrv":{
448
+ "type":"object",
449
+ "properties":{
450
+ "official":{
451
+ "type":"string"
452
+ },
453
+ "common":{
454
+ "type":"string"
455
+ }
456
+ }
457
+ },
458
+ "hun":{
459
+ "type":"object",
460
+ "properties":{
461
+ "official":{
462
+ "type":"string"
463
+ },
464
+ "common":{
465
+ "type":"string"
466
+ }
467
+ }
468
+ },
469
+ "ita":{
470
+ "type":"object",
471
+ "properties":{
472
+ "official":{
473
+ "type":"string"
474
+ },
475
+ "common":{
476
+ "type":"string"
477
+ }
478
+ }
479
+ },
480
+ "jpn":{
481
+ "type":"object",
482
+ "properties":{
483
+ "official":{
484
+ "type":"string"
485
+ },
486
+ "common":{
487
+ "type":"string"
488
+ }
489
+ }
490
+ },
491
+ "kor":{
492
+ "type":"object",
493
+ "properties":{
494
+ "official":{
495
+ "type":"string"
496
+ },
497
+ "common":{
498
+ "type":"string"
499
+ }
500
+ }
501
+ },
502
+ "nld":{
503
+ "type":"object",
504
+ "properties":{
505
+ "official":{
506
+ "type":"string"
507
+ },
508
+ "common":{
509
+ "type":"string"
510
+ }
511
+ }
512
+ },
513
+ "per":{
514
+ "type":"object",
515
+ "properties":{
516
+ "official":{
517
+ "type":"string"
518
+ },
519
+ "common":{
520
+ "type":"string"
521
+ }
522
+ }
523
+ },
524
+ "pol":{
525
+ "type":"object",
526
+ "properties":{
527
+ "official":{
528
+ "type":"string"
529
+ },
530
+ "common":{
531
+ "type":"string"
532
+ }
533
+ }
534
+ },
535
+ "por":{
536
+ "type":"object",
537
+ "properties":{
538
+ "official":{
539
+ "type":"string"
540
+ },
541
+ "common":{
542
+ "type":"string"
543
+ }
544
+ }
545
+ },
546
+ "rus":{
547
+ "type":"object",
548
+ "properties":{
549
+ "official":{
550
+ "type":"string"
551
+ },
552
+ "common":{
553
+ "type":"string"
554
+ }
555
+ }
556
+ },
557
+ "slk":{
558
+ "type":"object",
559
+ "properties":{
560
+ "official":{
561
+ "type":"string"
562
+ },
563
+ "common":{
564
+ "type":"string"
565
+ }
566
+ }
567
+ },
568
+ "spa":{
569
+ "type":"object",
570
+ "properties":{
571
+ "official":{
572
+ "type":"string"
573
+ },
574
+ "common":{
575
+ "type":"string"
576
+ }
577
+ }
578
+ },
579
+ "swe":{
580
+ "type":"object",
581
+ "properties":{
582
+ "official":{
583
+ "type":"string"
584
+ },
585
+ "common":{
586
+ "type":"string"
587
+ }
588
+ }
589
+ },
590
+ "urd":{
591
+ "type":"object",
592
+ "properties":{
593
+ "official":{
594
+ "type":"string"
595
+ },
596
+ "common":{
597
+ "type":"string"
598
+ }
599
+ }
600
+ },
601
+ "zho":{
602
+ "type":"object",
603
+ "properties":{
604
+ "official":{
605
+ "type":"string"
606
+ },
607
+ "common":{
608
+ "type":"string"
609
+ }
610
+ }
611
+ }
612
+ }
613
+ },
614
+ "latlng":{
615
+ "type":"array",
616
+ "items":{
617
+ "type":"number"
618
+ }
619
+ },
620
+ "landlocked":{
621
+ "type":"boolean"
622
+ },
623
+ "borders":{
624
+ "type":"array",
625
+ "items":{
626
+ "type":"string"
627
+ }
628
+ },
629
+ "area":{
630
+ "type":"number"
631
+ },
632
+ "flag":{
633
+ "type":"string"
634
+ },
635
+ "demonyms":{
636
+ "type":"object",
637
+ "properties":{
638
+ "eng":{
639
+ "type":"object",
640
+ "properties":{
641
+ "f":{
642
+ "type":"string"
643
+ },
644
+ "m":{
645
+ "type":"string"
646
+ }
647
+ }
648
+ },
649
+ "fra":{
650
+ "type":"object",
651
+ "properties":{
652
+ "f":{
653
+ "type":"string"
654
+ },
655
+ "m":{
656
+ "type":"string"
657
+ }
658
+ }
659
+ }
660
+ }
661
+ },
662
+ "flags":{
663
+ "type":"array",
664
+ "items":{
665
+ "type":"string"
666
+ }
667
+ },
668
+ "population":{
669
+ "type":"number"
670
+ },
671
+ "maps":{
672
+ "type":"object",
673
+ "properties":{
674
+ "googleMaps":{
675
+ "type":"string"
676
+ },
677
+ "openStreetMaps":{
678
+ "type":"string"
679
+ }
680
+ }
681
+ },
682
+ "gini":{
683
+ "type":"object",
684
+ "properties":{
685
+ "2011":{
686
+ "type":"number"
687
+ }
688
+ }
689
+ },
690
+ "car":{
691
+ "type":"object",
692
+ "properties":{
693
+ "signs":{
694
+ "type":"array",
695
+ "items":{
696
+ "type":"string"
697
+ }
698
+ },
699
+ "side":{
700
+ "type":"string"
701
+ }
702
+ }
703
+ },
704
+ "timezones":{
705
+ "type":"array",
706
+ "items":{
707
+ "type":"string"
708
+ }
709
+ },
710
+ "postal":{
711
+ "type":"string"
712
+ }
713
+ }
714
+ }
715
+ },
716
+ {
717
+ "name":"allCountries",
718
+ "url":"https://rest-country-api.p.rapidapi.com/",
719
+ "description":"Returns all countries and its details in single api request",
720
+ "method":"GET",
721
+ "required_parameters":[],
722
+ "optional_parameters":[],
723
+ "code":"import requests\n\nurl = \"https://rest-country-api.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"rest-country-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
724
+ "statuscode":200,
725
+ "body":[
726
+ {
727
+ "name":{
728
+ "common":"India",
729
+ "official":"Republic of India",
730
+ "nativeName":{
731
+ "eng":{
732
+ "official":"Republic of India",
733
+ "common":"India"
734
+ },
735
+ "hin":{
736
+ "official":"भारत गणराज्य",
737
+ "common":"भारत"
738
+ },
739
+ "tam":{
740
+ "official":"இந்தியக் குடியரசு",
741
+ "common":"இந்தியா"
742
+ }
743
+ }
744
+ },
745
+ "tld":[],
746
+ "cca2":"IN",
747
+ "ccn3":"356",
748
+ "cca3":"IND",
749
+ "cioc":"IND",
750
+ "fifa":"IND",
751
+ "independent":true,
752
+ "status":"officially-assigned",
753
+ "unMember":true,
754
+ "currencies":{
755
+ "INR":{
756
+ "name":"Indian rupee",
757
+ "symbol":"₹"
758
+ }
759
+ },
760
+ "idd":{
761
+ "root":"+9",
762
+ "suffixes":[]
763
+ },
764
+ "capital":[],
765
+ "altSpellings":[],
766
+ "region":"Asia",
767
+ "subregion":"Southern Asia",
768
+ "continents":[],
769
+ "languages":{
770
+ "eng":"English",
771
+ "hin":"Hindi",
772
+ "tam":"Tamil"
773
+ },
774
+ "translations":{
775
+ "ara":{
776
+ "official":"جمهورية الهند",
777
+ "common":"الهند"
778
+ },
779
+ "bre":{
780
+ "official":"Republik India",
781
+ "common":"India"
782
+ },
783
+ "ces":{
784
+ "official":"Indická republika",
785
+ "common":"Indie"
786
+ },
787
+ "cym":{
788
+ "official":"Republic of India",
789
+ "common":"India"
790
+ },
791
+ "deu":{
792
+ "official":"Republik Indien",
793
+ "common":"Indien"
794
+ },
795
+ "est":{
796
+ "official":"India Vabariik",
797
+ "common":"India"
798
+ },
799
+ "fin":{
800
+ "official":"Intian tasavalta",
801
+ "common":"Intia"
802
+ },
803
+ "fra":{
804
+ "official":"République de l'Inde",
805
+ "common":"Inde"
806
+ },
807
+ "hrv":{
808
+ "official":"Republika Indija",
809
+ "common":"Indija"
810
+ },
811
+ "hun":{
812
+ "official":"Indiai Köztársaság",
813
+ "common":"India"
814
+ },
815
+ "ita":{
816
+ "official":"Repubblica dell'India",
817
+ "common":"India"
818
+ },
819
+ "jpn":{
820
+ "official":"インド共和国",
821
+ "common":"インド"
822
+ },
823
+ "kor":{
824
+ "official":"인도 공화국",
825
+ "common":"인도"
826
+ },
827
+ "nld":{
828
+ "official":"Republiek India",
829
+ "common":"India"
830
+ },
831
+ "per":{
832
+ "official":"جمهوری هندوستان",
833
+ "common":"هند"
834
+ },
835
+ "pol":{
836
+ "official":"Republika Indii",
837
+ "common":"Indie"
838
+ },
839
+ "por":{
840
+ "official":"República da Índia",
841
+ "common":"Índia"
842
+ },
843
+ "rus":{
844
+ "official":"Республика Индия",
845
+ "common":"Индия"
846
+ },
847
+ "slk":{
848
+ "official":"Indická republika",
849
+ "common":"India"
850
+ },
851
+ "spa":{
852
+ "official":"República de la India",
853
+ "common":"India"
854
+ },
855
+ "swe":{
856
+ "official":"Republiken Indien",
857
+ "common":"Indien"
858
+ },
859
+ "urd":{
860
+ "official":"جمہوریہ بھارت",
861
+ "common":"بھارت"
862
+ },
863
+ "zho":{
864
+ "official":"印度共和国",
865
+ "common":"印度"
866
+ }
867
+ },
868
+ "latlng":[],
869
+ "landlocked":true,
870
+ "borders":[],
871
+ "area":3287590,
872
+ "flag":"🇮🇳",
873
+ "demonyms":{
874
+ "eng":{
875
+ "f":"Indian",
876
+ "m":"Indian"
877
+ },
878
+ "fra":{
879
+ "f":"Indienne",
880
+ "m":"Indien"
881
+ }
882
+ },
883
+ "flags":[],
884
+ "population":1380004385,
885
+ "maps":{
886
+ "googleMaps":"https://goo.gl/maps/WSk3fLwG4vtPQetp7",
887
+ "openStreetMaps":"https://www.openstreetmap.org/relation/304716"
888
+ },
889
+ "gini":{
890
+ "2011":35.7
891
+ },
892
+ "car":{
893
+ "signs":[],
894
+ "side":"left"
895
+ },
896
+ "timezones":[],
897
+ "postal":"[1-9][0-9]{5}"
898
+ }
899
+ ],
900
+ "headers":{},
901
+ "schema":{
902
+ "type":"array",
903
+ "items":{
904
+ "type":"object",
905
+ "properties":{
906
+ "name":{
907
+ "type":"object",
908
+ "properties":{
909
+ "common":{
910
+ "type":"string"
911
+ },
912
+ "official":{
913
+ "type":"string"
914
+ },
915
+ "nativeName":{
916
+ "type":"object",
917
+ "properties":{
918
+ "eng":{
919
+ "type":"object",
920
+ "properties":{
921
+ "official":{
922
+ "type":"string"
923
+ },
924
+ "common":{
925
+ "type":"string"
926
+ }
927
+ }
928
+ },
929
+ "hin":{
930
+ "type":"object",
931
+ "properties":{
932
+ "official":{
933
+ "type":"string"
934
+ },
935
+ "common":{
936
+ "type":"string"
937
+ }
938
+ }
939
+ },
940
+ "tam":{
941
+ "type":"object",
942
+ "properties":{
943
+ "official":{
944
+ "type":"string"
945
+ },
946
+ "common":{
947
+ "type":"string"
948
+ }
949
+ }
950
+ }
951
+ }
952
+ }
953
+ }
954
+ },
955
+ "tld":{
956
+ "type":"array",
957
+ "items":{
958
+ "type":"string"
959
+ }
960
+ },
961
+ "cca2":{
962
+ "type":"string"
963
+ },
964
+ "ccn3":{
965
+ "type":"string"
966
+ },
967
+ "cca3":{
968
+ "type":"string"
969
+ },
970
+ "cioc":{
971
+ "type":"string"
972
+ },
973
+ "fifa":{
974
+ "type":"string"
975
+ },
976
+ "independent":{
977
+ "type":"boolean"
978
+ },
979
+ "status":{
980
+ "type":"string"
981
+ },
982
+ "unMember":{
983
+ "type":"boolean"
984
+ },
985
+ "currencies":{
986
+ "type":"object",
987
+ "properties":{
988
+ "INR":{
989
+ "type":"object",
990
+ "properties":{
991
+ "name":{
992
+ "type":"string"
993
+ },
994
+ "symbol":{
995
+ "type":"string"
996
+ }
997
+ }
998
+ }
999
+ }
1000
+ },
1001
+ "idd":{
1002
+ "type":"object",
1003
+ "properties":{
1004
+ "root":{
1005
+ "type":"string"
1006
+ },
1007
+ "suffixes":{
1008
+ "type":"array",
1009
+ "items":{
1010
+ "type":"string"
1011
+ }
1012
+ }
1013
+ }
1014
+ },
1015
+ "capital":{
1016
+ "type":"array",
1017
+ "items":{
1018
+ "type":"string"
1019
+ }
1020
+ },
1021
+ "altSpellings":{
1022
+ "type":"array",
1023
+ "items":{
1024
+ "type":"string"
1025
+ }
1026
+ },
1027
+ "region":{
1028
+ "type":"string"
1029
+ },
1030
+ "subregion":{
1031
+ "type":"string"
1032
+ },
1033
+ "continents":{
1034
+ "type":"array",
1035
+ "items":{
1036
+ "type":"string"
1037
+ }
1038
+ },
1039
+ "languages":{
1040
+ "type":"object",
1041
+ "properties":{
1042
+ "eng":{
1043
+ "type":"string"
1044
+ },
1045
+ "hin":{
1046
+ "type":"string"
1047
+ },
1048
+ "tam":{
1049
+ "type":"string"
1050
+ }
1051
+ }
1052
+ },
1053
+ "translations":{
1054
+ "type":"object",
1055
+ "properties":{
1056
+ "ara":{
1057
+ "type":"object",
1058
+ "properties":{
1059
+ "official":{
1060
+ "type":"string"
1061
+ },
1062
+ "common":{
1063
+ "type":"string"
1064
+ }
1065
+ }
1066
+ },
1067
+ "bre":{
1068
+ "type":"object",
1069
+ "properties":{
1070
+ "official":{
1071
+ "type":"string"
1072
+ },
1073
+ "common":{
1074
+ "type":"string"
1075
+ }
1076
+ }
1077
+ },
1078
+ "ces":{
1079
+ "type":"object",
1080
+ "properties":{
1081
+ "official":{
1082
+ "type":"string"
1083
+ },
1084
+ "common":{
1085
+ "type":"string"
1086
+ }
1087
+ }
1088
+ },
1089
+ "cym":{
1090
+ "type":"object",
1091
+ "properties":{
1092
+ "official":{
1093
+ "type":"string"
1094
+ },
1095
+ "common":{
1096
+ "type":"string"
1097
+ }
1098
+ }
1099
+ },
1100
+ "deu":{
1101
+ "type":"object",
1102
+ "properties":{
1103
+ "official":{
1104
+ "type":"string"
1105
+ },
1106
+ "common":{
1107
+ "type":"string"
1108
+ }
1109
+ }
1110
+ },
1111
+ "est":{
1112
+ "type":"object",
1113
+ "properties":{
1114
+ "official":{
1115
+ "type":"string"
1116
+ },
1117
+ "common":{
1118
+ "type":"string"
1119
+ }
1120
+ }
1121
+ },
1122
+ "fin":{
1123
+ "type":"object",
1124
+ "properties":{
1125
+ "official":{
1126
+ "type":"string"
1127
+ },
1128
+ "common":{
1129
+ "type":"string"
1130
+ }
1131
+ }
1132
+ },
1133
+ "fra":{
1134
+ "type":"object",
1135
+ "properties":{
1136
+ "official":{
1137
+ "type":"string"
1138
+ },
1139
+ "common":{
1140
+ "type":"string"
1141
+ }
1142
+ }
1143
+ },
1144
+ "hrv":{
1145
+ "type":"object",
1146
+ "properties":{
1147
+ "official":{
1148
+ "type":"string"
1149
+ },
1150
+ "common":{
1151
+ "type":"string"
1152
+ }
1153
+ }
1154
+ },
1155
+ "hun":{
1156
+ "type":"object",
1157
+ "properties":{
1158
+ "official":{
1159
+ "type":"string"
1160
+ },
1161
+ "common":{
1162
+ "type":"string"
1163
+ }
1164
+ }
1165
+ },
1166
+ "ita":{
1167
+ "type":"object",
1168
+ "properties":{
1169
+ "official":{
1170
+ "type":"string"
1171
+ },
1172
+ "common":{
1173
+ "type":"string"
1174
+ }
1175
+ }
1176
+ },
1177
+ "jpn":{
1178
+ "type":"object",
1179
+ "properties":{
1180
+ "official":{
1181
+ "type":"string"
1182
+ },
1183
+ "common":{
1184
+ "type":"string"
1185
+ }
1186
+ }
1187
+ },
1188
+ "kor":{
1189
+ "type":"object",
1190
+ "properties":{
1191
+ "official":{
1192
+ "type":"string"
1193
+ },
1194
+ "common":{
1195
+ "type":"string"
1196
+ }
1197
+ }
1198
+ },
1199
+ "nld":{
1200
+ "type":"object",
1201
+ "properties":{
1202
+ "official":{
1203
+ "type":"string"
1204
+ },
1205
+ "common":{
1206
+ "type":"string"
1207
+ }
1208
+ }
1209
+ },
1210
+ "per":{
1211
+ "type":"object",
1212
+ "properties":{
1213
+ "official":{
1214
+ "type":"string"
1215
+ },
1216
+ "common":{
1217
+ "type":"string"
1218
+ }
1219
+ }
1220
+ },
1221
+ "pol":{
1222
+ "type":"object",
1223
+ "properties":{
1224
+ "official":{
1225
+ "type":"string"
1226
+ },
1227
+ "common":{
1228
+ "type":"string"
1229
+ }
1230
+ }
1231
+ },
1232
+ "por":{
1233
+ "type":"object",
1234
+ "properties":{
1235
+ "official":{
1236
+ "type":"string"
1237
+ },
1238
+ "common":{
1239
+ "type":"string"
1240
+ }
1241
+ }
1242
+ },
1243
+ "rus":{
1244
+ "type":"object",
1245
+ "properties":{
1246
+ "official":{
1247
+ "type":"string"
1248
+ },
1249
+ "common":{
1250
+ "type":"string"
1251
+ }
1252
+ }
1253
+ },
1254
+ "slk":{
1255
+ "type":"object",
1256
+ "properties":{
1257
+ "official":{
1258
+ "type":"string"
1259
+ },
1260
+ "common":{
1261
+ "type":"string"
1262
+ }
1263
+ }
1264
+ },
1265
+ "spa":{
1266
+ "type":"object",
1267
+ "properties":{
1268
+ "official":{
1269
+ "type":"string"
1270
+ },
1271
+ "common":{
1272
+ "type":"string"
1273
+ }
1274
+ }
1275
+ },
1276
+ "swe":{
1277
+ "type":"object",
1278
+ "properties":{
1279
+ "official":{
1280
+ "type":"string"
1281
+ },
1282
+ "common":{
1283
+ "type":"string"
1284
+ }
1285
+ }
1286
+ },
1287
+ "urd":{
1288
+ "type":"object",
1289
+ "properties":{
1290
+ "official":{
1291
+ "type":"string"
1292
+ },
1293
+ "common":{
1294
+ "type":"string"
1295
+ }
1296
+ }
1297
+ },
1298
+ "zho":{
1299
+ "type":"object",
1300
+ "properties":{
1301
+ "official":{
1302
+ "type":"string"
1303
+ },
1304
+ "common":{
1305
+ "type":"string"
1306
+ }
1307
+ }
1308
+ }
1309
+ }
1310
+ },
1311
+ "latlng":{
1312
+ "type":"array",
1313
+ "items":{
1314
+ "type":"number"
1315
+ }
1316
+ },
1317
+ "landlocked":{
1318
+ "type":"boolean"
1319
+ },
1320
+ "borders":{
1321
+ "type":"array",
1322
+ "items":{
1323
+ "type":"string"
1324
+ }
1325
+ },
1326
+ "area":{
1327
+ "type":"number"
1328
+ },
1329
+ "flag":{
1330
+ "type":"string"
1331
+ },
1332
+ "demonyms":{
1333
+ "type":"object",
1334
+ "properties":{
1335
+ "eng":{
1336
+ "type":"object",
1337
+ "properties":{
1338
+ "f":{
1339
+ "type":"string"
1340
+ },
1341
+ "m":{
1342
+ "type":"string"
1343
+ }
1344
+ }
1345
+ },
1346
+ "fra":{
1347
+ "type":"object",
1348
+ "properties":{
1349
+ "f":{
1350
+ "type":"string"
1351
+ },
1352
+ "m":{
1353
+ "type":"string"
1354
+ }
1355
+ }
1356
+ }
1357
+ }
1358
+ },
1359
+ "flags":{
1360
+ "type":"array",
1361
+ "items":{
1362
+ "type":"string"
1363
+ }
1364
+ },
1365
+ "population":{
1366
+ "type":"number"
1367
+ },
1368
+ "maps":{
1369
+ "type":"object",
1370
+ "properties":{
1371
+ "googleMaps":{
1372
+ "type":"string"
1373
+ },
1374
+ "openStreetMaps":{
1375
+ "type":"string"
1376
+ }
1377
+ }
1378
+ },
1379
+ "gini":{
1380
+ "type":"object",
1381
+ "properties":{
1382
+ "2011":{
1383
+ "type":"number"
1384
+ }
1385
+ }
1386
+ },
1387
+ "car":{
1388
+ "type":"object",
1389
+ "properties":{
1390
+ "signs":{
1391
+ "type":"array",
1392
+ "items":{
1393
+ "type":"string"
1394
+ }
1395
+ },
1396
+ "side":{
1397
+ "type":"string"
1398
+ }
1399
+ }
1400
+ },
1401
+ "timezones":{
1402
+ "type":"array",
1403
+ "items":{
1404
+ "type":"string"
1405
+ }
1406
+ },
1407
+ "postal":{
1408
+ "type":"string"
1409
+ }
1410
+ }
1411
+ }
1412
+ }
1413
+ }
1414
+ ]
1415
+ }
toolbench/toolenv/tools/Location/rest_country_api/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 getbyuniqueid(uniqueids: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Returns a single pet"
12
+ uniqueids: name, cca2, cca3, fifa
13
+
14
+ """
15
+ url = f"https://rest-country-api.p.rapidapi.com/{uniqueids}"
16
+ querystring = {}
17
+
18
+ headers = {
19
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
20
+ "X-RapidAPI-Host": "rest-country-api.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 allcountries(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
32
+ """
33
+ "Returns all countries and its details in single api request"
34
+
35
+ """
36
+ url = f"https://rest-country-api.p.rapidapi.com/"
37
+ querystring = {}
38
+
39
+ headers = {
40
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
41
+ "X-RapidAPI-Host": "rest-country-api.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/Location/reverse_geocode.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"reverse geocode",
3
+ "tool_description":"reverse geocoding",
4
+ "title":"reverse geocode",
5
+ "pricing":"FREE",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/mapapi/api/reverse-geocode/",
8
+ "host":"reverse-geocode.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"reverse",
12
+ "url":"https://reverse-geocode.p.rapidapi.com/reverse?lat=35.732474329636865&lon=51.42287135124207",
13
+ "description":"reverse geocode",
14
+ "method":"GET",
15
+ "required_parameters":[],
16
+ "optional_parameters":[
17
+ {
18
+ "name":"x-api-key",
19
+ "type":"STRING",
20
+ "description":"",
21
+ "default":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImM5MTU3ZGM5NTlkNGIyNGZiYTE2NWVhZDMxMTllYWQwMWIyNDNjYmNjNGY3ZDg2MTYzZGZjMmE4OGJiYmM4MmE1YmFkOWYyZjRkMjJmYTIwIn0.eyJhdWQiOiI3NTMwIiwianRpIjoiYzkxNTdkYzk1OWQ0YjI0ZmJhMTY1ZWFkMzExOWVhZDAxYjI0M2NiY2M0ZjdkODYxNjNkZmMyYTg4YmJiYzgyYTViYWQ5ZjJmNGQyMmZhMjAiLCJpYXQiOjE1NzkwMDYzODcsIm5iZiI6MTU3OTAwNjM4NywiZXhwIjoxNTgxNTExOTg3LCJzdWIiOiIiLCJzY29wZXMiOlsiYmFzaWMiXX0.k9U7-8rT-qVxPKXOABRBdN99W6ejTelUyYrPwpnSeQ72S8LoFffFWBueiwwSyxpbAj4Fb-FjHomaORA_nb0_HaIPCD7Bz6ZgacE5cSXP-10z7rgDFSu-J3q7tNXD6vGcY6s18hMfBh4l1xrPnjmtwhAhN_e5ILTxwJbRBtBVXmQ6OZKmf1gJmF0rF-OQ1kCt8CmnvRgQLGtOanbQbM0mCoCbfh81zBcJQ7l6s-PLhTFuXhepm6cyBmpGOAu1YLeUTX4yXVUOaUtJpGE6rNR1WeGGCm91eXv_nEd_N5VAq90Mv235DSvrx_I37VrNb3G9xn1SO1STk3O6j0AEitjCWQ"
22
+ }
23
+ ],
24
+ "code":"import requests\n\nurl = \"https://reverse-geocode.p.rapidapi.com/reverse?lat=35.732474329636865&lon=51.42287135124207\"\nquerystring = {\"x-api-key\": x_api_key}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"reverse-geocode.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
25
+ "statuscode":111,
26
+ "body":"",
27
+ "headers":"",
28
+ "schema":""
29
+ }
30
+ ]
31
+ }
toolbench/toolenv/tools/Location/reverse_geocode/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 reverse(x_api_key: str='eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImM5MTU3ZGM5NTlkNGIyNGZiYTE2NWVhZDMxMTllYWQwMWIyNDNjYmNjNGY3ZDg2MTYzZGZjMmE4OGJiYmM4MmE1YmFkOWYyZjRkMjJmYTIwIn0.eyJhdWQiOiI3NTMwIiwianRpIjoiYzkxNTdkYzk1OWQ0YjI0ZmJhMTY1ZWFkMzExOWVhZDAxYjI0M2NiY2M0ZjdkODYxNjNkZmMyYTg4YmJiYzgyYTViYWQ5ZjJmNGQyMmZhMjAiLCJpYXQiOjE1NzkwMDYzODcsIm5iZiI6MTU3OTAwNjM4NywiZXhwIjoxNTgxNTExOTg3LCJzdWIiOiIiLCJzY29wZXMiOlsiYmFzaWMiXX0.k9U7-8rT-qVxPKXOABRBdN99W6ejTelUyYrPwpnSeQ72S8LoFffFWBueiwwSyxpbAj4Fb-FjHomaORA_nb0_HaIPCD7Bz6ZgacE5cSXP-10z7rgDFSu-J3q7tNXD6vGcY6s18hMfBh4l1xrPnjmtwhAhN_e5ILTxwJbRBtBVXmQ6OZKmf1gJmF0rF-OQ1kCt8CmnvRgQLGtOanbQbM0mCoCbfh81zBcJQ7l6s-PLhTFuXhepm6cyBmpGOAu1YLeUTX4yXVUOaUtJpGE6rNR1WeGGCm91eXv_nEd_N5VAq90Mv235DSvrx_I37VrNb3G9xn1SO1STk3O6j0AEitjCWQ', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "reverse geocode"
12
+
13
+ """
14
+ url = f"https://reverse-geocode.p.rapidapi.com/reverse?lat=35.732474329636865&lon=51.42287135124207"
15
+ querystring = {}
16
+ if x_api_key:
17
+ querystring['x-api-key'] = x_api_key
18
+
19
+ headers = {
20
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
21
+ "X-RapidAPI-Host": "reverse-geocode.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/Location/reverse_geocoder.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Reverse Geocoder",
3
+ "tool_description":"North America Forward Geocoder",
4
+ "title":"Reverse Geocoder",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/axl632/api/reverse-geocoder2/",
8
+ "host":"reverse-geocoder2.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"search",
12
+ "url":"https://reverse-geocoder2.p.rapidapi.com/",
13
+ "description":"Forward geocoder",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"text",
18
+ "type":"STRING",
19
+ "description":"",
20
+ "default":"1901 main st "
21
+ }
22
+ ],
23
+ "optional_parameters":[],
24
+ "code":"import requests\n\nurl = \"https://reverse-geocoder2.p.rapidapi.com/\"\nquerystring = {\"text\": text}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"reverse-geocoder2.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
25
+ "statuscode":111,
26
+ "body":"",
27
+ "headers":"",
28
+ "schema":""
29
+ }
30
+ ]
31
+ }
toolbench/toolenv/tools/Location/reverse_geocoder/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 search(text: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Forward geocoder"
12
+
13
+ """
14
+ url = f"https://reverse-geocoder2.p.rapidapi.com/"
15
+ querystring = {'text': text, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "reverse-geocoder2.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/Location/reverse_geocoding/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 new_user(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "dthyjh"
12
+
13
+ """
14
+ url = f"https://reverse-geocoding2.p.rapidapi.com/"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "reverse-geocoding2.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/Location/reverse_geocoding_to_city.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Reverse Geocoding to City",
3
+ "tool_description":"This API converts latitude and longitude into an address.",
4
+ "title":"Reverse Geocoding to City",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":22,
9
+ "avgSuccessRate":100,
10
+ "popularityScore":8.9,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/bigdatacloud-pty-ltd-bigdatacloud-pty-ltd-default/api/reverse-geocoding-to-city/",
14
+ "host":"reverse-geocoding-to-city.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Reverse Geocoding API",
18
+ "url":"https://reverse-geocoding-to-city.p.rapidapi.com/data/reverse-geocode",
19
+ "description":"Converts latitude and longitude into address.",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"latitude",
24
+ "type":"NUMBER",
25
+ "description":"",
26
+ "default":"34.9403"
27
+ },
28
+ {
29
+ "name":"longitude",
30
+ "type":"NUMBER",
31
+ "description":"",
32
+ "default":"138.5888"
33
+ }
34
+ ],
35
+ "optional_parameters":[
36
+ {
37
+ "name":"localityLanguage",
38
+ "type":"STRING",
39
+ "description":"",
40
+ "default":"en"
41
+ }
42
+ ],
43
+ "code":"import requests\n\nurl = \"https://reverse-geocoding-to-city.p.rapidapi.com/data/reverse-geocode\"\nquerystring = {\"latitude\": latitude, \"longitude\": longitude, \"localityLanguage\": localitylanguage}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"reverse-geocoding-to-city.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
44
+ "statuscode":111,
45
+ "body":"",
46
+ "headers":"",
47
+ "schema":""
48
+ }
49
+ ]
50
+ }
toolbench/toolenv/tools/Location/reverse_geocoding_to_city/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 reverse_geocoding_api(latitude: int, longitude: int, localitylanguage: str='en', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Converts latitude and longitude into address."
12
+
13
+ """
14
+ url = f"https://reverse-geocoding-to-city.p.rapidapi.com/data/reverse-geocode"
15
+ querystring = {'latitude': latitude, 'longitude': longitude, }
16
+ if localitylanguage:
17
+ querystring['localityLanguage'] = localitylanguage
18
+
19
+ headers = {
20
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
21
+ "X-RapidAPI-Host": "reverse-geocoding-to-city.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/Location/reverse_geocoding_v2.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "api_563a461c-c125-4880-aaf6-b77402ebc71d",
3
+ "tool_description": "This API gets address from a lat-long and latlong from a respective address.",
4
+ "home_url": "https://rapidapi.com/idfy-idfy-default/api/reverse-geocoding3/",
5
+ "name": "Reverse Geocoding_v2",
6
+ "title": "Reverse Geocoding",
7
+ "pricing": "FREEMIUM",
8
+ "tool_name": "Reverse Geocoding_v2",
9
+ "score": {
10
+ "avgServiceLevel": 100,
11
+ "avgLatency": 153,
12
+ "avgSuccessRate": 92,
13
+ "popularityScore": 7.7,
14
+ "__typename": "Score"
15
+ },
16
+ "host": "reverse-geocoding3.p.rapidapi.com",
17
+ "api_list": [
18
+ {
19
+ "name": "GET Call",
20
+ "url": "https://reverse-geocoding3.p.rapidapi.com/v3/tasks",
21
+ "description": "Used to fetch api result using the request id received in responses.",
22
+ "method": "GET",
23
+ "required_parameters": [
24
+ {
25
+ "name": "request_id",
26
+ "type": "STRING",
27
+ "description": "",
28
+ "default": "68bbb910-da9b-4d8a-9a1d-4bd878b19846"
29
+ }
30
+ ],
31
+ "optional_parameters": [],
32
+ "code": "import requests\n\nurl = \"https://reverse-geocoding3.p.rapidapi.com/v3/tasks\"\nquerystring = {\"request_id\": \"68bbb910-da9b-4d8a-9a1d-4bd878b19846\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"reverse-geocoding3.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
33
+ "convert_code": "import requests\n\nurl = \"https://reverse-geocoding3.p.rapidapi.com/v3/tasks\"\nquerystring = {\"request_id\": \"68bbb910-da9b-4d8a-9a1d-4bd878b19846\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"reverse-geocoding3.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
34
+ "test_endpoint": ""
35
+ }
36
+ ],
37
+ "standardized_name": "reverse_geocoding_v2"
38
+ }
toolbench/toolenv/tools/Location/reverse_geocoding_v2/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 get_call(request_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Used to fetch api result using the request id received in responses."
12
+
13
+ """
14
+ url = f"https://reverse-geocoding3.p.rapidapi.com/v3/tasks"
15
+ querystring = {'request_id': request_id, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "reverse-geocoding3.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/Location/reverse_geocoding_v3.json ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "api_910fde30-1645-458e-92f5-bcb9b183e132",
3
+ "tool_description": "Translate locations on the map into human-readable addresses.",
4
+ "home_url": "https://rapidapi.com/outscraper-inc-outscraper-inc-default/api/reverse-geocoding5/",
5
+ "name": "Reverse Geocoding_v3",
6
+ "title": "Reverse Geocoding",
7
+ "pricing": "FREEMIUM",
8
+ "tool_name": "Reverse Geocoding_v3",
9
+ "score": {
10
+ "avgServiceLevel": 100,
11
+ "avgLatency": 3318,
12
+ "avgSuccessRate": 100,
13
+ "popularityScore": 7.4,
14
+ "__typename": "Score"
15
+ },
16
+ "host": "reverse-geocoding5.p.rapidapi.com",
17
+ "api_list": [
18
+ {
19
+ "name": "Reverse Geocoding",
20
+ "url": "https://reverse-geocoding5.p.rapidapi.com/reverse-geocoding",
21
+ "description": "Translate locations on the map into human-readable addresses.",
22
+ "method": "GET",
23
+ "required_parameters": [
24
+ {
25
+ "name": "query",
26
+ "type": "STRING",
27
+ "description": "",
28
+ "default": "40.7624284 -73.973794"
29
+ }
30
+ ],
31
+ "optional_parameters": [],
32
+ "code": "import requests\n\nurl = \"https://reverse-geocoding5.p.rapidapi.com/reverse-geocoding\"\nquerystring = {\"query\": \"40.7624284 -73.973794\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"reverse-geocoding5.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
33
+ "convert_code": "import requests\n\nurl = \"https://reverse-geocoding5.p.rapidapi.com/reverse-geocoding\"\nquerystring = {\"query\": \"40.7624284 -73.973794\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"reverse-geocoding5.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
34
+ "test_endpoint": "",
35
+ "statuscode": 200,
36
+ "schema": {
37
+ "type": "object",
38
+ "properties": {
39
+ "id": {
40
+ "type": "string"
41
+ },
42
+ "status": {
43
+ "type": "string"
44
+ },
45
+ "data": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "object",
49
+ "properties": {
50
+ "query": {
51
+ "type": "string"
52
+ },
53
+ "address": {
54
+ "type": "string"
55
+ },
56
+ "city": {
57
+ "type": "string"
58
+ },
59
+ "country_code": {
60
+ "type": "string"
61
+ },
62
+ "county": {
63
+ "type": "string"
64
+ },
65
+ "photo": {
66
+ "type": "string"
67
+ },
68
+ "plus_code": {
69
+ "type": "string"
70
+ },
71
+ "postal_code": {
72
+ "type": "string"
73
+ },
74
+ "state": {
75
+ "type": "string"
76
+ },
77
+ "street": {
78
+ "type": "string"
79
+ },
80
+ "time_zone": {
81
+ "type": "string"
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ ],
90
+ "standardized_name": "reverse_geocoding_v3"
91
+ }
toolbench/toolenv/tools/Location/reverse_geocoding_v3/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 reverse_geocoding(query: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Translate locations on the map into human-readable addresses."
12
+
13
+ """
14
+ url = f"https://reverse-geocoding5.p.rapidapi.com/reverse-geocoding"
15
+ querystring = {'query': query, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "reverse-geocoding5.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/Location/reverse_geocoding_with_timezone.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Reverse Geocoding with Timezone",
3
+ "tool_description":"This API provides locality and time zone information based on the latitude and longitude input data.",
4
+ "title":"Reverse Geocoding with Timezone",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/bigdatacloud-pty-ltd-bigdatacloud-pty-ltd-default/api/reverse-geocoding-with-timezone/",
8
+ "host":"reverse-geocoding-with-timezone.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Reverse Geocoding with Timezone",
12
+ "url":"https://reverse-geocoding-with-timezone.p.rapidapi.com/data/reverse-geocode-with-timezone",
13
+ "description":"Provides additional Time Zone info based on geo-coordinates.",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"latitude",
18
+ "type":"NUMBER",
19
+ "description":"",
20
+ "default":"34.94034"
21
+ },
22
+ {
23
+ "name":"longitude",
24
+ "type":"NUMBER",
25
+ "description":"",
26
+ "default":"138.5888"
27
+ }
28
+ ],
29
+ "optional_parameters":[
30
+ {
31
+ "name":"localityLanguage",
32
+ "type":"STRING",
33
+ "description":"",
34
+ "default":"en"
35
+ }
36
+ ],
37
+ "code":"import requests\n\nurl = \"https://reverse-geocoding-with-timezone.p.rapidapi.com/data/reverse-geocode-with-timezone\"\nquerystring = {\"latitude\": latitude, \"localityLanguage\": localitylanguage, \"longitude\": longitude}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"reverse-geocoding-with-timezone.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
38
+ "statuscode":111,
39
+ "body":"",
40
+ "headers":"",
41
+ "schema":""
42
+ }
43
+ ]
44
+ }
toolbench/toolenv/tools/Location/reverse_geocoding_with_timezone/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 reverse_geocoding_with_timezone(latitude: int, longitude: int, localitylanguage: str='en', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Provides additional Time Zone info based on geo-coordinates."
12
+
13
+ """
14
+ url = f"https://reverse-geocoding-with-timezone.p.rapidapi.com/data/reverse-geocode-with-timezone"
15
+ querystring = {'latitude': latitude, 'longitude': longitude, }
16
+ if localitylanguage:
17
+ querystring['localityLanguage'] = localitylanguage
18
+
19
+ headers = {
20
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
21
+ "X-RapidAPI-Host": "reverse-geocoding-with-timezone.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/Location/reverse_geolocation.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Reverse Geolocation",
3
+ "tool_description":"Lookup cities and countries using Longitude and Latitude",
4
+ "title":"Reverse Geolocation",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/whattohec/api/reverse-geolocation/",
8
+ "host":"reverse-geolocation.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"read_root__get",
12
+ "url":"https://reverse-geolocation.p.rapidapi.com/",
13
+ "description":" ",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"lat",
18
+ "type":"NUMBER",
19
+ "description":"",
20
+ "default":""
21
+ },
22
+ {
23
+ "name":"lon",
24
+ "type":"NUMBER",
25
+ "description":"",
26
+ "default":""
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://reverse-geolocation.p.rapidapi.com/\"\nquerystring = {\"lat\": lat, \"lon\": lon}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"reverse-geolocation.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
31
+ "statuscode":200,
32
+ "body":{},
33
+ "headers":{},
34
+ "schema":{}
35
+ }
36
+ ]
37
+ }
toolbench/toolenv/tools/Location/reverse_geolocation/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 read_root_get(lat: int, lon: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ " "
12
+
13
+ """
14
+ url = f"https://reverse-geolocation.p.rapidapi.com/"
15
+ querystring = {'lat': lat, 'lon': lon, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "reverse-geolocation.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
+