@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,344 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: Phone Validation API - Carrier Lookup, Line Type Detection & Location Data
4
+ version: 1.0.0
5
+ description: Validate a single phone number and receive detailed metadata including carrier, line type, geolocation, time zones, and four standardized formats (E.164, International, National, RFC3966). Accepts international format (+ prefix), local format (with region), or IDD format (with dialer_region). Returns possible/valid status, country code, national number, area code length, and NDC length.
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: Phone Validation API Server
13
+ paths:
14
+ /phone/validation:
15
+ post:
16
+ tags:
17
+ - Phone Validation APIs
18
+ summary: Validate a single phone number
19
+ description: Validates a single phone number and returns detailed metadata including carrier, line type, geolocation, time zones, and standardized formats.
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 `number` as the only required field. Use `region` **or** `dialer_region` when needed — never both at the same time.
35
+
36
+ - **International format** (`+` prefix): provide `number` only — no region needed.
37
+ - **Local format** (no `+`, e.g. `03301112233`): provide `number` + `region` (ISO 2-letter country code).
38
+ - **IDD format** (exit code, e.g. `00923301112233`): provide `number` + `dialer_region` (country you are dialing from).
39
+ content:
40
+ application/json:
41
+ schema:
42
+ $ref: '#/components/schemas/PhoneValidationRequest'
43
+ examples:
44
+ international_format:
45
+ summary: International format (+ prefix) — no region needed
46
+ value:
47
+ number: '+14155552671'
48
+ local_format_with_region:
49
+ summary: Local format — use region (not dialer_region)
50
+ value:
51
+ number: '03301112233'
52
+ region: PK
53
+ idd_format_with_dialer_region:
54
+ summary: IDD format — use dialer_region (not region)
55
+ value:
56
+ number: '0014155552671'
57
+ dialer_region: AU
58
+ responses:
59
+ '200':
60
+ description: 'Successful phone validation response. Note: numbers that are too short or otherwise not a plausible phone number are NOT rejected with a 400 — they return 200 with possible/valid set to false and most other fields absent.'
61
+ content:
62
+ application/json:
63
+ schema:
64
+ $ref: '#/components/schemas/PhoneValidationResponse'
65
+ examples:
66
+ success:
67
+ summary: Valid, fully-resolved number
68
+ value:
69
+ raw_input:
70
+ number: '+14155552671'
71
+ possible: true
72
+ valid: true
73
+ country_prefix: 1
74
+ national_number: 4155552671
75
+ country_code: US
76
+ location: San Francisco, CA
77
+ time_zones:
78
+ - America/Los_Angeles
79
+ line_type: FIXED_LINE_OR_MOBILE
80
+ formats:
81
+ E164: '+14155552671'
82
+ International: +1 415-555-2671
83
+ National: (415) 555-2671
84
+ RFC3966: tel:+1-415-555-2671
85
+ area_code_length: 3
86
+ ndc_length: 3
87
+ can_be_internationally_dialled: true
88
+ tooShort:
89
+ summary: Too short to be a plausible number — not an error
90
+ value:
91
+ raw_input:
92
+ number: '123'
93
+ region: US
94
+ possible: false
95
+ valid: false
96
+ '400':
97
+ description: Bad Request – e.g. missing required field or both region codes provided
98
+ content:
99
+ application/json:
100
+ schema:
101
+ $ref: '#/components/schemas/ErrorResponse'
102
+ examples:
103
+ missing_number:
104
+ summary: Missing number
105
+ value:
106
+ timestamp: '2026-07-27T12:55:03.470Z'
107
+ status: 400
108
+ error: Missing Number
109
+ message: The 'number' is required in POST Body and cannot be empty.
110
+ path: /v1.0/phone-number/info
111
+ missing_region_information:
112
+ summary: Missing region information
113
+ value:
114
+ timestamp: '2026-07-27T12:55:03.962Z'
115
+ status: 400
116
+ error: Missing Region Information
117
+ message: Provide the region explicitly (e.g. 'US') or include a '+' with the country code.
118
+ path: /v1.0/phone-number/info
119
+ multiple_region_codes:
120
+ summary: Multiple region codes provided
121
+ value:
122
+ timestamp: '2026-07-27T12:55:04.456Z'
123
+ status: 400
124
+ error: Multiple Region Codes Provided
125
+ message: Provide only one region code, either 'region' or 'dialer_region', not both.
126
+ path: /v1.0/phone-number/info
127
+ invalid_region_code:
128
+ summary: Invalid region code
129
+ value:
130
+ timestamp: '2026-07-27T12:55:20.810Z'
131
+ status: 400
132
+ error: Invalid Region Code
133
+ message: Region code must be a 2-letter ISO country code (e.g., 'US', 'GB').
134
+ path: /v1.0/phone-number/info
135
+ invalid_number_format:
136
+ summary: Invalid number format
137
+ value:
138
+ timestamp: '2026-07-27T12:55:21.336Z'
139
+ status: 400
140
+ error: Invalid Number Format
141
+ message: The input does not match the expected structure of a phone number.
142
+ path: /v1.0/phone-number/info
143
+ number_too_long:
144
+ summary: Number too long
145
+ value:
146
+ timestamp: '2026-07-27T12:55:22.391Z'
147
+ status: 400
148
+ error: Number Too Long
149
+ message: The phone number has more digits than any valid phone number can have.
150
+ path: /v1.0/phone-number/info
151
+ '404':
152
+ description: Not Found – Wrong HTTP method used on the endpoint (e.g. GET instead of POST)
153
+ content:
154
+ application/json:
155
+ schema:
156
+ $ref: '#/components/schemas/ErrorResponse'
157
+ examples:
158
+ wrongMethod:
159
+ summary: GET used instead of POST
160
+ value:
161
+ error: Resource Not Found
162
+ message: The requested resource could not be found. Please verify the URL and try again.
163
+ path: /v1.0/phone/validation
164
+ status: 404
165
+ timestamp: '2026-07-27T12:56:14.351Z'
166
+ '408':
167
+ description: Request Timeout – Timed out while connecting to the remote server
168
+ content:
169
+ application/json:
170
+ schema:
171
+ $ref: '#/components/schemas/ErrorResponse'
172
+ examples:
173
+ error:
174
+ summary: Error response
175
+ value:
176
+ timestamp: '2026-06-06T14:00:00.000Z'
177
+ path: /v1.0/phone/validation
178
+ status: 408
179
+ error: Request Timeout
180
+ message: Timed out while connecting to the remote URL.
181
+ '429':
182
+ description: Rate Limit Exceeded – API rate limit exceeded
183
+ content:
184
+ application/json:
185
+ schema:
186
+ $ref: '#/components/schemas/ErrorResponse'
187
+ examples:
188
+ error:
189
+ summary: Error response
190
+ value:
191
+ timestamp: '2026-06-06T14:00:00.000Z'
192
+ path: /v1.0/phone/validation
193
+ status: 429
194
+ error: Too Many Requests
195
+ message: API rate limit exceeded.
196
+ operationId: validatePhoneNumber
197
+ components:
198
+ securitySchemes:
199
+ ApiKeyAuthHeader:
200
+ type: apiKey
201
+ in: header
202
+ name: X-apiKey
203
+ description: Pass your API key via the X-apiKey request header.
204
+ ApiKeyAuthQuery:
205
+ type: apiKey
206
+ in: query
207
+ name: apiKey
208
+ description: Pass your API key via the apiKey query parameter.
209
+ schemas:
210
+ PhoneValidationResponse:
211
+ type: object
212
+ properties:
213
+ raw_input:
214
+ $ref: '#/components/schemas/PhoneRawInput'
215
+ possible:
216
+ type: boolean
217
+ description: Whether the number is possible (length and format checks only). A number can be possible but not valid.
218
+ valid:
219
+ type: boolean
220
+ description: Whether the number is valid according to the numbering plan.
221
+ country_prefix:
222
+ type: integer
223
+ description: The international dialing prefix for the number's country (e.g., 1 for US/Canada, 44 for United Kingdom).
224
+ national_number:
225
+ type: integer
226
+ description: The national significant number (the phone number without the country code).
227
+ country_code:
228
+ type: string
229
+ description: ISO-2 country code inferred from the number (e.g., US, GB).
230
+ carrier:
231
+ type: string
232
+ description: Carrier name associated with the number (if available). May not reflect ported carriers.
233
+ location:
234
+ type: string
235
+ description: Geographic description (city/region) for the number (if applicable).
236
+ time_zones:
237
+ type: array
238
+ items:
239
+ type: string
240
+ description: Array of possible time zones associated with the number.
241
+ line_type:
242
+ type: string
243
+ description: Classification of the phone line (MOBILE, FIXED_LINE, VOIP, etc.).
244
+ enum:
245
+ - MOBILE
246
+ - FIXED_LINE
247
+ - FIXED_LINE_OR_MOBILE
248
+ - VOIP
249
+ - TOLL_FREE
250
+ - PREMIUM_RATE
251
+ - SHARED_COST
252
+ - PERSONAL_NUMBER
253
+ - PAGER
254
+ - UAN
255
+ - VOICEMAIL
256
+ - UNKNOWN
257
+ formats:
258
+ $ref: '#/components/schemas/PhoneFormats'
259
+ area_code_length:
260
+ type: integer
261
+ description: Length of the geographic area code. Only applies to geographically-assigned numbers.
262
+ ndc_length:
263
+ type: integer
264
+ description: Length of the National Destination Code (NDC), the routing prefix within a country.
265
+ can_be_internationally_dialled:
266
+ type: boolean
267
+ description: Whether the number can be dialled internationally. false for short codes, emergency numbers, and domestic-only services.
268
+ description: Phone validation response containing validation status and metadata.
269
+ required:
270
+ - raw_input
271
+ - possible
272
+ - valid
273
+ PhoneRawInput:
274
+ type: object
275
+ description: Original request payload sent by the caller.
276
+ properties:
277
+ number:
278
+ type: string
279
+ description: The phone number as entered by the user.
280
+ region:
281
+ type: string
282
+ description: ISO-2 country code. Present when provided in the request.
283
+ dialer_region:
284
+ type: string
285
+ description: ISO-2 country code of the dialing origin. Present when provided in the request.
286
+ required:
287
+ - number
288
+ PhoneFormats:
289
+ type: object
290
+ description: Four standardized representations of the phone number.
291
+ properties:
292
+ E164:
293
+ type: string
294
+ description: Number in E.164 format, the standard machine-readable format.
295
+ International:
296
+ type: string
297
+ description: Human-readable international format with country code.
298
+ National:
299
+ type: string
300
+ description: Local format as dialed within the country.
301
+ RFC3966:
302
+ type: string
303
+ description: 'URI format following RFC 3966 for tel: links.'
304
+ required: []
305
+ PhoneValidationRequest:
306
+ type: object
307
+ description: Request body for phone validation.
308
+ required:
309
+ - number
310
+ properties:
311
+ number:
312
+ type: string
313
+ description: Phone number to validate. Accepts international format (+14155552671), local format (4155552671) with region, or IDD format (0014155552671) with dialer_region.
314
+ region:
315
+ type: string
316
+ description: Two-letter ISO country code (e.g., US, GB). Required when number is in local format without + prefix. Cannot be used together with dialer_region.
317
+ dialer_region:
318
+ type: string
319
+ description: Two-letter ISO country code indicating the country the number is being dialed from. Required when number uses IDD exit code. Cannot be used together with region.
320
+ ErrorResponse:
321
+ type: object
322
+ properties:
323
+ error:
324
+ type: string
325
+ description: Short error category or exception type.
326
+ message:
327
+ type: string
328
+ description: Human-readable error message describing the failure.
329
+ path:
330
+ type: string
331
+ description: API endpoint path that produced the error.
332
+ status:
333
+ type: integer
334
+ description: HTTP status code returned with the error.
335
+ timestamp:
336
+ type: string
337
+ format: date-time
338
+ description: Timestamp when the error occurred (ISO 8601).
339
+ description: Standard error envelope returned by the API on failed requests.
340
+ required:
341
+ - message
342
+ security:
343
+ - ApiKeyAuthHeader: []
344
+ - ApiKeyAuthQuery: []