@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,318 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Bulk ZIP Code Lookup API Reference",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Look up multiple ZIP or postal codes in a single POST request, up to 100 codes per batch. Each matched code returns city, region, region code, locality, country code, latitude, and longitude. Accepts an optional `country` field in the request body to limit results to one country. Codes with no match are silently omitted from the `results` array instead of appearing as per-item error entries — the array can be shorter than the requested `codes` list. A malformed request body or invalid country code returns a 400; if none of the submitted codes match anything, the whole request returns a 404.",
|
|
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": "Bulk ZIP Code Lookup API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/zipcode/lookup": {
|
|
21
|
+
"post": {
|
|
22
|
+
"tags": ["ZIP Code APIs"],
|
|
23
|
+
"summary": "Look up multiple ZIP/postal codes in one request",
|
|
24
|
+
"operationId": "bulkLookupZipCodes",
|
|
25
|
+
"description": "Looks up up to 100 ZIP/postal codes in a single request and returns matching location data for each code that resolves.",
|
|
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
|
+
"content": {
|
|
42
|
+
"application/json": {
|
|
43
|
+
"schema": {
|
|
44
|
+
"$ref": "#/components/schemas/BulkZipRequest"
|
|
45
|
+
},
|
|
46
|
+
"examples": {
|
|
47
|
+
"typicalRequest": {
|
|
48
|
+
"summary": "Typical bulk lookup request",
|
|
49
|
+
"value": {
|
|
50
|
+
"codes": ["10001", "90210"],
|
|
51
|
+
"country": "US"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"responses": {
|
|
59
|
+
"200": {
|
|
60
|
+
"description": "Successful response. `results` contains one entry per code that matched, in match order — codes with no match are omitted rather than represented as error entries, so the array can be shorter than the requested `codes` list.",
|
|
61
|
+
"content": {
|
|
62
|
+
"application/json": {
|
|
63
|
+
"schema": {
|
|
64
|
+
"$ref": "#/components/schemas/ZipcodeLookupResponse"
|
|
65
|
+
},
|
|
66
|
+
"examples": {
|
|
67
|
+
"typicalSuccess": {
|
|
68
|
+
"summary": "All requested codes matched",
|
|
69
|
+
"value": {
|
|
70
|
+
"results": [
|
|
71
|
+
{
|
|
72
|
+
"code": "10001",
|
|
73
|
+
"country_code": "US",
|
|
74
|
+
"region": "New York",
|
|
75
|
+
"region_code": "NY",
|
|
76
|
+
"city": "New York County",
|
|
77
|
+
"locality": "Manhattan",
|
|
78
|
+
"latitude": 40.748436,
|
|
79
|
+
"longitude": -73.99402
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"code": "90210",
|
|
83
|
+
"country_code": "US",
|
|
84
|
+
"region": "California",
|
|
85
|
+
"region_code": "CA",
|
|
86
|
+
"city": "Los Angeles",
|
|
87
|
+
"locality": "Beverly Hills (Beverly Hills)",
|
|
88
|
+
"latitude": 34.10313,
|
|
89
|
+
"longitude": -118.41625
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"partialMatch": {
|
|
95
|
+
"summary": "One of two requested codes matched — the unmatched code is simply absent",
|
|
96
|
+
"value": {
|
|
97
|
+
"results": [
|
|
98
|
+
{
|
|
99
|
+
"code": "10001",
|
|
100
|
+
"country_code": "US",
|
|
101
|
+
"region": "New York",
|
|
102
|
+
"region_code": "NY",
|
|
103
|
+
"city": "New York County",
|
|
104
|
+
"locality": "Manhattan",
|
|
105
|
+
"latitude": 40.748436,
|
|
106
|
+
"longitude": -73.99402
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"400": {
|
|
116
|
+
"description": "Bad Request — Malformed body, invalid country code, or over the 100-code limit",
|
|
117
|
+
"content": {
|
|
118
|
+
"application/json": {
|
|
119
|
+
"schema": {
|
|
120
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
121
|
+
},
|
|
122
|
+
"examples": {
|
|
123
|
+
"InvalidBody": {
|
|
124
|
+
"summary": "codes field missing or malformed",
|
|
125
|
+
"value": {
|
|
126
|
+
"timestamp": "2026-07-27T11:18:38.639Z",
|
|
127
|
+
"path": "/v1.0/zipcode/lookup",
|
|
128
|
+
"status": 400,
|
|
129
|
+
"error": "Request Body Invalid",
|
|
130
|
+
"message": "Request body is missing required fields or is not in the expected format. Please refer to the API documentation."
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"InvalidCountryCode": {
|
|
134
|
+
"summary": "country is not a valid ISO 3166-1 alpha-2 code",
|
|
135
|
+
"value": {
|
|
136
|
+
"timestamp": "2026-07-27T11:18:39.139Z",
|
|
137
|
+
"path": "/v1.0/zipcode/lookup",
|
|
138
|
+
"status": 400,
|
|
139
|
+
"error": "Invalid Country Code Provided",
|
|
140
|
+
"message": "Only ISO 3166-1 alpha-2 codes country codes are supported."
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"BulkLimitExceeded": {
|
|
144
|
+
"summary": "More than 100 codes submitted",
|
|
145
|
+
"value": {
|
|
146
|
+
"timestamp": "2026-07-27T11:18:48.850Z",
|
|
147
|
+
"path": "/v1.0/zipcode/lookup",
|
|
148
|
+
"status": 400,
|
|
149
|
+
"error": "Maximum Postal/Zip Code Limit Exceeded",
|
|
150
|
+
"message": "A maximum of 100 postal/zip codes can be processed per request."
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"404": {
|
|
158
|
+
"description": "Not Found — None of the submitted codes matched anything",
|
|
159
|
+
"content": {
|
|
160
|
+
"application/json": {
|
|
161
|
+
"schema": {
|
|
162
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
163
|
+
},
|
|
164
|
+
"examples": {
|
|
165
|
+
"ZipNotFound": {
|
|
166
|
+
"summary": "No codes matched",
|
|
167
|
+
"value": {
|
|
168
|
+
"timestamp": "2026-07-27T11:18:39.650Z",
|
|
169
|
+
"path": "/v1.0/zipcode/lookup",
|
|
170
|
+
"status": 404,
|
|
171
|
+
"error": "Postal/Zip Codes Not Found",
|
|
172
|
+
"message": "None of the provided postal/zip codes were found in our database."
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"components": {
|
|
184
|
+
"securitySchemes": {
|
|
185
|
+
"ApiKeyAuthHeader": {
|
|
186
|
+
"type": "apiKey",
|
|
187
|
+
"in": "header",
|
|
188
|
+
"name": "X-apiKey",
|
|
189
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
190
|
+
},
|
|
191
|
+
"ApiKeyAuthQuery": {
|
|
192
|
+
"type": "apiKey",
|
|
193
|
+
"in": "query",
|
|
194
|
+
"name": "apiKey",
|
|
195
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"schemas": {
|
|
199
|
+
"ZipcodeLookupResponse": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"description": "ZIP code lookup result containing an array of matched postal codes with location details.",
|
|
202
|
+
"required": ["results"],
|
|
203
|
+
"properties": {
|
|
204
|
+
"results": {
|
|
205
|
+
"type": "array",
|
|
206
|
+
"description": "Array of matched ZIP code results. Codes with no match are omitted, so this array can be shorter than the requested codes list.",
|
|
207
|
+
"items": {
|
|
208
|
+
"$ref": "#/components/schemas/ZipResultItem"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"ZipResultItem": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"description": "A ZIP code result containing location details.",
|
|
216
|
+
"required": [
|
|
217
|
+
"code",
|
|
218
|
+
"country_code",
|
|
219
|
+
"region",
|
|
220
|
+
"region_code",
|
|
221
|
+
"city",
|
|
222
|
+
"latitude",
|
|
223
|
+
"longitude"
|
|
224
|
+
],
|
|
225
|
+
"properties": {
|
|
226
|
+
"code": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"description": "Postal/ZIP code of the location."
|
|
229
|
+
},
|
|
230
|
+
"country_code": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"description": "Country code in ISO 3166-1 alpha-2 format."
|
|
233
|
+
},
|
|
234
|
+
"region": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"description": "Region, state, or province associated with the postal code."
|
|
237
|
+
},
|
|
238
|
+
"region_code": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"description": "Region code or abbreviation."
|
|
241
|
+
},
|
|
242
|
+
"city": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"description": "City associated with the postal code."
|
|
245
|
+
},
|
|
246
|
+
"locality": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"description": "Locality or neighborhood associated with the postal code. Can be an empty string when no locality-level data exists."
|
|
249
|
+
},
|
|
250
|
+
"latitude": {
|
|
251
|
+
"type": "number",
|
|
252
|
+
"format": "float",
|
|
253
|
+
"description": "Latitude coordinate of the postal code location."
|
|
254
|
+
},
|
|
255
|
+
"longitude": {
|
|
256
|
+
"type": "number",
|
|
257
|
+
"format": "float",
|
|
258
|
+
"description": "Longitude coordinate of the postal code location."
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"BulkZipRequest": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"description": "Request body for bulk ZIP/postal code lookup.",
|
|
265
|
+
"required": ["codes"],
|
|
266
|
+
"properties": {
|
|
267
|
+
"codes": {
|
|
268
|
+
"type": "array",
|
|
269
|
+
"description": "Array of ZIP or postal codes to look up. Maximum 100 codes per request.",
|
|
270
|
+
"items": {
|
|
271
|
+
"type": "string"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"country": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"description": "ISO 3166-1 alpha-2 country code to limit the search to. Applies to every code in the batch."
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"ErrorResponse": {
|
|
281
|
+
"type": "object",
|
|
282
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
283
|
+
"required": ["message"],
|
|
284
|
+
"properties": {
|
|
285
|
+
"error": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"description": "Short error category or exception type."
|
|
288
|
+
},
|
|
289
|
+
"message": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"description": "Human-readable error message describing the failure."
|
|
292
|
+
},
|
|
293
|
+
"path": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"description": "API endpoint path that produced the error."
|
|
296
|
+
},
|
|
297
|
+
"status": {
|
|
298
|
+
"type": "integer",
|
|
299
|
+
"description": "HTTP status code returned with the error."
|
|
300
|
+
},
|
|
301
|
+
"timestamp": {
|
|
302
|
+
"type": "string",
|
|
303
|
+
"format": "date-time",
|
|
304
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"security": [
|
|
311
|
+
{
|
|
312
|
+
"ApiKeyAuthHeader": []
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"ApiKeyAuthQuery": []
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "ZIP Code API - Global ZIP & Postal Code Lookup and Validation",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Look up and validate a single ZIP or postal code worldwide, returning every location that uses it. Returns city, region, region code, locality, country code, latitude, and longitude for each matching location. A postal code can map to multiple locations across different countries (e.g. \"90210\" matches places in the US, Ukraine, Kenya, Mexico, and Pakistan) unless the optional `country` parameter narrows the search to one country. Only one code is accepted per request — for multiple codes in one call, use the Bulk ZIP Code Lookup API instead. Invalid country codes return a 400, and codes with no match return a 404.",
|
|
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 Lookup API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/zipcode/lookup": {
|
|
21
|
+
"get": {
|
|
22
|
+
"tags": ["ZIP Code APIs"],
|
|
23
|
+
"summary": "Look up a ZIP/postal code",
|
|
24
|
+
"description": "Returns every location worldwide that matches the given postal/ZIP code, optionally narrowed to one country.",
|
|
25
|
+
"operationId": "lookupZipCode",
|
|
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
|
+
"name": "code",
|
|
40
|
+
"in": "query",
|
|
41
|
+
"required": true,
|
|
42
|
+
"schema": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"description": "The postal/ZIP code to look up. Only one code is accepted per request."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "country",
|
|
49
|
+
"in": "query",
|
|
50
|
+
"required": false,
|
|
51
|
+
"schema": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
},
|
|
54
|
+
"description": "Country code in ISO 3166-1 alpha-2 format. Limits results to that country. If not provided, matching locations from all countries are returned."
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"responses": {
|
|
58
|
+
"200": {
|
|
59
|
+
"description": "Successful response with matching ZIP code locations",
|
|
60
|
+
"content": {
|
|
61
|
+
"application/json": {
|
|
62
|
+
"schema": {
|
|
63
|
+
"$ref": "#/components/schemas/ZipcodeLookupResponse"
|
|
64
|
+
},
|
|
65
|
+
"examples": {
|
|
66
|
+
"success": {
|
|
67
|
+
"summary": "Code matched in one country",
|
|
68
|
+
"value": {
|
|
69
|
+
"results": [
|
|
70
|
+
{
|
|
71
|
+
"code": "90210",
|
|
72
|
+
"country_code": "US",
|
|
73
|
+
"region": "California",
|
|
74
|
+
"region_code": "CA",
|
|
75
|
+
"city": "Los Angeles",
|
|
76
|
+
"locality": "Beverly Hills (Beverly Hills)",
|
|
77
|
+
"latitude": 34.10313,
|
|
78
|
+
"longitude": -118.41625
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"multipleCountryMatches": {
|
|
84
|
+
"summary": "Same code matched across multiple countries (no country filter)",
|
|
85
|
+
"value": {
|
|
86
|
+
"results": [
|
|
87
|
+
{
|
|
88
|
+
"code": "90210",
|
|
89
|
+
"country_code": "US",
|
|
90
|
+
"region": "California",
|
|
91
|
+
"region_code": "CA",
|
|
92
|
+
"city": "Los Angeles",
|
|
93
|
+
"locality": "Beverly Hills (Beverly Hills)",
|
|
94
|
+
"latitude": 34.10313,
|
|
95
|
+
"longitude": -118.41625
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"code": "90210",
|
|
99
|
+
"country_code": "UA",
|
|
100
|
+
"region": "Zakarpattia Oblast",
|
|
101
|
+
"region_code": "21",
|
|
102
|
+
"city": "Batovo Settlement Hromada",
|
|
103
|
+
"locality": "Svoboda",
|
|
104
|
+
"latitude": 48.35717,
|
|
105
|
+
"longitude": 22.367962
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"code": "90210",
|
|
109
|
+
"country_code": "KE",
|
|
110
|
+
"region": "Kitui",
|
|
111
|
+
"region_code": "18",
|
|
112
|
+
"city": "Matinyani",
|
|
113
|
+
"locality": "Kalia",
|
|
114
|
+
"latitude": -1.310763,
|
|
115
|
+
"longitude": 37.969997
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"400": {
|
|
125
|
+
"description": "Bad Request — Missing code or invalid country code",
|
|
126
|
+
"content": {
|
|
127
|
+
"application/json": {
|
|
128
|
+
"schema": {
|
|
129
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
130
|
+
},
|
|
131
|
+
"examples": {
|
|
132
|
+
"MissingCode": {
|
|
133
|
+
"summary": "Missing required code parameter",
|
|
134
|
+
"value": {
|
|
135
|
+
"error": "Invalid Param Exception",
|
|
136
|
+
"message": "please pass correct parameters",
|
|
137
|
+
"path": "/v1.0/zipcode/lookup",
|
|
138
|
+
"status": 400,
|
|
139
|
+
"timestamp": "2026-07-27T11:17:13.351Z"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"InvalidCountryCode": {
|
|
143
|
+
"summary": "country is not a valid ISO 3166-1 alpha-2 code",
|
|
144
|
+
"value": {
|
|
145
|
+
"timestamp": "2026-07-27T11:17:13.872Z",
|
|
146
|
+
"path": "/v1.0/zipcode/lookup",
|
|
147
|
+
"status": 400,
|
|
148
|
+
"error": "Invalid Country Code Provided",
|
|
149
|
+
"message": "Only ISO 3166-1 alpha-2 codes country codes are supported."
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"404": {
|
|
157
|
+
"description": "Not Found — No location matches the given code",
|
|
158
|
+
"content": {
|
|
159
|
+
"application/json": {
|
|
160
|
+
"schema": {
|
|
161
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
162
|
+
},
|
|
163
|
+
"examples": {
|
|
164
|
+
"ZipNotFound": {
|
|
165
|
+
"summary": "Postal/ZIP code not found",
|
|
166
|
+
"value": {
|
|
167
|
+
"timestamp": "2026-07-27T11:17:14.474Z",
|
|
168
|
+
"path": "/v1.0/zipcode/lookup",
|
|
169
|
+
"status": 404,
|
|
170
|
+
"error": "Postal/Zip Code Not Found",
|
|
171
|
+
"message": "Provided postal/zip code was not found in our database."
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"components": {
|
|
183
|
+
"securitySchemes": {
|
|
184
|
+
"ApiKeyAuthHeader": {
|
|
185
|
+
"type": "apiKey",
|
|
186
|
+
"in": "header",
|
|
187
|
+
"name": "X-apiKey",
|
|
188
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
189
|
+
},
|
|
190
|
+
"ApiKeyAuthQuery": {
|
|
191
|
+
"type": "apiKey",
|
|
192
|
+
"in": "query",
|
|
193
|
+
"name": "apiKey",
|
|
194
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"schemas": {
|
|
198
|
+
"ZipcodeLookupResponse": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"description": "ZIP code lookup result containing an array of matching postal codes with location details.",
|
|
201
|
+
"required": ["results"],
|
|
202
|
+
"properties": {
|
|
203
|
+
"results": {
|
|
204
|
+
"type": "array",
|
|
205
|
+
"description": "Array of ZIP code results matching the requested code. When multiple locations worldwide share the same postal code, each appears as a separate entry.",
|
|
206
|
+
"items": {
|
|
207
|
+
"$ref": "#/components/schemas/ZipResultItem"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"ZipResultItem": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"description": "A ZIP code result containing location details.",
|
|
215
|
+
"required": [
|
|
216
|
+
"code",
|
|
217
|
+
"country_code",
|
|
218
|
+
"region",
|
|
219
|
+
"region_code",
|
|
220
|
+
"city",
|
|
221
|
+
"latitude",
|
|
222
|
+
"longitude"
|
|
223
|
+
],
|
|
224
|
+
"properties": {
|
|
225
|
+
"code": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"description": "Postal/ZIP code of the location."
|
|
228
|
+
},
|
|
229
|
+
"country_code": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"description": "Country code in ISO 3166-1 alpha-2 format."
|
|
232
|
+
},
|
|
233
|
+
"region": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"description": "Region, state, or province associated with the postal code."
|
|
236
|
+
},
|
|
237
|
+
"region_code": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"description": "Region code or abbreviation."
|
|
240
|
+
},
|
|
241
|
+
"city": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"description": "City associated with the postal code."
|
|
244
|
+
},
|
|
245
|
+
"locality": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"description": "Locality or neighborhood associated with the postal code. Can be an empty string when no locality-level data exists."
|
|
248
|
+
},
|
|
249
|
+
"latitude": {
|
|
250
|
+
"type": "number",
|
|
251
|
+
"format": "float",
|
|
252
|
+
"description": "Latitude coordinate of the postal code location."
|
|
253
|
+
},
|
|
254
|
+
"longitude": {
|
|
255
|
+
"type": "number",
|
|
256
|
+
"format": "float",
|
|
257
|
+
"description": "Longitude coordinate of the postal code location."
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"ErrorResponse": {
|
|
262
|
+
"type": "object",
|
|
263
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
264
|
+
"required": ["message"],
|
|
265
|
+
"properties": {
|
|
266
|
+
"error": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"description": "Short error category or exception type."
|
|
269
|
+
},
|
|
270
|
+
"message": {
|
|
271
|
+
"type": "string",
|
|
272
|
+
"description": "Human-readable error message describing the failure."
|
|
273
|
+
},
|
|
274
|
+
"path": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"description": "API endpoint path that produced the error."
|
|
277
|
+
},
|
|
278
|
+
"status": {
|
|
279
|
+
"type": "integer",
|
|
280
|
+
"description": "HTTP status code returned with the error."
|
|
281
|
+
},
|
|
282
|
+
"timestamp": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"format": "date-time",
|
|
285
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"security": [
|
|
292
|
+
{
|
|
293
|
+
"ApiKeyAuthHeader": []
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"ApiKeyAuthQuery": []
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
}
|