@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,279 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "ZIP Codes Search by City API: Find ZIP Codes for Any City or State/Province/Region",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Find all ZIP and postal codes for any city worldwide. Provide a city name and country code to retrieve the complete list of codes associated with that location. Supports an optional state_name filter for countries with administrative divisions. Results are paginated; each page returns the codes array plus total result count, total pages, current page, and current page size. An unrecognized city/country combination returns a 404, as does requesting a page beyond the available range.",
|
|
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 Codes by City API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/zipcode/search/city": {
|
|
21
|
+
"get": {
|
|
22
|
+
"tags": ["ZIP Code APIs"],
|
|
23
|
+
"summary": "Search ZIP/postal codes by city",
|
|
24
|
+
"description": "Returns every ZIP/postal code associated with the given city and country, optionally narrowed by state or province.",
|
|
25
|
+
"operationId": "searchZipByCity",
|
|
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": "city",
|
|
40
|
+
"in": "query",
|
|
41
|
+
"required": true,
|
|
42
|
+
"schema": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"description": "Name of the city to find ZIP/postal codes for."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "country",
|
|
49
|
+
"in": "query",
|
|
50
|
+
"required": true,
|
|
51
|
+
"schema": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
},
|
|
54
|
+
"description": "Country code in ISO 3166-1 alpha-2 format."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "state_name",
|
|
58
|
+
"in": "query",
|
|
59
|
+
"required": false,
|
|
60
|
+
"schema": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"description": "Name of the state or province associated with the country. Useful to disambiguate cities with the same name in different states."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "page",
|
|
67
|
+
"in": "query",
|
|
68
|
+
"required": false,
|
|
69
|
+
"schema": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"default": 1,
|
|
72
|
+
"minimum": 1
|
|
73
|
+
},
|
|
74
|
+
"description": "Page number to retrieve paginated results."
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"responses": {
|
|
78
|
+
"200": {
|
|
79
|
+
"description": "ZIP/postal codes retrieved successfully",
|
|
80
|
+
"content": {
|
|
81
|
+
"application/json": {
|
|
82
|
+
"schema": {
|
|
83
|
+
"$ref": "#/components/schemas/ZipcodeSearchCityResponse"
|
|
84
|
+
},
|
|
85
|
+
"examples": {
|
|
86
|
+
"success": {
|
|
87
|
+
"summary": "Codes for a city",
|
|
88
|
+
"value": {
|
|
89
|
+
"total_results": 368,
|
|
90
|
+
"total_pages": 1,
|
|
91
|
+
"current_page": 1,
|
|
92
|
+
"current_page_size": 368,
|
|
93
|
+
"codes": [
|
|
94
|
+
"90001",
|
|
95
|
+
"90002",
|
|
96
|
+
"90003",
|
|
97
|
+
"90210",
|
|
98
|
+
"90211",
|
|
99
|
+
"90212"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"400": {
|
|
108
|
+
"description": "Bad Request — Missing city, invalid country code, or invalid page number",
|
|
109
|
+
"content": {
|
|
110
|
+
"application/json": {
|
|
111
|
+
"schema": {
|
|
112
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
113
|
+
},
|
|
114
|
+
"examples": {
|
|
115
|
+
"MissingCity": {
|
|
116
|
+
"summary": "Missing required city parameter",
|
|
117
|
+
"value": {
|
|
118
|
+
"error": "Invalid Param Exception",
|
|
119
|
+
"message": "please pass correct parameters",
|
|
120
|
+
"path": "/v1.0/zipcode/search/city",
|
|
121
|
+
"status": 400,
|
|
122
|
+
"timestamp": "2026-07-27T11:22:48.293Z"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"BadCountry": {
|
|
126
|
+
"summary": "country is not a valid ISO 3166-1 alpha-2 code",
|
|
127
|
+
"value": {
|
|
128
|
+
"timestamp": "2026-07-27T11:22:59.112Z",
|
|
129
|
+
"path": "/v1.0/zipcode/search/city",
|
|
130
|
+
"status": 400,
|
|
131
|
+
"error": "Invalid Country Code Provided",
|
|
132
|
+
"message": "Only ISO 3166-1 alpha-2 codes country codes are supported."
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"BadPage": {
|
|
136
|
+
"summary": "page is 0 or negative",
|
|
137
|
+
"value": {
|
|
138
|
+
"timestamp": "2026-07-27T11:22:59.742Z",
|
|
139
|
+
"path": "/v1.0/zipcode/search/city",
|
|
140
|
+
"status": 400,
|
|
141
|
+
"error": "Invalid Page Number",
|
|
142
|
+
"message": "The page number must be greater than 0."
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"404": {
|
|
150
|
+
"description": "Not Found — No codes for the city, or requested page is out of range",
|
|
151
|
+
"content": {
|
|
152
|
+
"application/json": {
|
|
153
|
+
"schema": {
|
|
154
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
155
|
+
},
|
|
156
|
+
"examples": {
|
|
157
|
+
"NotFound": {
|
|
158
|
+
"summary": "No codes found for the given city/country",
|
|
159
|
+
"value": {
|
|
160
|
+
"timestamp": "2026-07-27T11:23:00.301Z",
|
|
161
|
+
"path": "/v1.0/zipcode/search/city",
|
|
162
|
+
"status": 404,
|
|
163
|
+
"error": "Postal/Zip Codes Not Found",
|
|
164
|
+
"message": "No postal/zip codes found for the provided city Nonexistentcityxyz123 in country US."
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"PageNotFound": {
|
|
168
|
+
"summary": "Requested page exceeds total_pages",
|
|
169
|
+
"value": {
|
|
170
|
+
"timestamp": "2026-07-27T11:23:00.873Z",
|
|
171
|
+
"path": "/v1.0/zipcode/search/city",
|
|
172
|
+
"status": 404,
|
|
173
|
+
"error": "Page Not Found",
|
|
174
|
+
"message": "The requested page exceeds the available page range."
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"components": {
|
|
186
|
+
"securitySchemes": {
|
|
187
|
+
"ApiKeyAuthHeader": {
|
|
188
|
+
"type": "apiKey",
|
|
189
|
+
"in": "header",
|
|
190
|
+
"name": "X-apiKey",
|
|
191
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
192
|
+
},
|
|
193
|
+
"ApiKeyAuthQuery": {
|
|
194
|
+
"type": "apiKey",
|
|
195
|
+
"in": "query",
|
|
196
|
+
"name": "apiKey",
|
|
197
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"schemas": {
|
|
201
|
+
"ZipcodeSearchCityResponse": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"description": "ZIP/postal codes for the requested city, with pagination metadata.",
|
|
204
|
+
"required": [
|
|
205
|
+
"total_results",
|
|
206
|
+
"total_pages",
|
|
207
|
+
"current_page",
|
|
208
|
+
"current_page_size",
|
|
209
|
+
"codes"
|
|
210
|
+
],
|
|
211
|
+
"properties": {
|
|
212
|
+
"total_results": {
|
|
213
|
+
"type": "integer",
|
|
214
|
+
"description": "Total number of ZIP/postal codes found, across all pages."
|
|
215
|
+
},
|
|
216
|
+
"total_pages": {
|
|
217
|
+
"type": "integer",
|
|
218
|
+
"description": "Total number of pages available."
|
|
219
|
+
},
|
|
220
|
+
"current_page": {
|
|
221
|
+
"type": "integer",
|
|
222
|
+
"description": "Current page number."
|
|
223
|
+
},
|
|
224
|
+
"current_page_size": {
|
|
225
|
+
"type": "integer",
|
|
226
|
+
"description": "Number of ZIP/postal codes in the current page."
|
|
227
|
+
},
|
|
228
|
+
"codes": {
|
|
229
|
+
"type": "array",
|
|
230
|
+
"description": "List of ZIP/postal codes for the current page.",
|
|
231
|
+
"items": {
|
|
232
|
+
"$ref": "#/components/schemas/PostalCode"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"PostalCode": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"description": "A single ZIP or postal code."
|
|
240
|
+
},
|
|
241
|
+
"ErrorResponse": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
244
|
+
"required": ["message"],
|
|
245
|
+
"properties": {
|
|
246
|
+
"error": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"description": "Short error category or exception type."
|
|
249
|
+
},
|
|
250
|
+
"message": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"description": "Human-readable error message describing the failure."
|
|
253
|
+
},
|
|
254
|
+
"path": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"description": "API endpoint path that produced the error."
|
|
257
|
+
},
|
|
258
|
+
"status": {
|
|
259
|
+
"type": "integer",
|
|
260
|
+
"description": "HTTP status code returned with the error."
|
|
261
|
+
},
|
|
262
|
+
"timestamp": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"format": "date-time",
|
|
265
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"security": [
|
|
272
|
+
{
|
|
273
|
+
"ApiKeyAuthHeader": []
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"ApiKeyAuthQuery": []
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "ZIP Codes by Region API Reference",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Find all ZIP and postal codes for any state, province, or region worldwide. Provide a country code and either a region name or region ISO code to retrieve all codes in that administrative division; region_code takes priority when both are supplied. Results are paginated with up to 500 codes per page, and the response includes total result count, total pages, current page, and current page size. An unrecognized region returns a 404, as does requesting a page beyond the available range.",
|
|
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 Codes by Region API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/zipcode/search/region": {
|
|
21
|
+
"get": {
|
|
22
|
+
"tags": ["ZIP Code APIs"],
|
|
23
|
+
"summary": "Search ZIP codes by region",
|
|
24
|
+
"description": "Returns every ZIP/postal code within the given region, state, or province of a country.",
|
|
25
|
+
"operationId": "searchZipByRegion",
|
|
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": "country",
|
|
40
|
+
"in": "query",
|
|
41
|
+
"required": true,
|
|
42
|
+
"schema": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"description": "Country code in ISO 3166-1 alpha-2 format."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "region",
|
|
49
|
+
"in": "query",
|
|
50
|
+
"required": false,
|
|
51
|
+
"schema": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
},
|
|
54
|
+
"description": "Name of the region, state, or province associated with the country. Either region or region_code is required."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "region_code",
|
|
58
|
+
"in": "query",
|
|
59
|
+
"required": false,
|
|
60
|
+
"schema": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"description": "ISO code of the region, state, or province associated with the country. Either region or region_code is required. region_code takes priority if both are given."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "page",
|
|
67
|
+
"in": "query",
|
|
68
|
+
"required": false,
|
|
69
|
+
"schema": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"default": 1,
|
|
72
|
+
"minimum": 1
|
|
73
|
+
},
|
|
74
|
+
"description": "Page number to retrieve. Each page returns up to 500 results."
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"responses": {
|
|
78
|
+
"200": {
|
|
79
|
+
"description": "ZIP/postal codes retrieved successfully",
|
|
80
|
+
"content": {
|
|
81
|
+
"application/json": {
|
|
82
|
+
"schema": {
|
|
83
|
+
"$ref": "#/components/schemas/ZipcodeSearchRegionResponse"
|
|
84
|
+
},
|
|
85
|
+
"examples": {
|
|
86
|
+
"success": {
|
|
87
|
+
"summary": "Codes for a region",
|
|
88
|
+
"value": {
|
|
89
|
+
"total_results": 2591,
|
|
90
|
+
"total_pages": 6,
|
|
91
|
+
"current_page": 1,
|
|
92
|
+
"current_page_size": 500,
|
|
93
|
+
"codes": [
|
|
94
|
+
"90001",
|
|
95
|
+
"90002",
|
|
96
|
+
"90003",
|
|
97
|
+
"90004",
|
|
98
|
+
"90005"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"400": {
|
|
107
|
+
"description": "Bad Request — Missing region/region_code, invalid country code, or invalid page number",
|
|
108
|
+
"content": {
|
|
109
|
+
"application/json": {
|
|
110
|
+
"schema": {
|
|
111
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
112
|
+
},
|
|
113
|
+
"examples": {
|
|
114
|
+
"MissingRegion": {
|
|
115
|
+
"summary": "Neither region nor region_code was provided",
|
|
116
|
+
"value": {
|
|
117
|
+
"error": "Invalid Param Exception",
|
|
118
|
+
"message": "please pass correct parameters",
|
|
119
|
+
"path": "/v1.0/zipcode/search/region",
|
|
120
|
+
"status": 400,
|
|
121
|
+
"timestamp": "2026-07-27T11:23:39.623Z"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"BadCountry": {
|
|
125
|
+
"summary": "country is not a valid ISO 3166-1 alpha-2 code",
|
|
126
|
+
"value": {
|
|
127
|
+
"timestamp": "2026-07-27T11:23:46.673Z",
|
|
128
|
+
"path": "/v1.0/zipcode/search/region",
|
|
129
|
+
"status": 400,
|
|
130
|
+
"error": "Invalid Country Code Provided",
|
|
131
|
+
"message": "Only ISO 3166-1 alpha-2 codes country codes are supported."
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"BadPage": {
|
|
135
|
+
"summary": "page is 0 or negative",
|
|
136
|
+
"value": {
|
|
137
|
+
"timestamp": "2026-07-27T11:23:47.192Z",
|
|
138
|
+
"path": "/v1.0/zipcode/search/region",
|
|
139
|
+
"status": 400,
|
|
140
|
+
"error": "Invalid Page Number",
|
|
141
|
+
"message": "The page number must be greater than 0."
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"404": {
|
|
149
|
+
"description": "Not Found — No codes for the region, or requested page is out of range",
|
|
150
|
+
"content": {
|
|
151
|
+
"application/json": {
|
|
152
|
+
"schema": {
|
|
153
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
154
|
+
},
|
|
155
|
+
"examples": {
|
|
156
|
+
"NotFound": {
|
|
157
|
+
"summary": "No codes found for the given region/country",
|
|
158
|
+
"value": {
|
|
159
|
+
"timestamp": "2026-07-27T11:23:47.785Z",
|
|
160
|
+
"path": "/v1.0/zipcode/search/region",
|
|
161
|
+
"status": 404,
|
|
162
|
+
"error": "Postal/Zip Codes Not Found",
|
|
163
|
+
"message": "No postal/zip codes found for the provided region Nonexistentregionxyz in country US."
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"PageNotFound": {
|
|
167
|
+
"summary": "Requested page exceeds total_pages",
|
|
168
|
+
"value": {
|
|
169
|
+
"timestamp": "2026-07-27T11:23:48.312Z",
|
|
170
|
+
"path": "/v1.0/zipcode/search/region",
|
|
171
|
+
"status": 404,
|
|
172
|
+
"error": "Page Not Found",
|
|
173
|
+
"message": "The requested page exceeds the available page range."
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"components": {
|
|
185
|
+
"securitySchemes": {
|
|
186
|
+
"ApiKeyAuthHeader": {
|
|
187
|
+
"type": "apiKey",
|
|
188
|
+
"in": "header",
|
|
189
|
+
"name": "X-apiKey",
|
|
190
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
191
|
+
},
|
|
192
|
+
"ApiKeyAuthQuery": {
|
|
193
|
+
"type": "apiKey",
|
|
194
|
+
"in": "query",
|
|
195
|
+
"name": "apiKey",
|
|
196
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"schemas": {
|
|
200
|
+
"ZipcodeSearchRegionResponse": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"description": "ZIP/postal codes for the requested region, with pagination metadata.",
|
|
203
|
+
"required": [
|
|
204
|
+
"total_results",
|
|
205
|
+
"total_pages",
|
|
206
|
+
"current_page",
|
|
207
|
+
"current_page_size",
|
|
208
|
+
"codes"
|
|
209
|
+
],
|
|
210
|
+
"properties": {
|
|
211
|
+
"total_results": {
|
|
212
|
+
"type": "integer",
|
|
213
|
+
"description": "Total number of ZIP/postal codes found, across all pages."
|
|
214
|
+
},
|
|
215
|
+
"total_pages": {
|
|
216
|
+
"type": "integer",
|
|
217
|
+
"description": "Total number of pages available."
|
|
218
|
+
},
|
|
219
|
+
"current_page": {
|
|
220
|
+
"type": "integer",
|
|
221
|
+
"description": "Current page number."
|
|
222
|
+
},
|
|
223
|
+
"current_page_size": {
|
|
224
|
+
"type": "integer",
|
|
225
|
+
"description": "Number of ZIP/postal codes in the current page."
|
|
226
|
+
},
|
|
227
|
+
"codes": {
|
|
228
|
+
"type": "array",
|
|
229
|
+
"description": "List of ZIP/postal codes for the current page.",
|
|
230
|
+
"items": {
|
|
231
|
+
"$ref": "#/components/schemas/PostalCode"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"PostalCode": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"description": "A single ZIP or postal code."
|
|
239
|
+
},
|
|
240
|
+
"ErrorResponse": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
243
|
+
"required": ["message"],
|
|
244
|
+
"properties": {
|
|
245
|
+
"error": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"description": "Short error category or exception type."
|
|
248
|
+
},
|
|
249
|
+
"message": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "Human-readable error message describing the failure."
|
|
252
|
+
},
|
|
253
|
+
"path": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"description": "API endpoint path that produced the error."
|
|
256
|
+
},
|
|
257
|
+
"status": {
|
|
258
|
+
"type": "integer",
|
|
259
|
+
"description": "HTTP status code returned with the error."
|
|
260
|
+
},
|
|
261
|
+
"timestamp": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"format": "date-time",
|
|
264
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"security": [
|
|
271
|
+
{
|
|
272
|
+
"ApiKeyAuthHeader": []
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"ApiKeyAuthQuery": []
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
}
|