@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,311 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "ZIP Code Distance Match API Reference",
5
+ "version": "1.0.0",
6
+ "description": "Find all pairs of postal codes within a specified distance threshold from a list of up to 100 input codes. Specify a maximum distance and receive every pair of codes whose separation is at or below that value; if no pairs fall within the threshold, a 200 with an empty results array is returned rather than a 404. Supports six distance units: kilometers, miles, yards, meters, feet, and inches. A `country` code is always required. Results include each matched pair with its calculated distance.",
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": "ZIP Code Distance Match API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/zipcode/distance/match": {
21
+ "post": {
22
+ "tags": ["ZIP Code APIs"],
23
+ "summary": "Get matching ZIP/postal code pairs within a distance",
24
+ "operationId": "getZipcodeDistanceMatch",
25
+ "description": "Returns every pair of the requested ZIP/postal codes whose distance from each other is at or below the given threshold.",
26
+ "parameters": [
27
+ {
28
+ "name": "format",
29
+ "in": "query",
30
+ "required": false,
31
+ "schema": {
32
+ "type": "string",
33
+ "enum": ["json", "xml"],
34
+ "default": "json"
35
+ },
36
+ "description": "Format of the response. Possible values: json, xml."
37
+ }
38
+ ],
39
+ "requestBody": {
40
+ "required": true,
41
+ "description": "The list of codes, their country, and an optional distance threshold and unit.",
42
+ "content": {
43
+ "application/json": {
44
+ "schema": {
45
+ "$ref": "#/components/schemas/DistanceMatchRequest"
46
+ },
47
+ "examples": {
48
+ "typicalRequest": {
49
+ "summary": "Find pairs within 5km",
50
+ "value": {
51
+ "codes": ["90210", "90211", "90212", "10001"],
52
+ "country": "US",
53
+ "distance": 5
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ },
60
+ "responses": {
61
+ "200": {
62
+ "description": "Successful response with matching ZIP code pairs. If none of the codes are within the distance threshold of each other, results is an empty array — this is not a 404.",
63
+ "content": {
64
+ "application/json": {
65
+ "schema": {
66
+ "$ref": "#/components/schemas/ZipcodeDistanceMatchResponse"
67
+ },
68
+ "examples": {
69
+ "success": {
70
+ "summary": "Pairs within threshold",
71
+ "value": {
72
+ "result_count": 2,
73
+ "results": [
74
+ {
75
+ "code_1": "90211",
76
+ "code_2": "90212",
77
+ "distance": 1.958
78
+ },
79
+ {
80
+ "code_1": "90210",
81
+ "code_2": "90212",
82
+ "distance": 4.704
83
+ }
84
+ ]
85
+ }
86
+ },
87
+ "noPairsWithinThreshold": {
88
+ "summary": "No pairs within the threshold",
89
+ "value": {
90
+ "result_count": 0,
91
+ "results": []
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "400": {
99
+ "description": "Bad Request — Missing/invalid body, country, or unit, or over the 100-code limit",
100
+ "content": {
101
+ "application/json": {
102
+ "schema": {
103
+ "$ref": "#/components/schemas/ErrorResponse"
104
+ },
105
+ "examples": {
106
+ "InvalidBody": {
107
+ "summary": "codes field missing or malformed",
108
+ "value": {
109
+ "timestamp": "2026-07-27T11:21:58.473Z",
110
+ "path": "/v1.0/zipcode/distance/match",
111
+ "status": 400,
112
+ "error": "Request Body Invalid",
113
+ "message": "Request body is missing required fields or is not in the expected format. Please refer to the API documentation."
114
+ }
115
+ },
116
+ "MissingCountry": {
117
+ "summary": "Missing required country field",
118
+ "value": {
119
+ "timestamp": "2026-07-27T11:21:42.483Z",
120
+ "path": "/v1.0/zipcode/distance/match",
121
+ "status": 400,
122
+ "error": "Country Code Missing",
123
+ "message": "Provide a valid ISO 3166-1 alpha-2 country code."
124
+ }
125
+ },
126
+ "BadCountry": {
127
+ "summary": "country is not a valid ISO 3166-1 alpha-2 code",
128
+ "value": {
129
+ "timestamp": "2026-07-27T11:21:57.332Z",
130
+ "path": "/v1.0/zipcode/distance/match",
131
+ "status": 400,
132
+ "error": "Invalid Country Code Provided",
133
+ "message": "Only ISO 3166-1 alpha-2 codes country codes are supported."
134
+ }
135
+ },
136
+ "InvalidUnit": {
137
+ "summary": "unit is not one of the supported symbols",
138
+ "value": {
139
+ "timestamp": "2026-07-27T11:21:56.749Z",
140
+ "path": "/v1.0/zipcode/distance/match",
141
+ "status": 400,
142
+ "error": "Invalid Unit Symbol",
143
+ "message": "The provided unit symbol is invalid. Please refer to the documentation for supported units."
144
+ }
145
+ },
146
+ "OverLimit": {
147
+ "summary": "More than 100 codes submitted",
148
+ "value": {
149
+ "timestamp": "2026-07-27T11:21:57.961Z",
150
+ "path": "/v1.0/zipcode/distance/match",
151
+ "status": 400,
152
+ "error": "Maximum Postal/Zip Code Limit Exceeded",
153
+ "message": "A maximum of 100 postal/zip codes can be processed per request."
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ },
160
+ "404": {
161
+ "description": "Not Found — None of the submitted codes matched anything",
162
+ "content": {
163
+ "application/json": {
164
+ "schema": {
165
+ "$ref": "#/components/schemas/ErrorResponse"
166
+ },
167
+ "examples": {
168
+ "NotFound": {
169
+ "summary": "No codes matched",
170
+ "value": {
171
+ "timestamp": "2026-07-27T11:21:59.589Z",
172
+ "path": "/v1.0/zipcode/distance/match",
173
+ "status": 404,
174
+ "error": "Postal/Zip Codes Not Found",
175
+ "message": "None of the provided postal/zip codes were found in our database."
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ },
186
+ "components": {
187
+ "securitySchemes": {
188
+ "ApiKeyAuthHeader": {
189
+ "type": "apiKey",
190
+ "in": "header",
191
+ "name": "X-apiKey",
192
+ "description": "Pass your API key via the X-apiKey request header."
193
+ },
194
+ "ApiKeyAuthQuery": {
195
+ "type": "apiKey",
196
+ "in": "query",
197
+ "name": "apiKey",
198
+ "description": "Pass your API key via the apiKey query parameter."
199
+ }
200
+ },
201
+ "schemas": {
202
+ "ZipcodeDistanceMatchResponse": {
203
+ "type": "object",
204
+ "description": "Matching ZIP/postal code pairs within the requested distance threshold.",
205
+ "required": ["result_count", "results"],
206
+ "properties": {
207
+ "result_count": {
208
+ "type": "integer",
209
+ "description": "Number of matching ZIP/postal code pairs returned. Zero when no pairs fall within the threshold."
210
+ },
211
+ "results": {
212
+ "type": "array",
213
+ "description": "Array of matching code pairs within the requested distance threshold.",
214
+ "items": {
215
+ "$ref": "#/components/schemas/ZipcodeDistanceMatchItem"
216
+ }
217
+ }
218
+ }
219
+ },
220
+ "ZipcodeDistanceMatchItem": {
221
+ "type": "object",
222
+ "description": "A single matched pair of ZIP/postal codes with the distance between them.",
223
+ "required": ["code_1", "code_2", "distance"],
224
+ "properties": {
225
+ "code_1": {
226
+ "type": "string",
227
+ "description": "First ZIP/postal code in the pair."
228
+ },
229
+ "code_2": {
230
+ "type": "string",
231
+ "description": "Second ZIP/postal code in the pair."
232
+ },
233
+ "distance": {
234
+ "type": "number",
235
+ "format": "float",
236
+ "description": "Distance between the ZIP/postal code pair, in the unit specified by the unit field (default km)."
237
+ }
238
+ }
239
+ },
240
+ "DistanceMatchRequest": {
241
+ "type": "object",
242
+ "description": "Request body specifying the codes, country, and distance threshold to match pairs within.",
243
+ "required": ["codes", "country"],
244
+ "properties": {
245
+ "codes": {
246
+ "type": "array",
247
+ "description": "List of ZIP or postal codes to find pairs within the specified distance. Maximum 100 codes.",
248
+ "items": {
249
+ "$ref": "#/components/schemas/DistanceMatchInputCode"
250
+ }
251
+ },
252
+ "country": {
253
+ "type": "string",
254
+ "description": "Country of the codes in ISO 3166-1 alpha-2 format. Required."
255
+ },
256
+ "distance": {
257
+ "type": "number",
258
+ "format": "float",
259
+ "description": "Maximum distance threshold. All pairs within this distance are returned. If omitted, the API applies a default threshold."
260
+ },
261
+ "unit": {
262
+ "type": "string",
263
+ "enum": ["km", "mi", "yd", "m", "ft", "in"],
264
+ "default": "km",
265
+ "description": "Distance unit. Default: km."
266
+ }
267
+ }
268
+ },
269
+ "DistanceMatchInputCode": {
270
+ "type": "string",
271
+ "description": "A ZIP or postal code to find distance matches for."
272
+ },
273
+ "ErrorResponse": {
274
+ "type": "object",
275
+ "description": "Standard error envelope returned by the API on failed requests.",
276
+ "required": ["message"],
277
+ "properties": {
278
+ "error": {
279
+ "type": "string",
280
+ "description": "Short error category or exception type."
281
+ },
282
+ "message": {
283
+ "type": "string",
284
+ "description": "Human-readable error message describing the failure."
285
+ },
286
+ "path": {
287
+ "type": "string",
288
+ "description": "API endpoint path that produced the error."
289
+ },
290
+ "status": {
291
+ "type": "integer",
292
+ "description": "HTTP status code returned with the error."
293
+ },
294
+ "timestamp": {
295
+ "type": "string",
296
+ "format": "date-time",
297
+ "description": "Timestamp when the error occurred (ISO 8601)."
298
+ }
299
+ }
300
+ }
301
+ }
302
+ },
303
+ "security": [
304
+ {
305
+ "ApiKeyAuthHeader": []
306
+ },
307
+ {
308
+ "ApiKeyAuthQuery": []
309
+ }
310
+ ]
311
+ }
@@ -0,0 +1,307 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "ZIP Code Distance API - Straight-Line Distance Between ZIP & Postal Codes Worldwide",
5
+ "version": "1.0.0",
6
+ "description": "Calculate straight-line distances from a base point to up to 100 comparison postal codes in one request. The base point can be specified by a postal code or by exact latitude/longitude coordinates, but a `country` code is required either way. Supports six distance units: kilometers, miles, yards, meters, feet, and inches. Comparison codes with no match are silently omitted from the results array rather than returned as per-item errors — the array can be shorter than the requested compare list.",
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": "ZIP Code Distance API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/zipcode/distance": {
21
+ "post": {
22
+ "tags": ["ZIP Code APIs"],
23
+ "summary": "Get distance between postal codes",
24
+ "operationId": "getZipcodeDistance",
25
+ "description": "Calculates the distance from a base ZIP/postal code or coordinate pair to up to 100 comparison postal codes.",
26
+ "parameters": [
27
+ {
28
+ "name": "format",
29
+ "in": "query",
30
+ "required": false,
31
+ "schema": {
32
+ "type": "string",
33
+ "enum": ["json", "xml"],
34
+ "default": "json"
35
+ },
36
+ "description": "Format of the response. Possible values: json, xml."
37
+ }
38
+ ],
39
+ "requestBody": {
40
+ "required": true,
41
+ "description": "Base point (code or coordinates), country, and the list of postal codes to compare against it.",
42
+ "content": {
43
+ "application/json": {
44
+ "schema": {
45
+ "$ref": "#/components/schemas/DistanceRequest"
46
+ },
47
+ "examples": {
48
+ "typicalRequest": {
49
+ "summary": "Base point by code",
50
+ "value": {
51
+ "code": "90210",
52
+ "country": "US",
53
+ "compare": ["10001", "94103"]
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ },
60
+ "responses": {
61
+ "200": {
62
+ "description": "Successful response with distances. Comparison codes with no match are omitted from results rather than represented as error entries.",
63
+ "content": {
64
+ "application/json": {
65
+ "schema": {
66
+ "$ref": "#/components/schemas/ZipcodeDistanceResponse"
67
+ },
68
+ "examples": {
69
+ "success": {
70
+ "summary": "Distances to two comparison codes",
71
+ "value": {
72
+ "result_count": 2,
73
+ "results": [
74
+ {
75
+ "code": "10001",
76
+ "distance": 3948.696
77
+ },
78
+ {
79
+ "code": "94103",
80
+ "distance": 544.134
81
+ }
82
+ ]
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "400": {
90
+ "description": "Bad Request — Missing/invalid body, country, or unit, or over the 100-code limit",
91
+ "content": {
92
+ "application/json": {
93
+ "schema": {
94
+ "$ref": "#/components/schemas/ErrorResponse"
95
+ },
96
+ "examples": {
97
+ "InvalidBody": {
98
+ "summary": "compare field missing or malformed",
99
+ "value": {
100
+ "timestamp": "2026-07-27T11:20:46.922Z",
101
+ "path": "/v1.0/zipcode/distance",
102
+ "status": 400,
103
+ "error": "Request Body Invalid",
104
+ "message": "Request body is missing required fields or is not in the expected format. Please refer to the API documentation."
105
+ }
106
+ },
107
+ "MissingCountry": {
108
+ "summary": "country is required even when the base point is given as coordinates",
109
+ "value": {
110
+ "timestamp": "2026-07-27T11:20:36.514Z",
111
+ "path": "/v1.0/zipcode/distance",
112
+ "status": 400,
113
+ "error": "Country Code Missing",
114
+ "message": "Provide a valid ISO 3166-1 alpha-2 country code."
115
+ }
116
+ },
117
+ "BadCountry": {
118
+ "summary": "country is not a valid ISO 3166-1 alpha-2 code",
119
+ "value": {
120
+ "timestamp": "2026-07-27T11:20:48.768Z",
121
+ "path": "/v1.0/zipcode/distance",
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
+ "InvalidUnit": {
128
+ "summary": "unit is not one of the supported symbols",
129
+ "value": {
130
+ "timestamp": "2026-07-27T11:20:48.196Z",
131
+ "path": "/v1.0/zipcode/distance",
132
+ "status": 400,
133
+ "error": "Invalid Unit Symbol",
134
+ "message": "The provided unit symbol is invalid. Please refer to the documentation for supported units."
135
+ }
136
+ },
137
+ "OverLimit": {
138
+ "summary": "More than 100 compare codes submitted",
139
+ "value": {
140
+ "timestamp": "2026-07-27T11:20:47.652Z",
141
+ "path": "/v1.0/zipcode/distance",
142
+ "status": 400,
143
+ "error": "Maximum Postal/Zip Code Limit Exceeded",
144
+ "message": "A maximum of 100 postal/zip codes can be processed per request."
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ },
151
+ "404": {
152
+ "description": "Not Found — None of the compare codes matched anything",
153
+ "content": {
154
+ "application/json": {
155
+ "schema": {
156
+ "$ref": "#/components/schemas/ErrorResponse"
157
+ },
158
+ "examples": {
159
+ "NotFound": {
160
+ "summary": "No compare codes matched",
161
+ "value": {
162
+ "timestamp": "2026-07-27T11:20:49.310Z",
163
+ "path": "/v1.0/zipcode/distance",
164
+ "status": 404,
165
+ "error": "Postal/Zip Codes Not Found",
166
+ "message": "None of the provided postal/zip codes were found in our database."
167
+ }
168
+ }
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "components": {
178
+ "securitySchemes": {
179
+ "ApiKeyAuthHeader": {
180
+ "type": "apiKey",
181
+ "in": "header",
182
+ "name": "X-apiKey",
183
+ "description": "Pass your API key via the X-apiKey request header."
184
+ },
185
+ "ApiKeyAuthQuery": {
186
+ "type": "apiKey",
187
+ "in": "query",
188
+ "name": "apiKey",
189
+ "description": "Pass your API key via the apiKey query parameter."
190
+ }
191
+ },
192
+ "schemas": {
193
+ "ZipcodeDistanceResponse": {
194
+ "type": "object",
195
+ "description": "Distance calculation results for each comparison code that matched.",
196
+ "required": ["result_count", "results"],
197
+ "properties": {
198
+ "result_count": {
199
+ "type": "integer",
200
+ "description": "Number of distance results returned (may be less than the number of requested compare codes)."
201
+ },
202
+ "results": {
203
+ "type": "array",
204
+ "description": "Array of distance results, one per matched comparison code. Codes with no match are omitted.",
205
+ "items": {
206
+ "$ref": "#/components/schemas/ZipcodeDistanceItem"
207
+ }
208
+ }
209
+ }
210
+ },
211
+ "ZipcodeDistanceItem": {
212
+ "type": "object",
213
+ "description": "Distance from the base point to one matched comparison code.",
214
+ "required": ["code", "distance"],
215
+ "properties": {
216
+ "code": {
217
+ "type": "string",
218
+ "description": "The matched comparison ZIP/postal code."
219
+ },
220
+ "distance": {
221
+ "type": "number",
222
+ "format": "float",
223
+ "description": "Distance from the base point to this code, in the unit specified by the unit field (default km)."
224
+ }
225
+ }
226
+ },
227
+ "DistanceRequest": {
228
+ "type": "object",
229
+ "description": "Request body specifying the base point, country, and comparison codes for distance calculation.",
230
+ "required": ["country", "compare"],
231
+ "properties": {
232
+ "compare": {
233
+ "type": "array",
234
+ "description": "List of ZIP or postal codes to calculate distance from the base point. Maximum 100 codes.",
235
+ "items": {
236
+ "$ref": "#/components/schemas/DistanceCompareCode"
237
+ }
238
+ },
239
+ "code": {
240
+ "type": "string",
241
+ "description": "Base ZIP or postal code from which distances are calculated. Alternative to lat/long."
242
+ },
243
+ "country": {
244
+ "type": "string",
245
+ "description": "ISO 3166-1 alpha-2 country code for the base point. Required even when the base point is given as lat/long coordinates."
246
+ },
247
+ "lat": {
248
+ "type": "number",
249
+ "format": "float",
250
+ "description": "Base latitude coordinate (-90 to 90). Alternative to code."
251
+ },
252
+ "long": {
253
+ "type": "number",
254
+ "format": "float",
255
+ "description": "Base longitude coordinate (-180 to 180). Alternative to code."
256
+ },
257
+ "unit": {
258
+ "type": "string",
259
+ "enum": ["km", "mi", "yd", "m", "ft", "in"],
260
+ "default": "km",
261
+ "description": "Distance unit for the returned values. Default: km."
262
+ }
263
+ }
264
+ },
265
+ "DistanceCompareCode": {
266
+ "type": "string",
267
+ "description": "A ZIP or postal code to compare against the base point."
268
+ },
269
+ "ErrorResponse": {
270
+ "type": "object",
271
+ "description": "Standard error envelope returned by the API on failed requests.",
272
+ "required": ["message"],
273
+ "properties": {
274
+ "error": {
275
+ "type": "string",
276
+ "description": "Short error category or exception type."
277
+ },
278
+ "message": {
279
+ "type": "string",
280
+ "description": "Human-readable error message describing the failure."
281
+ },
282
+ "path": {
283
+ "type": "string",
284
+ "description": "API endpoint path that produced the error."
285
+ },
286
+ "status": {
287
+ "type": "integer",
288
+ "description": "HTTP status code returned with the error."
289
+ },
290
+ "timestamp": {
291
+ "type": "string",
292
+ "format": "date-time",
293
+ "description": "Timestamp when the error occurred (ISO 8601)."
294
+ }
295
+ }
296
+ }
297
+ }
298
+ },
299
+ "security": [
300
+ {
301
+ "ApiKeyAuthHeader": []
302
+ },
303
+ {
304
+ "ApiKeyAuthQuery": []
305
+ }
306
+ ]
307
+ }