@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.
Files changed (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +156 -0
  3. package/dist/index.cjs +44663 -0
  4. package/dist/index.d.cts +30 -0
  5. package/dist/index.d.ts +30 -0
  6. package/dist/index.js +44631 -0
  7. package/package.json +81 -0
  8. package/specs/commodity/commodity-fluctuation.json +301 -0
  9. package/specs/commodity/commodity-prices.json +317 -0
  10. package/specs/commodity/commodity-symbols.json +215 -0
  11. package/specs/commodity/commodity-time-series.json +329 -0
  12. package/specs/commodity/historical-commodity-prices.json +273 -0
  13. package/specs/currency/currency-converter.json +261 -0
  14. package/specs/currency/currency-fluctuation.json +282 -0
  15. package/specs/currency/currency-historical-data-limit.json +158 -0
  16. package/specs/currency/currency-rate.json +229 -0
  17. package/specs/currency/currency-supported.json +234 -0
  18. package/specs/currency/currency-symbols.json +161 -0
  19. package/specs/currency/currency-time-series.json +325 -0
  20. package/specs/currency/geolocalized-currency-conversion.json +287 -0
  21. package/specs/currency/historical-currency-converter.json +269 -0
  22. package/specs/currency/historical-currency-rate.json +246 -0
  23. package/specs/dns/bulk-dns-lookup.json +624 -0
  24. package/specs/dns/dns-history-lookup.json +579 -0
  25. package/specs/dns/dns-lookup.json +466 -0
  26. package/specs/dns/reverse-dns-lookup.json +414 -0
  27. package/specs/domain/bulk-domain-checker.json +284 -0
  28. package/specs/domain/domain-search-with-suggestions.json +280 -0
  29. package/specs/domain/domain-search.json +206 -0
  30. package/specs/domain/subdomain-lookup.json +343 -0
  31. package/specs/email-validation/bulk-email-validation.json +534 -0
  32. package/specs/email-validation/email-checker.json +586 -0
  33. package/specs/financial/bulk-vat-rates-country.json +341 -0
  34. package/specs/financial/financial-apis-supported-countries.json +204 -0
  35. package/specs/financial/iban-validation.json +328 -0
  36. package/specs/financial/swift-code-finder.json +192 -0
  37. package/specs/financial/swift-code-lookup.json +220 -0
  38. package/specs/financial/vat-number-validation.json +283 -0
  39. package/specs/financial/vat-rates-by-ip.json +275 -0
  40. package/specs/financial/vat-rates-country.json +288 -0
  41. package/specs/general/usage-credits.json +218 -0
  42. package/specs/geocoding/forward-geocoding.json +402 -0
  43. package/specs/geocoding/reverse-geocoding.json +326 -0
  44. package/specs/geodb/administrative-units-details.json +250 -0
  45. package/specs/geodb/administrative-units-levels.json +198 -0
  46. package/specs/geodb/administrative-units.json +237 -0
  47. package/specs/geodb/cities.json +288 -0
  48. package/specs/geodb/countries-details.json +274 -0
  49. package/specs/geodb/countries.json +276 -0
  50. package/specs/geodb/flags-supported.json +166 -0
  51. package/specs/geodb/flags.json +227 -0
  52. package/specs/geodb/regions.json +109 -0
  53. package/specs/geodb/subregions.json +217 -0
  54. package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
  55. package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
  56. package/specs/ip-intelligence/ip-locator.json +941 -0
  57. package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
  58. package/specs/other/astronomy-data.json +803 -0
  59. package/specs/pdf/delete-pdf-page.json +286 -0
  60. package/specs/pdf/linearize-pdf.json +277 -0
  61. package/specs/pdf/merge-pdf.json +285 -0
  62. package/specs/pdf/pdf-compress.json +304 -0
  63. package/specs/pdf/pdf-decrypt.json +297 -0
  64. package/specs/pdf/pdf-encrypt.json +314 -0
  65. package/specs/pdf/pdf-extract-pages.json +295 -0
  66. package/specs/pdf/pdf-file-status.json +208 -0
  67. package/specs/pdf/pdf-file.json +190 -0
  68. package/specs/pdf/pdf-files.json +126 -0
  69. package/specs/pdf/pdf-resource-download.json +168 -0
  70. package/specs/pdf/pdf-resource-upload-binary.json +218 -0
  71. package/specs/pdf/pdf-resource-upload.json +248 -0
  72. package/specs/pdf/pdf-restrict.json +343 -0
  73. package/specs/pdf/pdf-split-pages.json +281 -0
  74. package/specs/pdf/pdf-task-status.json +252 -0
  75. package/specs/pdf/pdf-to-image.json +1219 -0
  76. package/specs/pdf/pdf-unrestrict.json +324 -0
  77. package/specs/pdf/rotate-pdf-pages.json +305 -0
  78. package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
  79. package/specs/phone-validation/phone-number-validation.json +456 -0
  80. package/specs/scraper/web-scraper.json +674 -0
  81. package/specs/screenshot/bulk-screenshot.json +949 -0
  82. package/specs/screenshot/website-screenshot.json +1147 -0
  83. package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
  84. package/specs/ssl/ssl-certificate-lookup.json +634 -0
  85. package/specs/timezone/timezone-converter.json +362 -0
  86. package/specs/timezone/timezone-lookup.json +910 -0
  87. package/specs/user-agent/bulk-user-agent-parser.json +441 -0
  88. package/specs/user-agent/user-agent-parser.json +346 -0
  89. package/specs/weather/air-quality.json +779 -0
  90. package/specs/weather/bulk-live-weather.json +834 -0
  91. package/specs/weather/flood-forecast.json +693 -0
  92. package/specs/weather/historical-weather.json +1019 -0
  93. package/specs/weather/live-weather.json +789 -0
  94. package/specs/weather/marine-weather.json +940 -0
  95. package/specs/weather/time-series-weather.json +1056 -0
  96. package/specs/weather/weather-forecast.json +1202 -0
  97. package/specs/whois/asn-lookup.json +729 -0
  98. package/specs/whois/bulk-whois-lookup.json +698 -0
  99. package/specs/whois/domain-whois-history-lookup.json +500 -0
  100. package/specs/whois/reverse-whois.json +625 -0
  101. package/specs/whois/whois-domain-lookup.json +533 -0
  102. package/specs/whois/whois-ip-lookup.json +1110 -0
  103. package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
  104. package/specs/zip-code/zip-code-api.json +299 -0
  105. package/specs/zip-code/zip-code-distance-match.json +311 -0
  106. package/specs/zip-code/zip-code-distance.json +307 -0
  107. package/specs/zip-code/zip-codes-by-city.json +279 -0
  108. package/specs/zip-code/zip-codes-by-region.json +278 -0
  109. package/specs/zip-code/zip-codes-radius-search.json +349 -0
@@ -0,0 +1,276 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "Countries API - Retrieve Global Countries Data",
5
+ "version": "1.0.0",
6
+ "description": "Retrieve a complete list of 250 countries and territories with ISO codes (alpha-2, alpha-3, numeric), capital cities, and geographic region/subregion assignments. Optionally filter by region or subregion name to narrow results. Each country object includes the full English name, ISO codes, numeric code, capital city, region, and subregion. Returns all countries by default when no filters are applied. capital, region, and subregion are empty strings (not omitted) for a handful of uninhabited or dependent territories with no assigned value, e.g. Bouvet Island and Heard Island and McDonald Islands have no region/subregion at all, and Antarctica/Tokelau/US Minor Outlying Islands have no capital.",
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": "Countries API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/geo/countries": {
21
+ "get": {
22
+ "tags": ["GeoDB APIs"],
23
+ "summary": "Retrieve a list of countries with optional region or subregion filtering",
24
+ "description": "Returns all countries with their ISO codes, capital cities, regions, and subregions. Optional region and subregion parameters narrow results.",
25
+ "operationId": "getCountries",
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": "region",
40
+ "in": "query",
41
+ "required": false,
42
+ "description": "Optional filter to return countries within a specific region (e.g., Europe, Asia).",
43
+ "schema": {
44
+ "type": "string"
45
+ }
46
+ },
47
+ {
48
+ "name": "subregion",
49
+ "in": "query",
50
+ "required": false,
51
+ "description": "Optional filter to return countries within a specific subregion (e.g., Northern Europe, Southern Asia).",
52
+ "schema": {
53
+ "type": "string"
54
+ }
55
+ }
56
+ ],
57
+ "responses": {
58
+ "200": {
59
+ "description": "Successful response with list of countries",
60
+ "content": {
61
+ "application/json": {
62
+ "schema": {
63
+ "$ref": "#/components/schemas/CountriesResponse"
64
+ },
65
+ "examples": {
66
+ "typicalSuccess": {
67
+ "summary": "Typical successful response",
68
+ "value": {
69
+ "countries": [
70
+ {
71
+ "name": "United Kingdom",
72
+ "iso_alpha_2": "GB",
73
+ "iso_alpha_3": "GBR",
74
+ "iso_numeric": 826,
75
+ "capital": "London",
76
+ "region": "Europe",
77
+ "subregion": "Northern Europe"
78
+ },
79
+ {
80
+ "name": "France",
81
+ "iso_alpha_2": "FR",
82
+ "iso_alpha_3": "FRA",
83
+ "iso_numeric": 250,
84
+ "capital": "Paris",
85
+ "region": "Europe",
86
+ "subregion": "Western Europe"
87
+ },
88
+ {
89
+ "name": "Germany",
90
+ "iso_alpha_2": "DE",
91
+ "iso_alpha_3": "DEU",
92
+ "iso_numeric": 276,
93
+ "capital": "Berlin",
94
+ "region": "Europe",
95
+ "subregion": "Western Europe"
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ "unassignedFields": {
101
+ "summary": "Uninhabited/dependent territories — capital, region, and/or subregion come back as empty strings",
102
+ "value": {
103
+ "countries": [
104
+ {
105
+ "name": "Bouvet Island",
106
+ "iso_alpha_2": "BV",
107
+ "iso_alpha_3": "BVT",
108
+ "iso_numeric": 74,
109
+ "capital": "",
110
+ "region": "",
111
+ "subregion": ""
112
+ },
113
+ {
114
+ "name": "Antarctica",
115
+ "iso_alpha_2": "AQ",
116
+ "iso_alpha_3": "ATA",
117
+ "iso_numeric": 10,
118
+ "capital": "",
119
+ "region": "Polar",
120
+ "subregion": ""
121
+ }
122
+ ]
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "400": {
130
+ "description": "Bad Request — Invalid region or subregion name",
131
+ "content": {
132
+ "application/json": {
133
+ "schema": {
134
+ "$ref": "#/components/schemas/ErrorResponse"
135
+ },
136
+ "examples": {
137
+ "InvalidRegionName": {
138
+ "summary": "Invalid region name",
139
+ "value": {
140
+ "timestamp": "2026-07-24T10:51:01.695Z",
141
+ "path": "/v1/countries",
142
+ "status": 400,
143
+ "error": "Invalid Region Name provided",
144
+ "message": "Please provide a valid region name."
145
+ }
146
+ },
147
+ "InvalidSubregionName": {
148
+ "summary": "Invalid subregion name",
149
+ "value": {
150
+ "timestamp": "2026-07-24T10:51:02.247Z",
151
+ "path": "/v1/countries",
152
+ "status": 400,
153
+ "error": "Invalid Subregion Name provided",
154
+ "message": "Please provide a valid subregion name."
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
164
+ },
165
+ "components": {
166
+ "securitySchemes": {
167
+ "ApiKeyAuthHeader": {
168
+ "type": "apiKey",
169
+ "in": "header",
170
+ "name": "X-apiKey",
171
+ "description": "Pass your API key via the X-apiKey request header."
172
+ },
173
+ "ApiKeyAuthQuery": {
174
+ "type": "apiKey",
175
+ "in": "query",
176
+ "name": "apiKey",
177
+ "description": "Pass your API key via the apiKey query parameter."
178
+ }
179
+ },
180
+ "schemas": {
181
+ "CountriesResponse": {
182
+ "type": "object",
183
+ "description": "Response containing the list of countries matching the applied region/subregion filters (or all 250 when unfiltered).",
184
+ "required": ["countries"],
185
+ "properties": {
186
+ "countries": {
187
+ "type": "array",
188
+ "description": "An array of country objects matching the applied filters.",
189
+ "items": {
190
+ "$ref": "#/components/schemas/CountryItem"
191
+ }
192
+ }
193
+ }
194
+ },
195
+ "CountryItem": {
196
+ "type": "object",
197
+ "description": "A country object containing ISO codes, capital, and region information.",
198
+ "required": [
199
+ "name",
200
+ "iso_alpha_2",
201
+ "iso_alpha_3",
202
+ "iso_numeric",
203
+ "capital",
204
+ "region",
205
+ "subregion"
206
+ ],
207
+ "properties": {
208
+ "name": {
209
+ "type": "string",
210
+ "description": "The full English name of the country."
211
+ },
212
+ "iso_alpha_2": {
213
+ "type": "string",
214
+ "description": "The ISO 3166-1 alpha-2 two-letter country code."
215
+ },
216
+ "iso_alpha_3": {
217
+ "type": "string",
218
+ "description": "The ISO 3166-1 alpha-3 three-letter country code."
219
+ },
220
+ "iso_numeric": {
221
+ "type": "integer",
222
+ "description": "The ISO 3166-1 numeric country code."
223
+ },
224
+ "capital": {
225
+ "type": "string",
226
+ "description": "The capital city of the country. Empty string for uninhabited/dependent territories with no capital."
227
+ },
228
+ "region": {
229
+ "type": "string",
230
+ "description": "The broad geographical region the country belongs to. Empty string for a small number of territories with no assigned region."
231
+ },
232
+ "subregion": {
233
+ "type": "string",
234
+ "description": "The more specific subregion the country belongs to. Empty string for a small number of territories with no assigned subregion."
235
+ }
236
+ }
237
+ },
238
+ "ErrorResponse": {
239
+ "type": "object",
240
+ "description": "Standard error envelope returned by the API on failed requests.",
241
+ "required": ["message"],
242
+ "properties": {
243
+ "error": {
244
+ "type": "string",
245
+ "description": "Short error category or exception type."
246
+ },
247
+ "message": {
248
+ "type": "string",
249
+ "description": "Human-readable error message describing the failure."
250
+ },
251
+ "path": {
252
+ "type": "string",
253
+ "description": "API endpoint path that produced the error."
254
+ },
255
+ "status": {
256
+ "type": "integer",
257
+ "description": "HTTP status code returned with the error."
258
+ },
259
+ "timestamp": {
260
+ "type": "string",
261
+ "format": "date-time",
262
+ "description": "Timestamp when the error occurred (ISO 8601)."
263
+ }
264
+ }
265
+ }
266
+ }
267
+ },
268
+ "security": [
269
+ {
270
+ "ApiKeyAuthHeader": []
271
+ },
272
+ {
273
+ "ApiKeyAuthQuery": []
274
+ }
275
+ ]
276
+ }
@@ -0,0 +1,166 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "Supported Flags API Reference",
5
+ "version": "1.0.0",
6
+ "description": "Retrieve the list of all country and international organization flags supported by the Flags API. Returns two arrays: `supported_countries` (238 entries) with country names and ISO codes for every available country flag, and `supported_organizations` (22 entries) with case-sensitive identifiers for international organization flags (e.g., United_Nations, NATO, European_Union). Use the returned identifiers with the Flags API's name parameter to retrieve actual flag images — organization identifiers must be passed exactly as listed here, including underscores and capitalization. This endpoint takes no required parameters and has no documented error responses.",
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": "Supported Flags API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/flags/supported": {
21
+ "get": {
22
+ "tags": ["Flags APIs"],
23
+ "summary": "Retrieve list of all supported flags",
24
+ "description": "Returns a list of all supported country and international organization flags with their metadata.",
25
+ "operationId": "getSupportedFlags",
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
+ "responses": {
40
+ "200": {
41
+ "description": "Successful response with list of supported flags",
42
+ "content": {
43
+ "application/json": {
44
+ "schema": {
45
+ "$ref": "#/components/schemas/SupportedFlagsResponse"
46
+ },
47
+ "examples": {
48
+ "typicalSuccess": {
49
+ "summary": "Typical successful response",
50
+ "value": {
51
+ "supported_countries": [
52
+ {
53
+ "name": "Luxembourg",
54
+ "iso2": "LU",
55
+ "iso3": "LUX"
56
+ },
57
+ {
58
+ "name": "Suriname",
59
+ "iso2": "SR",
60
+ "iso3": "SUR"
61
+ },
62
+ {
63
+ "name": "Tunisia",
64
+ "iso2": "TN",
65
+ "iso3": "TUN"
66
+ },
67
+ {
68
+ "name": "Colombia",
69
+ "iso2": "CO",
70
+ "iso3": "COL"
71
+ },
72
+ {
73
+ "name": "Pakistan",
74
+ "iso2": "PK",
75
+ "iso3": "PAK"
76
+ }
77
+ ],
78
+ "supported_organizations": [
79
+ "Commonwealth_of_Independent_States",
80
+ "Gulf_Cooperation_Council",
81
+ "Arab_League",
82
+ "Organization_of_American_States",
83
+ "African_Union",
84
+ "European_Union",
85
+ "United_Nations",
86
+ "NATO",
87
+ "Association_of_Southeast_Asian_Nations",
88
+ "Commonwealth_of_Nations"
89
+ ]
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ },
100
+ "components": {
101
+ "securitySchemes": {
102
+ "ApiKeyAuthHeader": {
103
+ "type": "apiKey",
104
+ "in": "header",
105
+ "name": "X-apiKey",
106
+ "description": "Pass your API key via the X-apiKey request header."
107
+ },
108
+ "ApiKeyAuthQuery": {
109
+ "type": "apiKey",
110
+ "in": "query",
111
+ "name": "apiKey",
112
+ "description": "Pass your API key via the apiKey query parameter."
113
+ }
114
+ },
115
+ "schemas": {
116
+ "SupportedFlagsResponse": {
117
+ "type": "object",
118
+ "description": "The full list of country and organization flag identifiers supported by the Flags API.",
119
+ "required": ["supported_countries", "supported_organizations"],
120
+ "properties": {
121
+ "supported_countries": {
122
+ "type": "array",
123
+ "description": "List of all supported country flags with their ISO codes and names.",
124
+ "items": {
125
+ "$ref": "#/components/schemas/SupportedCountry"
126
+ }
127
+ },
128
+ "supported_organizations": {
129
+ "type": "array",
130
+ "description": "List of all supported international organization flag identifiers.",
131
+ "items": {
132
+ "type": "string"
133
+ }
134
+ }
135
+ }
136
+ },
137
+ "SupportedCountry": {
138
+ "type": "object",
139
+ "description": "A supported country with ISO codes.",
140
+ "required": ["name", "iso2", "iso3"],
141
+ "properties": {
142
+ "name": {
143
+ "type": "string",
144
+ "description": "Full name of the country."
145
+ },
146
+ "iso2": {
147
+ "type": "string",
148
+ "description": "ISO 3166-1 alpha-2 code."
149
+ },
150
+ "iso3": {
151
+ "type": "string",
152
+ "description": "ISO 3166-1 alpha-3 code."
153
+ }
154
+ }
155
+ }
156
+ }
157
+ },
158
+ "security": [
159
+ {
160
+ "ApiKeyAuthHeader": []
161
+ },
162
+ {
163
+ "ApiKeyAuthQuery": []
164
+ }
165
+ ]
166
+ }
@@ -0,0 +1,227 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "Flags API - Country & Organization Flags in Multiple Formats, Shapes, or Sizes",
5
+ "version": "1.0.0",
6
+ "description": "Retrieve country and international organization flag images in PNG, WEBP, or SVG format. Supports flat and round shapes in five sizes (16px to 64px, PNG/WEBP only — size is ignored for SVG). Requires a country code or organization identifier, the flag type (country or organization), and the shape (flat or round). Organization identifiers are case-sensitive and must exactly match an entry from the Supported Flags endpoint (e.g. NATO, European_Union, United_Nations) — lowercase or abbreviated forms are not recognized. Optional format (png, webp, svg) and size parameters control the output. Missing/invalid parameter values return a 400 error; unrecognized country or organization identifiers return a 404. On success the response body is the raw binary image, not JSON.",
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": "Flags API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/flags": {
21
+ "get": {
22
+ "tags": ["Flags APIs"],
23
+ "summary": "Retrieve a country or organization flag image",
24
+ "description": "Returns a flag image for a specified country or international organization. Supports PNG, WEBP, and SVG formats with flat or round shapes.",
25
+ "operationId": "getFlag",
26
+ "parameters": [
27
+ {
28
+ "name": "name",
29
+ "in": "query",
30
+ "required": true,
31
+ "description": "Country code in ISO 3166-1 alpha-2 format for country flags, or organization identifier for organization flags. Organization identifiers are case-sensitive and must exactly match an entry from the Supported Flags endpoint (e.g. NATO, European_Union) — lowercase or abbreviated forms return a 404.",
32
+ "schema": {
33
+ "type": "string"
34
+ }
35
+ },
36
+ {
37
+ "name": "type",
38
+ "in": "query",
39
+ "required": true,
40
+ "description": "Type of flag to retrieve. Possible values: country, organization.",
41
+ "schema": {
42
+ "type": "string",
43
+ "enum": ["country", "organization"]
44
+ }
45
+ },
46
+ {
47
+ "name": "shape",
48
+ "in": "query",
49
+ "required": true,
50
+ "description": "Shape of the flag image. Possible values: flat, round.",
51
+ "schema": {
52
+ "type": "string",
53
+ "enum": ["flat", "round"]
54
+ }
55
+ },
56
+ {
57
+ "name": "format",
58
+ "in": "query",
59
+ "required": false,
60
+ "description": "Image format. Possible values: png, webp, svg. Default: png.",
61
+ "schema": {
62
+ "type": "string",
63
+ "enum": ["png", "webp", "svg"],
64
+ "default": "png"
65
+ }
66
+ },
67
+ {
68
+ "name": "size",
69
+ "in": "query",
70
+ "required": false,
71
+ "description": "Size of the flag image in pixels. Possible values: 16px, 24px, 32px, 48px, 64px. Default is 64px when omitted. Applies to PNG and WEBP formats only; silently ignored (no error) when format is svg, since SVG is vector-scalable.",
72
+ "schema": {
73
+ "type": "string",
74
+ "enum": ["16px", "24px", "32px", "48px", "64px"]
75
+ }
76
+ }
77
+ ],
78
+ "responses": {
79
+ "200": {
80
+ "description": "Successful response with the flag image as raw binary data (not JSON) in the format requested",
81
+ "content": {
82
+ "image/png": {
83
+ "schema": {
84
+ "$ref": "#/components/schemas/ApiResponseSchemas"
85
+ }
86
+ },
87
+ "image/webp": {
88
+ "schema": {
89
+ "$ref": "#/components/schemas/ApiResponseSchemas"
90
+ }
91
+ },
92
+ "image/svg+xml": {
93
+ "schema": {
94
+ "$ref": "#/components/schemas/ApiResponseSchemas"
95
+ }
96
+ }
97
+ }
98
+ },
99
+ "400": {
100
+ "description": "Bad Request — Missing required parameter, or type/shape/format/size is not one of the allowed enum values",
101
+ "content": {
102
+ "application/json": {
103
+ "schema": {
104
+ "$ref": "#/components/schemas/ErrorResponse"
105
+ },
106
+ "examples": {
107
+ "MissingParams": {
108
+ "summary": "Missing required name, type, or shape parameter",
109
+ "value": {
110
+ "error": "Invalid Param Exception",
111
+ "message": "please pass correct parameters",
112
+ "path": "/v1.0/flags",
113
+ "status": 400,
114
+ "timestamp": "2026-07-24T11:04:56.443Z"
115
+ }
116
+ },
117
+ "InvalidType": {
118
+ "summary": "type is not country or organization",
119
+ "value": {
120
+ "timestamp": "2026-07-24T11:04:56.981953+00:00",
121
+ "path": "/flags",
122
+ "status": 400,
123
+ "error": "Bad Request",
124
+ "message": "Invalid type"
125
+ }
126
+ },
127
+ "InvalidShape": {
128
+ "summary": "shape is not flat or round",
129
+ "value": {
130
+ "timestamp": "2026-07-24T11:04:57.507529+00:00",
131
+ "path": "/flags",
132
+ "status": 400,
133
+ "error": "Bad Request",
134
+ "message": "Invalid shape"
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ },
141
+ "404": {
142
+ "description": "Not Found — Country code or organization identifier not recognized",
143
+ "content": {
144
+ "application/json": {
145
+ "schema": {
146
+ "$ref": "#/components/schemas/ErrorResponse"
147
+ },
148
+ "examples": {
149
+ "InvalidCountryCode": {
150
+ "summary": "Invalid country name or code",
151
+ "value": {
152
+ "timestamp": "2026-07-24T11:04:58.077767+00:00",
153
+ "path": "/flags",
154
+ "status": 404,
155
+ "error": "Not Found",
156
+ "message": "Invalid country name or code: ZZ"
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
+ "ApiResponseSchemas": {
184
+ "type": "string",
185
+ "format": "binary",
186
+ "title": "Flag Image Response",
187
+ "description": "The flag image returned as raw binary data in the requested format (not JSON). Content-Type is one of image/png, image/webp, or image/svg+xml depending on the format parameter."
188
+ },
189
+ "ErrorResponse": {
190
+ "type": "object",
191
+ "description": "Standard error envelope returned by the API on failed requests. path and timestamp formatting differ between the missing-parameter case (versioned path, Z-suffixed timestamp) and the invalid-value/not-found cases (unversioned path, offset timestamp with microseconds), since this endpoint is served by a different backend than most of the API.",
192
+ "required": ["message"],
193
+ "properties": {
194
+ "error": {
195
+ "type": "string",
196
+ "description": "Short error category or exception type."
197
+ },
198
+ "message": {
199
+ "type": "string",
200
+ "description": "Human-readable error message describing the failure."
201
+ },
202
+ "path": {
203
+ "type": "string",
204
+ "description": "API endpoint path that produced the error."
205
+ },
206
+ "status": {
207
+ "type": "integer",
208
+ "description": "HTTP status code returned with the error."
209
+ },
210
+ "timestamp": {
211
+ "type": "string",
212
+ "format": "date-time",
213
+ "description": "Timestamp when the error occurred (ISO 8601)."
214
+ }
215
+ }
216
+ }
217
+ }
218
+ },
219
+ "security": [
220
+ {
221
+ "ApiKeyAuthHeader": []
222
+ },
223
+ {
224
+ "ApiKeyAuthQuery": []
225
+ }
226
+ ]
227
+ }