@apifreaks/openapi-specs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +156 -0
- package/dist/index.cjs +44663 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +44631 -0
- package/package.json +81 -0
- package/specs/commodity/commodity-fluctuation.json +301 -0
- package/specs/commodity/commodity-prices.json +317 -0
- package/specs/commodity/commodity-symbols.json +215 -0
- package/specs/commodity/commodity-time-series.json +329 -0
- package/specs/commodity/historical-commodity-prices.json +273 -0
- package/specs/currency/currency-converter.json +261 -0
- package/specs/currency/currency-fluctuation.json +282 -0
- package/specs/currency/currency-historical-data-limit.json +158 -0
- package/specs/currency/currency-rate.json +229 -0
- package/specs/currency/currency-supported.json +234 -0
- package/specs/currency/currency-symbols.json +161 -0
- package/specs/currency/currency-time-series.json +325 -0
- package/specs/currency/geolocalized-currency-conversion.json +287 -0
- package/specs/currency/historical-currency-converter.json +269 -0
- package/specs/currency/historical-currency-rate.json +246 -0
- package/specs/dns/bulk-dns-lookup.json +624 -0
- package/specs/dns/dns-history-lookup.json +579 -0
- package/specs/dns/dns-lookup.json +466 -0
- package/specs/dns/reverse-dns-lookup.json +414 -0
- package/specs/domain/bulk-domain-checker.json +284 -0
- package/specs/domain/domain-search-with-suggestions.json +280 -0
- package/specs/domain/domain-search.json +206 -0
- package/specs/domain/subdomain-lookup.json +343 -0
- package/specs/email-validation/bulk-email-validation.json +534 -0
- package/specs/email-validation/email-checker.json +586 -0
- package/specs/financial/bulk-vat-rates-country.json +341 -0
- package/specs/financial/financial-apis-supported-countries.json +204 -0
- package/specs/financial/iban-validation.json +328 -0
- package/specs/financial/swift-code-finder.json +192 -0
- package/specs/financial/swift-code-lookup.json +220 -0
- package/specs/financial/vat-number-validation.json +283 -0
- package/specs/financial/vat-rates-by-ip.json +275 -0
- package/specs/financial/vat-rates-country.json +288 -0
- package/specs/general/usage-credits.json +218 -0
- package/specs/geocoding/forward-geocoding.json +402 -0
- package/specs/geocoding/reverse-geocoding.json +326 -0
- package/specs/geodb/administrative-units-details.json +250 -0
- package/specs/geodb/administrative-units-levels.json +198 -0
- package/specs/geodb/administrative-units.json +237 -0
- package/specs/geodb/cities.json +288 -0
- package/specs/geodb/countries-details.json +274 -0
- package/specs/geodb/countries.json +276 -0
- package/specs/geodb/flags-supported.json +166 -0
- package/specs/geodb/flags.json +227 -0
- package/specs/geodb/regions.json +109 -0
- package/specs/geodb/subregions.json +217 -0
- package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
- package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
- package/specs/ip-intelligence/ip-locator.json +941 -0
- package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
- package/specs/other/astronomy-data.json +803 -0
- package/specs/pdf/delete-pdf-page.json +286 -0
- package/specs/pdf/linearize-pdf.json +277 -0
- package/specs/pdf/merge-pdf.json +285 -0
- package/specs/pdf/pdf-compress.json +304 -0
- package/specs/pdf/pdf-decrypt.json +297 -0
- package/specs/pdf/pdf-encrypt.json +314 -0
- package/specs/pdf/pdf-extract-pages.json +295 -0
- package/specs/pdf/pdf-file-status.json +208 -0
- package/specs/pdf/pdf-file.json +190 -0
- package/specs/pdf/pdf-files.json +126 -0
- package/specs/pdf/pdf-resource-download.json +168 -0
- package/specs/pdf/pdf-resource-upload-binary.json +218 -0
- package/specs/pdf/pdf-resource-upload.json +248 -0
- package/specs/pdf/pdf-restrict.json +343 -0
- package/specs/pdf/pdf-split-pages.json +281 -0
- package/specs/pdf/pdf-task-status.json +252 -0
- package/specs/pdf/pdf-to-image.json +1219 -0
- package/specs/pdf/pdf-unrestrict.json +324 -0
- package/specs/pdf/rotate-pdf-pages.json +305 -0
- package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
- package/specs/phone-validation/phone-number-validation.json +456 -0
- package/specs/scraper/web-scraper.json +674 -0
- package/specs/screenshot/bulk-screenshot.json +949 -0
- package/specs/screenshot/website-screenshot.json +1147 -0
- package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
- package/specs/ssl/ssl-certificate-lookup.json +634 -0
- package/specs/timezone/timezone-converter.json +362 -0
- package/specs/timezone/timezone-lookup.json +910 -0
- package/specs/user-agent/bulk-user-agent-parser.json +441 -0
- package/specs/user-agent/user-agent-parser.json +346 -0
- package/specs/weather/air-quality.json +779 -0
- package/specs/weather/bulk-live-weather.json +834 -0
- package/specs/weather/flood-forecast.json +693 -0
- package/specs/weather/historical-weather.json +1019 -0
- package/specs/weather/live-weather.json +789 -0
- package/specs/weather/marine-weather.json +940 -0
- package/specs/weather/time-series-weather.json +1056 -0
- package/specs/weather/weather-forecast.json +1202 -0
- package/specs/whois/asn-lookup.json +729 -0
- package/specs/whois/bulk-whois-lookup.json +698 -0
- package/specs/whois/domain-whois-history-lookup.json +500 -0
- package/specs/whois/reverse-whois.json +625 -0
- package/specs/whois/whois-domain-lookup.json +533 -0
- package/specs/whois/whois-ip-lookup.json +1110 -0
- package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
- package/specs/zip-code/zip-code-api.json +299 -0
- package/specs/zip-code/zip-code-distance-match.json +311 -0
- package/specs/zip-code/zip-code-distance.json +307 -0
- package/specs/zip-code/zip-codes-by-city.json +279 -0
- package/specs/zip-code/zip-codes-by-region.json +278 -0
- package/specs/zip-code/zip-codes-radius-search.json +349 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Cities API - Get City Data for Any Country",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Retrieve all cities for a given country with their latitude, longitude, administrative unit details, and ISO country code. Uses ISO 3166-1 alpha-2 country codes. Optionally filter by administrative unit code using the `admin_unit` parameter to narrow results to a specific region or province; an admin_unit code that doesn't exist for the country returns a 400 error here (unlike the Administrative Units endpoint's admin_level filter, which returns an empty array for an unknown level). Each city result includes name, coordinates, admin unit information (name, code, level), and the two-letter country code. There is no pagination: large countries return every city in one response. A valid country code is required.",
|
|
7
|
+
"contact": {
|
|
8
|
+
"name": "APIFreaks Support",
|
|
9
|
+
"url": "https://apifreaks.com/contact",
|
|
10
|
+
"email": "support@apifreaks.com"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"servers": [
|
|
14
|
+
{
|
|
15
|
+
"url": "https://api.apifreaks.com/v1.0",
|
|
16
|
+
"description": "Cities API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/geo/cities": {
|
|
21
|
+
"get": {
|
|
22
|
+
"tags": ["GeoDB APIs"],
|
|
23
|
+
"summary": "Retrieve cities for a country with optional admin unit filtering",
|
|
24
|
+
"description": "Returns all cities for a country, optionally filtered by administrative unit. Each city includes name, coordinates, admin unit details, and ISO country code.",
|
|
25
|
+
"operationId": "getCities",
|
|
26
|
+
"parameters": [
|
|
27
|
+
{
|
|
28
|
+
"name": "format",
|
|
29
|
+
"in": "query",
|
|
30
|
+
"required": false,
|
|
31
|
+
"description": "Format of the response. Possible values: json, xml.",
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": ["json", "xml"],
|
|
35
|
+
"default": "json"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "country",
|
|
40
|
+
"in": "query",
|
|
41
|
+
"required": true,
|
|
42
|
+
"description": "Country code in ISO 3166-1 alpha-2 format (e.g., US, PK).",
|
|
43
|
+
"schema": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "admin_unit",
|
|
49
|
+
"in": "query",
|
|
50
|
+
"required": false,
|
|
51
|
+
"description": "Administrative unit code used to filter cities within a specific region. An admin_unit code that doesn't exist for the specified country returns a 400 error, not an empty result.",
|
|
52
|
+
"schema": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"responses": {
|
|
58
|
+
"200": {
|
|
59
|
+
"description": "Successful response with list of cities",
|
|
60
|
+
"content": {
|
|
61
|
+
"application/json": {
|
|
62
|
+
"schema": {
|
|
63
|
+
"$ref": "#/components/schemas/CitiesResponse"
|
|
64
|
+
},
|
|
65
|
+
"examples": {
|
|
66
|
+
"typicalSuccess": {
|
|
67
|
+
"summary": "Typical successful response",
|
|
68
|
+
"value": {
|
|
69
|
+
"cities": [
|
|
70
|
+
{
|
|
71
|
+
"name": "Aberdeen",
|
|
72
|
+
"latitude": 57.14369,
|
|
73
|
+
"longitude": -2.09814,
|
|
74
|
+
"admin_unit": {
|
|
75
|
+
"name": "Aberdeen",
|
|
76
|
+
"admin_code": "ABE",
|
|
77
|
+
"admin_level": "council area"
|
|
78
|
+
},
|
|
79
|
+
"iso_alpha_2": "GB"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "Balmedie",
|
|
83
|
+
"latitude": 57.25052,
|
|
84
|
+
"longitude": -2.06163,
|
|
85
|
+
"admin_unit": {
|
|
86
|
+
"name": "Aberdeen",
|
|
87
|
+
"admin_code": "ABE",
|
|
88
|
+
"admin_level": "council area"
|
|
89
|
+
},
|
|
90
|
+
"iso_alpha_2": "GB"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"400": {
|
|
100
|
+
"description": "Bad Request — Missing country parameter, invalid country code, or admin_unit code not found for the country",
|
|
101
|
+
"content": {
|
|
102
|
+
"application/json": {
|
|
103
|
+
"schema": {
|
|
104
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
105
|
+
},
|
|
106
|
+
"examples": {
|
|
107
|
+
"MissingCountry": {
|
|
108
|
+
"summary": "Missing required country parameter",
|
|
109
|
+
"value": {
|
|
110
|
+
"error": "Invalid Param Exception",
|
|
111
|
+
"message": "please pass correct parameters",
|
|
112
|
+
"path": "/v1.0/geo/cities",
|
|
113
|
+
"status": 400,
|
|
114
|
+
"timestamp": "2026-07-24T10:56:41.424Z"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"InvalidCountryCode": {
|
|
118
|
+
"summary": "Malformed or unrecognized country code",
|
|
119
|
+
"value": {
|
|
120
|
+
"timestamp": "2026-07-24T10:56:41.913Z",
|
|
121
|
+
"path": "/v1/cities",
|
|
122
|
+
"status": 400,
|
|
123
|
+
"error": "Invalid Country Code provided",
|
|
124
|
+
"message": "Only ISO 3166-1 alpha-2 codes country codes are supported."
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"InvalidAdminCode": {
|
|
128
|
+
"summary": "admin_unit code does not exist for the given country",
|
|
129
|
+
"value": {
|
|
130
|
+
"timestamp": "2026-07-24T10:56:42.419Z",
|
|
131
|
+
"path": "/v1/cities",
|
|
132
|
+
"status": 400,
|
|
133
|
+
"error": "Invalid Admin Code provided",
|
|
134
|
+
"message": "Please provide a valid admin code."
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"404": {
|
|
142
|
+
"description": "Not Found — Country is a recognized ISO 3166-1 alpha-2 code but has no cities in the database (e.g. Vatican City)",
|
|
143
|
+
"content": {
|
|
144
|
+
"application/json": {
|
|
145
|
+
"schema": {
|
|
146
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
147
|
+
},
|
|
148
|
+
"examples": {
|
|
149
|
+
"NoCities": {
|
|
150
|
+
"summary": "No cities for this country",
|
|
151
|
+
"value": {
|
|
152
|
+
"timestamp": "2026-07-24T10:56:42.941Z",
|
|
153
|
+
"path": "/v1/cities",
|
|
154
|
+
"status": 404,
|
|
155
|
+
"error": "No Cities present in country",
|
|
156
|
+
"message": "This country does not have any cities associated with it."
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"components": {
|
|
168
|
+
"securitySchemes": {
|
|
169
|
+
"ApiKeyAuthHeader": {
|
|
170
|
+
"type": "apiKey",
|
|
171
|
+
"in": "header",
|
|
172
|
+
"name": "X-apiKey",
|
|
173
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
174
|
+
},
|
|
175
|
+
"ApiKeyAuthQuery": {
|
|
176
|
+
"type": "apiKey",
|
|
177
|
+
"in": "query",
|
|
178
|
+
"name": "apiKey",
|
|
179
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"schemas": {
|
|
183
|
+
"CitiesResponse": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"description": "Response containing every city for the requested country (optionally filtered by admin_unit), returned unpaginated in a single array.",
|
|
186
|
+
"required": ["cities"],
|
|
187
|
+
"properties": {
|
|
188
|
+
"cities": {
|
|
189
|
+
"type": "array",
|
|
190
|
+
"description": "An array of city objects for the specified country, optionally filtered by admin unit.",
|
|
191
|
+
"items": {
|
|
192
|
+
"$ref": "#/components/schemas/CityItem"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"CityItem": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"description": "A city object containing name, coordinates, admin unit, and country code.",
|
|
200
|
+
"required": [
|
|
201
|
+
"name",
|
|
202
|
+
"latitude",
|
|
203
|
+
"longitude",
|
|
204
|
+
"admin_unit",
|
|
205
|
+
"iso_alpha_2"
|
|
206
|
+
],
|
|
207
|
+
"properties": {
|
|
208
|
+
"name": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"description": "The name of the city."
|
|
211
|
+
},
|
|
212
|
+
"latitude": {
|
|
213
|
+
"type": "number",
|
|
214
|
+
"format": "float",
|
|
215
|
+
"description": "The geographic latitude of the city in decimal degrees."
|
|
216
|
+
},
|
|
217
|
+
"longitude": {
|
|
218
|
+
"type": "number",
|
|
219
|
+
"format": "float",
|
|
220
|
+
"description": "The geographic longitude of the city in decimal degrees."
|
|
221
|
+
},
|
|
222
|
+
"iso_alpha_2": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"description": "The ISO 3166-1 alpha-2 country code the city belongs to."
|
|
225
|
+
},
|
|
226
|
+
"admin_unit": {
|
|
227
|
+
"$ref": "#/components/schemas/AdminUnit"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"AdminUnit": {
|
|
232
|
+
"type": "object",
|
|
233
|
+
"description": "An object describing the administrative unit the city belongs to.",
|
|
234
|
+
"required": ["name", "admin_code", "admin_level"],
|
|
235
|
+
"properties": {
|
|
236
|
+
"name": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"description": "The full name of the administrative unit."
|
|
239
|
+
},
|
|
240
|
+
"admin_code": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"description": "The short code of the administrative unit."
|
|
243
|
+
},
|
|
244
|
+
"admin_level": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "The administrative level type of the unit (e.g., province, council area)."
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"ErrorResponse": {
|
|
251
|
+
"type": "object",
|
|
252
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
253
|
+
"required": ["message"],
|
|
254
|
+
"properties": {
|
|
255
|
+
"error": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "Short error category or exception type."
|
|
258
|
+
},
|
|
259
|
+
"message": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"description": "Human-readable error message describing the failure."
|
|
262
|
+
},
|
|
263
|
+
"path": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"description": "API endpoint path that produced the error."
|
|
266
|
+
},
|
|
267
|
+
"status": {
|
|
268
|
+
"type": "integer",
|
|
269
|
+
"description": "HTTP status code returned with the error."
|
|
270
|
+
},
|
|
271
|
+
"timestamp": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"format": "date-time",
|
|
274
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"security": [
|
|
281
|
+
{
|
|
282
|
+
"ApiKeyAuthHeader": []
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"ApiKeyAuthQuery": []
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Country Details API Reference",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Get comprehensive metadata for a specific country identified by its ISO 3166-1 alpha-2 code. Returns the country name, ISO codes (alpha-2, alpha-3, numeric), phone code, capital city, top-level domain, native name, region and subregion, nationality, flag emoji, and currency details (code, name, symbol). A valid two-letter country code is required. capital, region, and subregion are empty strings (not omitted) for the same handful of uninhabited/dependent territories as the Countries list endpoint — every other field, including currency and phone code, is populated for those territories.",
|
|
7
|
+
"contact": {
|
|
8
|
+
"name": "APIFreaks Support",
|
|
9
|
+
"url": "https://apifreaks.com/contact",
|
|
10
|
+
"email": "support@apifreaks.com"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"servers": [
|
|
14
|
+
{
|
|
15
|
+
"url": "https://api.apifreaks.com/v1.0",
|
|
16
|
+
"description": "Country Details API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/geo/country/details": {
|
|
21
|
+
"get": {
|
|
22
|
+
"tags": ["GeoDB APIs"],
|
|
23
|
+
"summary": "Retrieve comprehensive metadata for a specific country",
|
|
24
|
+
"description": "Returns complete country details for a single country identified by its ISO 3166-1 alpha-2 code, including ISO codes, capital, currency, phone code, nationality, and flag emoji.",
|
|
25
|
+
"operationId": "getCountryDetails",
|
|
26
|
+
"parameters": [
|
|
27
|
+
{
|
|
28
|
+
"name": "format",
|
|
29
|
+
"in": "query",
|
|
30
|
+
"required": false,
|
|
31
|
+
"description": "Format of the response. Possible values: json, xml.",
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": ["json", "xml"],
|
|
35
|
+
"default": "json"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "country",
|
|
40
|
+
"in": "query",
|
|
41
|
+
"required": true,
|
|
42
|
+
"description": "Country code in ISO 3166-1 alpha-2 format (e.g., US, PK).",
|
|
43
|
+
"schema": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"responses": {
|
|
49
|
+
"200": {
|
|
50
|
+
"description": "Successful response with country details",
|
|
51
|
+
"content": {
|
|
52
|
+
"application/json": {
|
|
53
|
+
"schema": {
|
|
54
|
+
"$ref": "#/components/schemas/CountryDetailsResponse"
|
|
55
|
+
},
|
|
56
|
+
"examples": {
|
|
57
|
+
"typicalSuccess": {
|
|
58
|
+
"summary": "Typical successful response",
|
|
59
|
+
"value": {
|
|
60
|
+
"name": "United States",
|
|
61
|
+
"iso_alpha_2": "US",
|
|
62
|
+
"iso_alpha_3": "USA",
|
|
63
|
+
"iso_numeric": 840,
|
|
64
|
+
"phone_code": 1,
|
|
65
|
+
"capital": "Washington",
|
|
66
|
+
"top_level_domain": ".us",
|
|
67
|
+
"native_name": "United States",
|
|
68
|
+
"region": "Americas",
|
|
69
|
+
"subregion": "Northern America",
|
|
70
|
+
"nationality": "American",
|
|
71
|
+
"flag_emoji": "🇺🇸",
|
|
72
|
+
"currency_code": "USD",
|
|
73
|
+
"currency_name": "United States dollar",
|
|
74
|
+
"currency_symbol": "$"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"unassignedFields": {
|
|
78
|
+
"summary": "Uninhabited territory — capital, region, and subregion are empty strings; every other field is still populated",
|
|
79
|
+
"value": {
|
|
80
|
+
"name": "Bouvet Island",
|
|
81
|
+
"iso_alpha_2": "BV",
|
|
82
|
+
"iso_alpha_3": "BVT",
|
|
83
|
+
"iso_numeric": 74,
|
|
84
|
+
"phone_code": 55,
|
|
85
|
+
"capital": "",
|
|
86
|
+
"top_level_domain": ".bv",
|
|
87
|
+
"native_name": "Bouvetøya",
|
|
88
|
+
"region": "",
|
|
89
|
+
"subregion": "",
|
|
90
|
+
"nationality": "Bouvet Island",
|
|
91
|
+
"flag_emoji": "🇧🇻",
|
|
92
|
+
"currency_code": "NOK",
|
|
93
|
+
"currency_name": "Norwegian krone",
|
|
94
|
+
"currency_symbol": "ko"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"400": {
|
|
102
|
+
"description": "Bad Request — Missing country parameter, or country is not a valid/known ISO 3166-1 alpha-2 code",
|
|
103
|
+
"content": {
|
|
104
|
+
"application/json": {
|
|
105
|
+
"schema": {
|
|
106
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
107
|
+
},
|
|
108
|
+
"examples": {
|
|
109
|
+
"MissingCountry": {
|
|
110
|
+
"summary": "Missing required country parameter",
|
|
111
|
+
"value": {
|
|
112
|
+
"error": "Invalid Param Exception",
|
|
113
|
+
"message": "please pass correct parameters",
|
|
114
|
+
"path": "/v1.0/geo/country/details",
|
|
115
|
+
"status": 400,
|
|
116
|
+
"timestamp": "2026-07-24T10:54:42.188Z"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"InvalidCountryCode": {
|
|
120
|
+
"summary": "Malformed or unrecognized country code",
|
|
121
|
+
"value": {
|
|
122
|
+
"timestamp": "2026-07-24T10:54:42.684Z",
|
|
123
|
+
"path": "/v1/country/details",
|
|
124
|
+
"status": 400,
|
|
125
|
+
"error": "Invalid Country Code provided",
|
|
126
|
+
"message": "Only ISO 3166-1 alpha-2 codes country codes are supported."
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"components": {
|
|
138
|
+
"securitySchemes": {
|
|
139
|
+
"ApiKeyAuthHeader": {
|
|
140
|
+
"type": "apiKey",
|
|
141
|
+
"in": "header",
|
|
142
|
+
"name": "X-apiKey",
|
|
143
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
144
|
+
},
|
|
145
|
+
"ApiKeyAuthQuery": {
|
|
146
|
+
"type": "apiKey",
|
|
147
|
+
"in": "query",
|
|
148
|
+
"name": "apiKey",
|
|
149
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"schemas": {
|
|
153
|
+
"CountryDetailsResponse": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"description": "Comprehensive metadata for a single country resolved from an ISO 3166-1 alpha-2 code.",
|
|
156
|
+
"required": [
|
|
157
|
+
"name",
|
|
158
|
+
"iso_alpha_2",
|
|
159
|
+
"iso_alpha_3",
|
|
160
|
+
"iso_numeric",
|
|
161
|
+
"phone_code",
|
|
162
|
+
"capital",
|
|
163
|
+
"top_level_domain",
|
|
164
|
+
"native_name",
|
|
165
|
+
"region",
|
|
166
|
+
"subregion",
|
|
167
|
+
"nationality",
|
|
168
|
+
"flag_emoji",
|
|
169
|
+
"currency_code",
|
|
170
|
+
"currency_name",
|
|
171
|
+
"currency_symbol"
|
|
172
|
+
],
|
|
173
|
+
"properties": {
|
|
174
|
+
"name": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"description": "The full English name of the country."
|
|
177
|
+
},
|
|
178
|
+
"iso_alpha_2": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"description": "The ISO 3166-1 alpha-2 two-letter country code."
|
|
181
|
+
},
|
|
182
|
+
"iso_alpha_3": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"description": "The ISO 3166-1 alpha-3 three-letter country code."
|
|
185
|
+
},
|
|
186
|
+
"iso_numeric": {
|
|
187
|
+
"type": "integer",
|
|
188
|
+
"description": "The ISO 3166-1 numeric country code."
|
|
189
|
+
},
|
|
190
|
+
"phone_code": {
|
|
191
|
+
"type": "integer",
|
|
192
|
+
"description": "The international dialing/phone code for the country."
|
|
193
|
+
},
|
|
194
|
+
"capital": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"description": "The capital city of the country. Empty string for uninhabited/dependent territories with no capital."
|
|
197
|
+
},
|
|
198
|
+
"top_level_domain": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"description": "The country-code top-level internet domain."
|
|
201
|
+
},
|
|
202
|
+
"native_name": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"description": "The name of the country in its native language."
|
|
205
|
+
},
|
|
206
|
+
"region": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"description": "The broad geographical region the country belongs to. Empty string for a small number of territories with no assigned region."
|
|
209
|
+
},
|
|
210
|
+
"subregion": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"description": "The more specific subregion the country belongs to. Empty string for a small number of territories with no assigned subregion."
|
|
213
|
+
},
|
|
214
|
+
"nationality": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"description": "The demonym for citizens of the country."
|
|
217
|
+
},
|
|
218
|
+
"flag_emoji": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"description": "The emoji flag representing the country."
|
|
221
|
+
},
|
|
222
|
+
"currency_code": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"description": "The ISO 4217 currency code used in the country."
|
|
225
|
+
},
|
|
226
|
+
"currency_name": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"description": "The full name of the currency used in the country."
|
|
229
|
+
},
|
|
230
|
+
"currency_symbol": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"description": "The symbol of the currency used in the country."
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"ErrorResponse": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
239
|
+
"required": ["message"],
|
|
240
|
+
"properties": {
|
|
241
|
+
"error": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"description": "Short error category or exception type."
|
|
244
|
+
},
|
|
245
|
+
"message": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"description": "Human-readable error message describing the failure."
|
|
248
|
+
},
|
|
249
|
+
"path": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "API endpoint path that produced the error."
|
|
252
|
+
},
|
|
253
|
+
"status": {
|
|
254
|
+
"type": "integer",
|
|
255
|
+
"description": "HTTP status code returned with the error."
|
|
256
|
+
},
|
|
257
|
+
"timestamp": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"format": "date-time",
|
|
260
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"security": [
|
|
267
|
+
{
|
|
268
|
+
"ApiKeyAuthHeader": []
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"ApiKeyAuthQuery": []
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
}
|