@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,374 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: Bulk Phone Validation API - Validate and Verify Numbers and Carrier in Batches
4
+ version: 1.0.0
5
+ description: Validate up to 100 phone numbers in a single POST request. Each number is processed independently — invalid entries return per-number results without affecting the rest of the batch. Returns an array of validation results with the same structure as the single Phone Validation API.
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: Bulk Phone Validation API Server
13
+ paths:
14
+ /phone/validation/bulk:
15
+ post:
16
+ tags:
17
+ - Phone Validation APIs
18
+ summary: Bulk validate phone numbers
19
+ description: Validates up to 100 phone numbers in a single request. Each number is processed independently — invalid entries return per-number errors without affecting the rest of the batch.
20
+ parameters:
21
+ - name: format
22
+ in: query
23
+ required: false
24
+ schema:
25
+ type: string
26
+ enum:
27
+ - json
28
+ - xml
29
+ default: json
30
+ description: Specifies the desired format for the API response. Choose 'json' for a JSON object. If not provided, the API defaults to JSON format.
31
+ requestBody:
32
+ required: true
33
+ description: |-
34
+ Send a JSON object with a `numbers` array. Each item must have `number` and optionally `region` **or** `dialer_region` — never both at the same time.
35
+
36
+ - **International format** (`+` prefix): provide `number` only.
37
+ - **Local format** (no `+`): provide `number` + `region`.
38
+ - **IDD format** (exit code): provide `number` + `dialer_region`.
39
+ content:
40
+ application/json:
41
+ schema:
42
+ $ref: '#/components/schemas/BulkPhoneValidationRequest'
43
+ examples:
44
+ international_format:
45
+ summary: International format numbers (+ prefix) — no region needed
46
+ value:
47
+ numbers:
48
+ - number: '+14155552671'
49
+ - number: '+447911123456'
50
+ - number: '+919876543210'
51
+ local_format_with_region:
52
+ summary: Local format numbers — use region (not dialer_region)
53
+ value:
54
+ numbers:
55
+ - number: '03301112233'
56
+ region: PK
57
+ - number: '07911123456'
58
+ region: GB
59
+ - number: '09876543210'
60
+ region: IN
61
+ mixed:
62
+ summary: Mixed formats in one batch
63
+ value:
64
+ numbers:
65
+ - number: '+14155552671'
66
+ - number: '03301112233'
67
+ region: PK
68
+ - number: '0014155552671'
69
+ dialer_region: AU
70
+ responses:
71
+ '200':
72
+ description: Array of phone validation results, one entry per requested number, in the same order. A number that fails validation is not a separate error object — it's the same result shape with error/message added and possible/valid set to false. An item missing the required number field is silently omitted from the array rather than causing an error.
73
+ content:
74
+ application/json:
75
+ schema:
76
+ $ref: '#/components/schemas/BulkPhoneValidationResponse'
77
+ examples:
78
+ typicalSuccess:
79
+ summary: All numbers resolved
80
+ value:
81
+ - raw_input:
82
+ number: '+14155552671'
83
+ possible: true
84
+ valid: true
85
+ country_prefix: 1
86
+ national_number: 4155552671
87
+ country_code: US
88
+ location: San Francisco, CA
89
+ time_zones:
90
+ - America/Los_Angeles
91
+ line_type: FIXED_LINE_OR_MOBILE
92
+ formats:
93
+ E164: '+14155552671'
94
+ International: +1 415-555-2671
95
+ National: (415) 555-2671
96
+ RFC3966: tel:+1-415-555-2671
97
+ area_code_length: 3
98
+ ndc_length: 3
99
+ can_be_internationally_dialled: true
100
+ partialFailure:
101
+ summary: Mix of a valid and an invalid-format number — the failure is embedded in the item, not a separate error object
102
+ value:
103
+ - raw_input:
104
+ number: '+14155552671'
105
+ possible: true
106
+ valid: true
107
+ country_prefix: 1
108
+ national_number: 4155552671
109
+ country_code: US
110
+ location: San Francisco, CA
111
+ time_zones:
112
+ - America/Los_Angeles
113
+ line_type: FIXED_LINE_OR_MOBILE
114
+ formats:
115
+ E164: '+14155552671'
116
+ International: +1 415-555-2671
117
+ National: (415) 555-2671
118
+ RFC3966: tel:+1-415-555-2671
119
+ area_code_length: 3
120
+ ndc_length: 3
121
+ can_be_internationally_dialled: true
122
+ - raw_input:
123
+ number: abcdefg
124
+ possible: false
125
+ valid: false
126
+ error: Invalid Number Format
127
+ message: The input does not match the expected structure of a phone number.
128
+ '400':
129
+ description: Bad Request – Missing or malformed request body
130
+ content:
131
+ application/json:
132
+ schema:
133
+ $ref: '#/components/schemas/ErrorResponse'
134
+ examples:
135
+ missingNumbers:
136
+ summary: numbers field missing or malformed
137
+ value:
138
+ error: Invalid request body Exception
139
+ message: Please provide data in required format in request body
140
+ path: /v1.0/phone/validation/bulk
141
+ status: 400
142
+ timestamp: '2026-07-27T12:56:50.387Z'
143
+ '404':
144
+ description: Not Found – Wrong HTTP method used on the endpoint (e.g. GET instead of POST)
145
+ content:
146
+ application/json:
147
+ schema:
148
+ $ref: '#/components/schemas/ErrorResponse'
149
+ examples:
150
+ wrongMethod:
151
+ summary: GET used instead of POST
152
+ value:
153
+ error: Resource Not Found
154
+ message: The requested resource could not be found. Please verify the URL and try again.
155
+ path: /v1.0/phone/validation/bulk
156
+ status: 404
157
+ timestamp: '2026-07-27T12:58:41.535Z'
158
+ '408':
159
+ description: Request Timeout – Timed out while connecting to the remote server
160
+ content:
161
+ application/json:
162
+ schema:
163
+ $ref: '#/components/schemas/ErrorResponse'
164
+ examples:
165
+ error:
166
+ summary: Error response
167
+ value:
168
+ timestamp: '2026-06-06T14:00:00.000Z'
169
+ path: /v1.0/phone/validation/bulk
170
+ status: 408
171
+ error: Request Timeout
172
+ message: Timed out while connecting to the remote URL.
173
+ '413':
174
+ description: Payload Too Large – Request body exceeds the size limit
175
+ content:
176
+ application/json:
177
+ schema:
178
+ $ref: '#/components/schemas/ErrorResponse'
179
+ examples:
180
+ payloadTooLarge:
181
+ summary: Too many numbers / body too large
182
+ value:
183
+ error: Payload too large Exception
184
+ message: Maximum request body size limit exceeded
185
+ path: /v1.0/phone/validation/bulk
186
+ status: 413
187
+ timestamp: '2026-07-27T12:57:03.711Z'
188
+ '429':
189
+ description: Rate Limit Exceeded – API rate limit exceeded
190
+ content:
191
+ application/json:
192
+ schema:
193
+ $ref: '#/components/schemas/ErrorResponse'
194
+ examples:
195
+ error:
196
+ summary: Error response
197
+ value:
198
+ timestamp: '2026-06-06T14:00:00.000Z'
199
+ path: /v1.0/phone/validation/bulk
200
+ status: 429
201
+ error: Too Many Requests
202
+ message: API rate limit exceeded.
203
+ operationId: bulkValidatePhoneNumbers
204
+ components:
205
+ securitySchemes:
206
+ ApiKeyAuthHeader:
207
+ type: apiKey
208
+ in: header
209
+ name: X-apiKey
210
+ description: Pass your API key via the X-apiKey request header.
211
+ ApiKeyAuthQuery:
212
+ type: apiKey
213
+ in: query
214
+ name: apiKey
215
+ description: Pass your API key via the apiKey query parameter.
216
+ schemas:
217
+ BulkPhoneValidationResponse:
218
+ type: array
219
+ description: Array of per-number results, one entry per requested phone number that had a number field, in the same order as the request. Items missing number are silently omitted rather than erroring.
220
+ items:
221
+ $ref: '#/components/schemas/PhoneValidationResponse'
222
+ PhoneValidationResponse:
223
+ type: object
224
+ properties:
225
+ raw_input:
226
+ $ref: '#/components/schemas/PhoneRawInput'
227
+ possible:
228
+ type: boolean
229
+ description: Whether the number is possible (length and format checks only). A number can be possible but not valid.
230
+ valid:
231
+ type: boolean
232
+ description: Whether the number is valid according to the numbering plan.
233
+ country_prefix:
234
+ type: integer
235
+ description: The international dialing prefix for the number's country (e.g., 1 for US/Canada, 44 for United Kingdom).
236
+ national_number:
237
+ type: integer
238
+ description: The national significant number (the phone number without the country code).
239
+ country_code:
240
+ type: string
241
+ description: ISO-2 country code inferred from the number (e.g., US, GB).
242
+ carrier:
243
+ type: string
244
+ description: Carrier name associated with the number (if available). May not reflect ported carriers.
245
+ location:
246
+ type: string
247
+ description: Geographic description (city/region) for the number (if applicable).
248
+ time_zones:
249
+ type: array
250
+ items:
251
+ type: string
252
+ description: Array of possible time zones associated with the number.
253
+ line_type:
254
+ type: string
255
+ description: Classification of the phone line (MOBILE, FIXED_LINE, VOIP, etc.).
256
+ enum:
257
+ - MOBILE
258
+ - FIXED_LINE
259
+ - FIXED_LINE_OR_MOBILE
260
+ - VOIP
261
+ - TOLL_FREE
262
+ - PREMIUM_RATE
263
+ - SHARED_COST
264
+ - PERSONAL_NUMBER
265
+ - PAGER
266
+ - UAN
267
+ - VOICEMAIL
268
+ - UNKNOWN
269
+ formats:
270
+ $ref: '#/components/schemas/PhoneFormats'
271
+ area_code_length:
272
+ type: integer
273
+ description: Length of the geographic area code. Only applies to geographically-assigned numbers.
274
+ ndc_length:
275
+ type: integer
276
+ description: Length of the National Destination Code (NDC), the routing prefix within a country.
277
+ can_be_internationally_dialled:
278
+ type: boolean
279
+ description: Whether the number can be dialled internationally. false for short codes, emergency numbers, and domestic-only services.
280
+ error:
281
+ type: string
282
+ description: Short error category. Present only when this item failed validation (e.g. malformed number, conflicting region parameters).
283
+ message:
284
+ type: string
285
+ description: Human-readable reason for failure. Present only when this item failed validation.
286
+ description: Phone validation result for a single number in the batch. When the number fails validation, error/message are populated instead of the full metadata fields, and possible/valid are false.
287
+ required:
288
+ - raw_input
289
+ - possible
290
+ - valid
291
+ PhoneRawInput:
292
+ type: object
293
+ description: Original request payload sent by the caller.
294
+ properties:
295
+ number:
296
+ type: string
297
+ description: The phone number as entered by the user.
298
+ region:
299
+ type: string
300
+ description: ISO-2 country code.
301
+ dialer_region:
302
+ type: string
303
+ description: ISO-2 country code of the dialing origin.
304
+ required:
305
+ - number
306
+ PhoneFormats:
307
+ type: object
308
+ description: Four standardized representations of the phone number.
309
+ properties:
310
+ E164:
311
+ type: string
312
+ description: Number in E.164 format.
313
+ International:
314
+ type: string
315
+ description: Human-readable international format.
316
+ National:
317
+ type: string
318
+ description: Local format as dialed within the country.
319
+ RFC3966:
320
+ type: string
321
+ description: URI format following RFC 3966.
322
+ required: []
323
+ BulkPhoneValidationRequest:
324
+ type: object
325
+ description: Request body for bulk phone validation.
326
+ required:
327
+ - numbers
328
+ properties:
329
+ numbers:
330
+ type: array
331
+ description: Array of phone number objects. Maximum 100 per request.
332
+ maxItems: 100
333
+ items:
334
+ $ref: '#/components/schemas/BulkPhoneNumberItem'
335
+ BulkPhoneNumberItem:
336
+ type: object
337
+ description: A single phone number entry in a bulk validation request.
338
+ required:
339
+ - number
340
+ properties:
341
+ number:
342
+ type: string
343
+ description: Phone number to validate.
344
+ region:
345
+ type: string
346
+ description: Two-letter ISO country code. Required for local format numbers.
347
+ dialer_region:
348
+ type: string
349
+ description: Two-letter ISO country code of the dialing origin. Required for IDD format numbers.
350
+ ErrorResponse:
351
+ type: object
352
+ properties:
353
+ error:
354
+ type: string
355
+ description: Short error category or exception type.
356
+ message:
357
+ type: string
358
+ description: Human-readable error message describing the failure.
359
+ path:
360
+ type: string
361
+ description: API endpoint path that produced the error.
362
+ status:
363
+ type: integer
364
+ description: HTTP status code returned with the error.
365
+ timestamp:
366
+ type: string
367
+ format: date-time
368
+ description: Timestamp when the error occurred (ISO 8601).
369
+ description: Standard error envelope returned by the API on failed requests.
370
+ required:
371
+ - message
372
+ security:
373
+ - ApiKeyAuthHeader: []
374
+ - ApiKeyAuthQuery: []