@apifreaks/openapi-specs 0.1.0 → 0.1.2

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 (108) hide show
  1. package/dist/index.cjs +133 -2
  2. package/dist/index.d.cts +140 -3
  3. package/dist/index.d.ts +140 -3
  4. package/dist/index.js +131 -2
  5. package/dist/specs/commodity/commodity-fluctuation.yaml +225 -0
  6. package/dist/specs/commodity/commodity-prices.yaml +236 -0
  7. package/dist/specs/commodity/commodity-symbols.yaml +159 -0
  8. package/dist/specs/commodity/commodity-time-series.yaml +238 -0
  9. package/dist/specs/commodity/historical-commodity-prices.yaml +208 -0
  10. package/dist/specs/currency/currency-converter.yaml +193 -0
  11. package/dist/specs/currency/currency-fluctuation.yaml +211 -0
  12. package/dist/specs/currency/currency-historical-data-limit.yaml +112 -0
  13. package/dist/specs/currency/currency-rate.yaml +173 -0
  14. package/dist/specs/currency/currency-supported.yaml +176 -0
  15. package/dist/specs/currency/currency-symbols.yaml +115 -0
  16. package/dist/specs/currency/currency-time-series.yaml +232 -0
  17. package/dist/specs/currency/geolocalized-currency-conversion.yaml +214 -0
  18. package/dist/specs/currency/historical-currency-converter.yaml +195 -0
  19. package/dist/specs/currency/historical-currency-rate.yaml +180 -0
  20. package/dist/specs/dns/bulk-dns-lookup.yaml +484 -0
  21. package/dist/specs/dns/dns-history-lookup.yaml +451 -0
  22. package/dist/specs/dns/dns-lookup.yaml +360 -0
  23. package/dist/specs/dns/reverse-dns-lookup.yaml +338 -0
  24. package/dist/specs/domain/bulk-domain-checker.yaml +198 -0
  25. package/dist/specs/domain/domain-search-with-suggestions.yaml +196 -0
  26. package/dist/specs/domain/domain-search.yaml +149 -0
  27. package/dist/specs/domain/subdomain-lookup.yaml +251 -0
  28. package/dist/specs/email-validation/bulk-email-validation.yaml +403 -0
  29. package/dist/specs/email-validation/email-checker.yaml +451 -0
  30. package/dist/specs/financial/bulk-vat-rates-country.yaml +250 -0
  31. package/dist/specs/financial/financial-apis-supported-countries.yaml +152 -0
  32. package/dist/specs/financial/iban-validation.yaml +270 -0
  33. package/dist/specs/financial/swift-code-finder.yaml +146 -0
  34. package/dist/specs/financial/swift-code-lookup.yaml +156 -0
  35. package/dist/specs/financial/vat-number-validation.yaml +205 -0
  36. package/dist/specs/financial/vat-rates-by-ip.yaml +200 -0
  37. package/dist/specs/financial/vat-rates-country.yaml +212 -0
  38. package/dist/specs/general/usage-credits.yaml +188 -0
  39. package/dist/specs/geocoding/forward-geocoding.yaml +292 -0
  40. package/dist/specs/geocoding/reverse-geocoding.yaml +237 -0
  41. package/dist/specs/geodb/administrative-units-details.yaml +180 -0
  42. package/dist/specs/geodb/administrative-units-levels.yaml +140 -0
  43. package/dist/specs/geodb/administrative-units.yaml +168 -0
  44. package/dist/specs/geodb/cities.yaml +209 -0
  45. package/dist/specs/geodb/countries-details.yaml +207 -0
  46. package/dist/specs/geodb/countries.yaml +199 -0
  47. package/dist/specs/geodb/flags-supported.yaml +119 -0
  48. package/dist/specs/geodb/flags.yaml +170 -0
  49. package/dist/specs/geodb/regions.yaml +76 -0
  50. package/dist/specs/geodb/subregions.yaml +158 -0
  51. package/dist/specs/ip-intelligence/bulk-ip-lookup.yaml +895 -0
  52. package/dist/specs/ip-intelligence/bulk-ip-threat-intelligence.yaml +310 -0
  53. package/dist/specs/ip-intelligence/ip-locator.yaml +708 -0
  54. package/dist/specs/ip-intelligence/ip-threat-intelligence.yaml +230 -0
  55. package/dist/specs/other/astronomy-data.yaml +632 -0
  56. package/dist/specs/pdf/delete-pdf-page.yaml +193 -0
  57. package/dist/specs/pdf/linearize-pdf.yaml +187 -0
  58. package/dist/specs/pdf/merge-pdf.yaml +193 -0
  59. package/dist/specs/pdf/pdf-compress.yaml +208 -0
  60. package/dist/specs/pdf/pdf-decrypt.yaml +202 -0
  61. package/dist/specs/pdf/pdf-encrypt.yaml +213 -0
  62. package/dist/specs/pdf/pdf-extract-pages.yaml +199 -0
  63. package/dist/specs/pdf/pdf-file-status.yaml +148 -0
  64. package/dist/specs/pdf/pdf-file.yaml +136 -0
  65. package/dist/specs/pdf/pdf-files.yaml +85 -0
  66. package/dist/specs/pdf/pdf-resource-download.yaml +117 -0
  67. package/dist/specs/pdf/pdf-resource-upload-binary.yaml +152 -0
  68. package/dist/specs/pdf/pdf-resource-upload.yaml +163 -0
  69. package/dist/specs/pdf/pdf-restrict.yaml +246 -0
  70. package/dist/specs/pdf/pdf-split-pages.yaml +208 -0
  71. package/dist/specs/pdf/pdf-task-status.yaml +187 -0
  72. package/dist/specs/pdf/pdf-to-image.yaml +844 -0
  73. package/dist/specs/pdf/pdf-unrestrict.yaml +221 -0
  74. package/dist/specs/pdf/rotate-pdf-pages.yaml +207 -0
  75. package/dist/specs/phone-validation/bulk-phone-number-validation.yaml +374 -0
  76. package/dist/specs/phone-validation/phone-number-validation.yaml +344 -0
  77. package/dist/specs/scraper/web-scraper.yaml +479 -0
  78. package/dist/specs/screenshot/bulk-screenshot.yaml +728 -0
  79. package/dist/specs/screenshot/website-screenshot.yaml +822 -0
  80. package/dist/specs/ssl/ssl-certificate-chain-lookup.yaml +593 -0
  81. package/dist/specs/ssl/ssl-certificate-lookup.yaml +478 -0
  82. package/dist/specs/timezone/timezone-converter.yaml +249 -0
  83. package/dist/specs/timezone/timezone-lookup.yaml +712 -0
  84. package/dist/specs/user-agent/bulk-user-agent-parser.yaml +340 -0
  85. package/dist/specs/user-agent/user-agent-parser.yaml +271 -0
  86. package/dist/specs/weather/air-quality.yaml +590 -0
  87. package/dist/specs/weather/bulk-live-weather.yaml +654 -0
  88. package/dist/specs/weather/flood-forecast.yaml +519 -0
  89. package/dist/specs/weather/historical-weather.yaml +842 -0
  90. package/dist/specs/weather/live-weather.yaml +633 -0
  91. package/dist/specs/weather/marine-weather.yaml +806 -0
  92. package/dist/specs/weather/time-series-weather.yaml +821 -0
  93. package/dist/specs/weather/weather-forecast.yaml +935 -0
  94. package/dist/specs/whois/asn-lookup.yaml +618 -0
  95. package/dist/specs/whois/bulk-whois-lookup.yaml +827 -0
  96. package/dist/specs/whois/domain-whois-history-lookup.yaml +445 -0
  97. package/dist/specs/whois/reverse-whois.yaml +566 -0
  98. package/dist/specs/whois/whois-domain-lookup.yaml +537 -0
  99. package/dist/specs/whois/whois-ip-lookup.yaml +1123 -0
  100. package/dist/specs/zip-code/bulk-zip-code-lookup.yaml +232 -0
  101. package/dist/specs/zip-code/zip-code-api.yaml +216 -0
  102. package/dist/specs/zip-code/zip-code-distance-match.yaml +239 -0
  103. package/dist/specs/zip-code/zip-code-distance.yaml +233 -0
  104. package/dist/specs/zip-code/zip-codes-by-city.yaml +201 -0
  105. package/dist/specs/zip-code/zip-codes-by-region.yaml +200 -0
  106. package/dist/specs/zip-code/zip-codes-radius-search.yaml +262 -0
  107. package/package.json +6 -2
  108. package/specs/pdf/merge-pdf.json +2 -2
@@ -0,0 +1,199 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: Countries API - Retrieve Global Countries Data
4
+ version: 1.0.0
5
+ 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.
6
+ contact:
7
+ name: APIFreaks Support
8
+ url: https://apifreaks.com/contact
9
+ email: support@apifreaks.com
10
+ servers:
11
+ - url: https://api.apifreaks.com/v1.0
12
+ description: Countries API Server
13
+ paths:
14
+ /geo/countries:
15
+ get:
16
+ tags:
17
+ - GeoDB APIs
18
+ summary: Retrieve a list of countries with optional region or subregion filtering
19
+ description: Returns all countries with their ISO codes, capital cities, regions, and subregions. Optional region and subregion parameters narrow results.
20
+ operationId: getCountries
21
+ parameters:
22
+ - name: format
23
+ in: query
24
+ required: false
25
+ description: 'Format of the response. Possible values: json, xml.'
26
+ schema:
27
+ type: string
28
+ enum:
29
+ - json
30
+ - xml
31
+ default: json
32
+ - name: region
33
+ in: query
34
+ required: false
35
+ description: Optional filter to return countries within a specific region (e.g., Europe, Asia).
36
+ schema:
37
+ type: string
38
+ - name: subregion
39
+ in: query
40
+ required: false
41
+ description: Optional filter to return countries within a specific subregion (e.g., Northern Europe, Southern Asia).
42
+ schema:
43
+ type: string
44
+ responses:
45
+ '200':
46
+ description: Successful response with list of countries
47
+ content:
48
+ application/json:
49
+ schema:
50
+ $ref: '#/components/schemas/CountriesResponse'
51
+ examples:
52
+ typicalSuccess:
53
+ summary: Typical successful response
54
+ value:
55
+ countries:
56
+ - name: United Kingdom
57
+ iso_alpha_2: GB
58
+ iso_alpha_3: GBR
59
+ iso_numeric: 826
60
+ capital: London
61
+ region: Europe
62
+ subregion: Northern Europe
63
+ - name: France
64
+ iso_alpha_2: FR
65
+ iso_alpha_3: FRA
66
+ iso_numeric: 250
67
+ capital: Paris
68
+ region: Europe
69
+ subregion: Western Europe
70
+ - name: Germany
71
+ iso_alpha_2: DE
72
+ iso_alpha_3: DEU
73
+ iso_numeric: 276
74
+ capital: Berlin
75
+ region: Europe
76
+ subregion: Western Europe
77
+ unassignedFields:
78
+ summary: Uninhabited/dependent territories — capital, region, and/or subregion come back as empty strings
79
+ value:
80
+ countries:
81
+ - name: Bouvet Island
82
+ iso_alpha_2: BV
83
+ iso_alpha_3: BVT
84
+ iso_numeric: 74
85
+ capital: ''
86
+ region: ''
87
+ subregion: ''
88
+ - name: Antarctica
89
+ iso_alpha_2: AQ
90
+ iso_alpha_3: ATA
91
+ iso_numeric: 10
92
+ capital: ''
93
+ region: Polar
94
+ subregion: ''
95
+ '400':
96
+ description: Bad Request — Invalid region or subregion name
97
+ content:
98
+ application/json:
99
+ schema:
100
+ $ref: '#/components/schemas/ErrorResponse'
101
+ examples:
102
+ InvalidRegionName:
103
+ summary: Invalid region name
104
+ value:
105
+ timestamp: '2026-07-24T10:51:01.695Z'
106
+ path: /v1/countries
107
+ status: 400
108
+ error: Invalid Region Name provided
109
+ message: Please provide a valid region name.
110
+ InvalidSubregionName:
111
+ summary: Invalid subregion name
112
+ value:
113
+ timestamp: '2026-07-24T10:51:02.247Z'
114
+ path: /v1/countries
115
+ status: 400
116
+ error: Invalid Subregion Name provided
117
+ message: Please provide a valid subregion name.
118
+ components:
119
+ securitySchemes:
120
+ ApiKeyAuthHeader:
121
+ type: apiKey
122
+ in: header
123
+ name: X-apiKey
124
+ description: Pass your API key via the X-apiKey request header.
125
+ ApiKeyAuthQuery:
126
+ type: apiKey
127
+ in: query
128
+ name: apiKey
129
+ description: Pass your API key via the apiKey query parameter.
130
+ schemas:
131
+ CountriesResponse:
132
+ type: object
133
+ description: Response containing the list of countries matching the applied region/subregion filters (or all 250 when unfiltered).
134
+ required:
135
+ - countries
136
+ properties:
137
+ countries:
138
+ type: array
139
+ description: An array of country objects matching the applied filters.
140
+ items:
141
+ $ref: '#/components/schemas/CountryItem'
142
+ CountryItem:
143
+ type: object
144
+ description: A country object containing ISO codes, capital, and region information.
145
+ required:
146
+ - name
147
+ - iso_alpha_2
148
+ - iso_alpha_3
149
+ - iso_numeric
150
+ - capital
151
+ - region
152
+ - subregion
153
+ properties:
154
+ name:
155
+ type: string
156
+ description: The full English name of the country.
157
+ iso_alpha_2:
158
+ type: string
159
+ description: The ISO 3166-1 alpha-2 two-letter country code.
160
+ iso_alpha_3:
161
+ type: string
162
+ description: The ISO 3166-1 alpha-3 three-letter country code.
163
+ iso_numeric:
164
+ type: integer
165
+ description: The ISO 3166-1 numeric country code.
166
+ capital:
167
+ type: string
168
+ description: The capital city of the country. Empty string for uninhabited/dependent territories with no capital.
169
+ region:
170
+ type: string
171
+ description: The broad geographical region the country belongs to. Empty string for a small number of territories with no assigned region.
172
+ subregion:
173
+ type: string
174
+ description: The more specific subregion the country belongs to. Empty string for a small number of territories with no assigned subregion.
175
+ ErrorResponse:
176
+ type: object
177
+ description: Standard error envelope returned by the API on failed requests.
178
+ required:
179
+ - message
180
+ properties:
181
+ error:
182
+ type: string
183
+ description: Short error category or exception type.
184
+ message:
185
+ type: string
186
+ description: Human-readable error message describing the failure.
187
+ path:
188
+ type: string
189
+ description: API endpoint path that produced the error.
190
+ status:
191
+ type: integer
192
+ description: HTTP status code returned with the error.
193
+ timestamp:
194
+ type: string
195
+ format: date-time
196
+ description: Timestamp when the error occurred (ISO 8601).
197
+ security:
198
+ - ApiKeyAuthHeader: []
199
+ - ApiKeyAuthQuery: []
@@ -0,0 +1,119 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: Supported Flags API Reference
4
+ version: 1.0.0
5
+ 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.'
6
+ contact:
7
+ name: APIFreaks Support
8
+ url: https://apifreaks.com/contact
9
+ email: support@apifreaks.com
10
+ servers:
11
+ - url: https://api.apifreaks.com/v1.0
12
+ description: Supported Flags API Server
13
+ paths:
14
+ /flags/supported:
15
+ get:
16
+ tags:
17
+ - Flags APIs
18
+ summary: Retrieve list of all supported flags
19
+ description: Returns a list of all supported country and international organization flags with their metadata.
20
+ operationId: getSupportedFlags
21
+ parameters:
22
+ - name: format
23
+ in: query
24
+ required: false
25
+ description: 'Format of the response. Possible values: json, xml.'
26
+ schema:
27
+ type: string
28
+ enum:
29
+ - json
30
+ - xml
31
+ default: json
32
+ responses:
33
+ '200':
34
+ description: Successful response with list of supported flags
35
+ content:
36
+ application/json:
37
+ schema:
38
+ $ref: '#/components/schemas/SupportedFlagsResponse'
39
+ examples:
40
+ typicalSuccess:
41
+ summary: Typical successful response
42
+ value:
43
+ supported_countries:
44
+ - name: Luxembourg
45
+ iso2: LU
46
+ iso3: LUX
47
+ - name: Suriname
48
+ iso2: SR
49
+ iso3: SUR
50
+ - name: Tunisia
51
+ iso2: TN
52
+ iso3: TUN
53
+ - name: Colombia
54
+ iso2: CO
55
+ iso3: COL
56
+ - name: Pakistan
57
+ iso2: PK
58
+ iso3: PAK
59
+ supported_organizations:
60
+ - Commonwealth_of_Independent_States
61
+ - Gulf_Cooperation_Council
62
+ - Arab_League
63
+ - Organization_of_American_States
64
+ - African_Union
65
+ - European_Union
66
+ - United_Nations
67
+ - NATO
68
+ - Association_of_Southeast_Asian_Nations
69
+ - Commonwealth_of_Nations
70
+ components:
71
+ securitySchemes:
72
+ ApiKeyAuthHeader:
73
+ type: apiKey
74
+ in: header
75
+ name: X-apiKey
76
+ description: Pass your API key via the X-apiKey request header.
77
+ ApiKeyAuthQuery:
78
+ type: apiKey
79
+ in: query
80
+ name: apiKey
81
+ description: Pass your API key via the apiKey query parameter.
82
+ schemas:
83
+ SupportedFlagsResponse:
84
+ type: object
85
+ description: The full list of country and organization flag identifiers supported by the Flags API.
86
+ required:
87
+ - supported_countries
88
+ - supported_organizations
89
+ properties:
90
+ supported_countries:
91
+ type: array
92
+ description: List of all supported country flags with their ISO codes and names.
93
+ items:
94
+ $ref: '#/components/schemas/SupportedCountry'
95
+ supported_organizations:
96
+ type: array
97
+ description: List of all supported international organization flag identifiers.
98
+ items:
99
+ type: string
100
+ SupportedCountry:
101
+ type: object
102
+ description: A supported country with ISO codes.
103
+ required:
104
+ - name
105
+ - iso2
106
+ - iso3
107
+ properties:
108
+ name:
109
+ type: string
110
+ description: Full name of the country.
111
+ iso2:
112
+ type: string
113
+ description: ISO 3166-1 alpha-2 code.
114
+ iso3:
115
+ type: string
116
+ description: ISO 3166-1 alpha-3 code.
117
+ security:
118
+ - ApiKeyAuthHeader: []
119
+ - ApiKeyAuthQuery: []
@@ -0,0 +1,170 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: Flags API - Country & Organization Flags in Multiple Formats, Shapes, or Sizes
4
+ version: 1.0.0
5
+ 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.
6
+ contact:
7
+ name: APIFreaks Support
8
+ url: https://apifreaks.com/contact
9
+ email: support@apifreaks.com
10
+ servers:
11
+ - url: https://api.apifreaks.com/v1.0
12
+ description: Flags API Server
13
+ paths:
14
+ /flags:
15
+ get:
16
+ tags:
17
+ - Flags APIs
18
+ summary: Retrieve a country or organization flag image
19
+ description: Returns a flag image for a specified country or international organization. Supports PNG, WEBP, and SVG formats with flat or round shapes.
20
+ operationId: getFlag
21
+ parameters:
22
+ - name: name
23
+ in: query
24
+ required: true
25
+ 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.
26
+ schema:
27
+ type: string
28
+ - name: type
29
+ in: query
30
+ required: true
31
+ description: 'Type of flag to retrieve. Possible values: country, organization.'
32
+ schema:
33
+ type: string
34
+ enum:
35
+ - country
36
+ - organization
37
+ - name: shape
38
+ in: query
39
+ required: true
40
+ description: 'Shape of the flag image. Possible values: flat, round.'
41
+ schema:
42
+ type: string
43
+ enum:
44
+ - flat
45
+ - round
46
+ - name: format
47
+ in: query
48
+ required: false
49
+ description: 'Image format. Possible values: png, webp, svg. Default: png.'
50
+ schema:
51
+ type: string
52
+ enum:
53
+ - png
54
+ - webp
55
+ - svg
56
+ default: png
57
+ - name: size
58
+ in: query
59
+ required: false
60
+ 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.'
61
+ schema:
62
+ type: string
63
+ enum:
64
+ - 16px
65
+ - 24px
66
+ - 32px
67
+ - 48px
68
+ - 64px
69
+ responses:
70
+ '200':
71
+ description: Successful response with the flag image as raw binary data (not JSON) in the format requested
72
+ content:
73
+ image/png:
74
+ schema:
75
+ $ref: '#/components/schemas/ApiResponseSchemas'
76
+ image/webp:
77
+ schema:
78
+ $ref: '#/components/schemas/ApiResponseSchemas'
79
+ image/svg+xml:
80
+ schema:
81
+ $ref: '#/components/schemas/ApiResponseSchemas'
82
+ '400':
83
+ description: Bad Request — Missing required parameter, or type/shape/format/size is not one of the allowed enum values
84
+ content:
85
+ application/json:
86
+ schema:
87
+ $ref: '#/components/schemas/ErrorResponse'
88
+ examples:
89
+ MissingParams:
90
+ summary: Missing required name, type, or shape parameter
91
+ value:
92
+ error: Invalid Param Exception
93
+ message: please pass correct parameters
94
+ path: /v1.0/flags
95
+ status: 400
96
+ timestamp: '2026-07-24T11:04:56.443Z'
97
+ InvalidType:
98
+ summary: type is not country or organization
99
+ value:
100
+ timestamp: '2026-07-24T11:04:56.981953+00:00'
101
+ path: /flags
102
+ status: 400
103
+ error: Bad Request
104
+ message: Invalid type
105
+ InvalidShape:
106
+ summary: shape is not flat or round
107
+ value:
108
+ timestamp: '2026-07-24T11:04:57.507529+00:00'
109
+ path: /flags
110
+ status: 400
111
+ error: Bad Request
112
+ message: Invalid shape
113
+ '404':
114
+ description: Not Found — Country code or organization identifier not recognized
115
+ content:
116
+ application/json:
117
+ schema:
118
+ $ref: '#/components/schemas/ErrorResponse'
119
+ examples:
120
+ InvalidCountryCode:
121
+ summary: Invalid country name or code
122
+ value:
123
+ timestamp: '2026-07-24T11:04:58.077767+00:00'
124
+ path: /flags
125
+ status: 404
126
+ error: Not Found
127
+ message: 'Invalid country name or code: ZZ'
128
+ components:
129
+ securitySchemes:
130
+ ApiKeyAuthHeader:
131
+ type: apiKey
132
+ in: header
133
+ name: X-apiKey
134
+ description: Pass your API key via the X-apiKey request header.
135
+ ApiKeyAuthQuery:
136
+ type: apiKey
137
+ in: query
138
+ name: apiKey
139
+ description: Pass your API key via the apiKey query parameter.
140
+ schemas:
141
+ ApiResponseSchemas:
142
+ type: string
143
+ format: binary
144
+ title: Flag Image Response
145
+ 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.
146
+ ErrorResponse:
147
+ type: object
148
+ 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.
149
+ required:
150
+ - message
151
+ properties:
152
+ error:
153
+ type: string
154
+ description: Short error category or exception type.
155
+ message:
156
+ type: string
157
+ description: Human-readable error message describing the failure.
158
+ path:
159
+ type: string
160
+ description: API endpoint path that produced the error.
161
+ status:
162
+ type: integer
163
+ description: HTTP status code returned with the error.
164
+ timestamp:
165
+ type: string
166
+ format: date-time
167
+ description: Timestamp when the error occurred (ISO 8601).
168
+ security:
169
+ - ApiKeyAuthHeader: []
170
+ - ApiKeyAuthQuery: []
@@ -0,0 +1,76 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: Regions API - Retrieve World Regions & Subregions
4
+ version: 1.0.0
5
+ description: Retrieve all geographical regions supported by the GeoDB service. Returns a flat array of exactly 6 region names - Africa, Americas, Asia, Europe, Oceania, and Polar. This endpoint takes no required parameters, ignores unrecognized query parameters rather than erroring, and has no documented error responses. Use the returned region names with the Subregions endpoint to drill down into subregional data.
6
+ contact:
7
+ name: APIFreaks Support
8
+ url: https://apifreaks.com/contact
9
+ email: support@apifreaks.com
10
+ servers:
11
+ - url: https://api.apifreaks.com/v1.0
12
+ description: Regions API Server
13
+ paths:
14
+ /geo/regions:
15
+ get:
16
+ tags:
17
+ - GeoDB APIs
18
+ summary: Retrieve all geographical regions
19
+ description: Returns all geographical regions supported by the service, such as Africa, Americas, Asia, Europe, Oceania, and Polar.
20
+ operationId: getRegions
21
+ parameters:
22
+ - name: format
23
+ in: query
24
+ required: false
25
+ description: 'Format of the response. Possible values: json, xml.'
26
+ schema:
27
+ type: string
28
+ enum:
29
+ - json
30
+ - xml
31
+ default: json
32
+ responses:
33
+ '200':
34
+ description: Successful response with list of regions
35
+ content:
36
+ application/json:
37
+ schema:
38
+ $ref: '#/components/schemas/RegionsResponse'
39
+ examples:
40
+ typicalSuccess:
41
+ summary: Typical successful response
42
+ value:
43
+ regions:
44
+ - Africa
45
+ - Americas
46
+ - Asia
47
+ - Europe
48
+ - Oceania
49
+ - Polar
50
+ components:
51
+ securitySchemes:
52
+ ApiKeyAuthHeader:
53
+ type: apiKey
54
+ in: header
55
+ name: X-apiKey
56
+ description: Pass your API key via the X-apiKey request header.
57
+ ApiKeyAuthQuery:
58
+ type: apiKey
59
+ in: query
60
+ name: apiKey
61
+ description: Pass your API key via the apiKey query parameter.
62
+ schemas:
63
+ RegionsResponse:
64
+ type: object
65
+ description: Response containing the flat list of geographical regions supported by the GeoDB service.
66
+ required:
67
+ - regions
68
+ properties:
69
+ regions:
70
+ type: array
71
+ description: An array of region names representing all geographical regions supported by the service.
72
+ items:
73
+ type: string
74
+ security:
75
+ - ApiKeyAuthHeader: []
76
+ - ApiKeyAuthQuery: []