@apifreaks/openapi-specs 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +156 -0
  3. package/dist/index.cjs +44663 -0
  4. package/dist/index.d.cts +30 -0
  5. package/dist/index.d.ts +30 -0
  6. package/dist/index.js +44631 -0
  7. package/package.json +81 -0
  8. package/specs/commodity/commodity-fluctuation.json +301 -0
  9. package/specs/commodity/commodity-prices.json +317 -0
  10. package/specs/commodity/commodity-symbols.json +215 -0
  11. package/specs/commodity/commodity-time-series.json +329 -0
  12. package/specs/commodity/historical-commodity-prices.json +273 -0
  13. package/specs/currency/currency-converter.json +261 -0
  14. package/specs/currency/currency-fluctuation.json +282 -0
  15. package/specs/currency/currency-historical-data-limit.json +158 -0
  16. package/specs/currency/currency-rate.json +229 -0
  17. package/specs/currency/currency-supported.json +234 -0
  18. package/specs/currency/currency-symbols.json +161 -0
  19. package/specs/currency/currency-time-series.json +325 -0
  20. package/specs/currency/geolocalized-currency-conversion.json +287 -0
  21. package/specs/currency/historical-currency-converter.json +269 -0
  22. package/specs/currency/historical-currency-rate.json +246 -0
  23. package/specs/dns/bulk-dns-lookup.json +624 -0
  24. package/specs/dns/dns-history-lookup.json +579 -0
  25. package/specs/dns/dns-lookup.json +466 -0
  26. package/specs/dns/reverse-dns-lookup.json +414 -0
  27. package/specs/domain/bulk-domain-checker.json +284 -0
  28. package/specs/domain/domain-search-with-suggestions.json +280 -0
  29. package/specs/domain/domain-search.json +206 -0
  30. package/specs/domain/subdomain-lookup.json +343 -0
  31. package/specs/email-validation/bulk-email-validation.json +534 -0
  32. package/specs/email-validation/email-checker.json +586 -0
  33. package/specs/financial/bulk-vat-rates-country.json +341 -0
  34. package/specs/financial/financial-apis-supported-countries.json +204 -0
  35. package/specs/financial/iban-validation.json +328 -0
  36. package/specs/financial/swift-code-finder.json +192 -0
  37. package/specs/financial/swift-code-lookup.json +220 -0
  38. package/specs/financial/vat-number-validation.json +283 -0
  39. package/specs/financial/vat-rates-by-ip.json +275 -0
  40. package/specs/financial/vat-rates-country.json +288 -0
  41. package/specs/general/usage-credits.json +218 -0
  42. package/specs/geocoding/forward-geocoding.json +402 -0
  43. package/specs/geocoding/reverse-geocoding.json +326 -0
  44. package/specs/geodb/administrative-units-details.json +250 -0
  45. package/specs/geodb/administrative-units-levels.json +198 -0
  46. package/specs/geodb/administrative-units.json +237 -0
  47. package/specs/geodb/cities.json +288 -0
  48. package/specs/geodb/countries-details.json +274 -0
  49. package/specs/geodb/countries.json +276 -0
  50. package/specs/geodb/flags-supported.json +166 -0
  51. package/specs/geodb/flags.json +227 -0
  52. package/specs/geodb/regions.json +109 -0
  53. package/specs/geodb/subregions.json +217 -0
  54. package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
  55. package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
  56. package/specs/ip-intelligence/ip-locator.json +941 -0
  57. package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
  58. package/specs/other/astronomy-data.json +803 -0
  59. package/specs/pdf/delete-pdf-page.json +286 -0
  60. package/specs/pdf/linearize-pdf.json +277 -0
  61. package/specs/pdf/merge-pdf.json +285 -0
  62. package/specs/pdf/pdf-compress.json +304 -0
  63. package/specs/pdf/pdf-decrypt.json +297 -0
  64. package/specs/pdf/pdf-encrypt.json +314 -0
  65. package/specs/pdf/pdf-extract-pages.json +295 -0
  66. package/specs/pdf/pdf-file-status.json +208 -0
  67. package/specs/pdf/pdf-file.json +190 -0
  68. package/specs/pdf/pdf-files.json +126 -0
  69. package/specs/pdf/pdf-resource-download.json +168 -0
  70. package/specs/pdf/pdf-resource-upload-binary.json +218 -0
  71. package/specs/pdf/pdf-resource-upload.json +248 -0
  72. package/specs/pdf/pdf-restrict.json +343 -0
  73. package/specs/pdf/pdf-split-pages.json +281 -0
  74. package/specs/pdf/pdf-task-status.json +252 -0
  75. package/specs/pdf/pdf-to-image.json +1219 -0
  76. package/specs/pdf/pdf-unrestrict.json +324 -0
  77. package/specs/pdf/rotate-pdf-pages.json +305 -0
  78. package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
  79. package/specs/phone-validation/phone-number-validation.json +456 -0
  80. package/specs/scraper/web-scraper.json +674 -0
  81. package/specs/screenshot/bulk-screenshot.json +949 -0
  82. package/specs/screenshot/website-screenshot.json +1147 -0
  83. package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
  84. package/specs/ssl/ssl-certificate-lookup.json +634 -0
  85. package/specs/timezone/timezone-converter.json +362 -0
  86. package/specs/timezone/timezone-lookup.json +910 -0
  87. package/specs/user-agent/bulk-user-agent-parser.json +441 -0
  88. package/specs/user-agent/user-agent-parser.json +346 -0
  89. package/specs/weather/air-quality.json +779 -0
  90. package/specs/weather/bulk-live-weather.json +834 -0
  91. package/specs/weather/flood-forecast.json +693 -0
  92. package/specs/weather/historical-weather.json +1019 -0
  93. package/specs/weather/live-weather.json +789 -0
  94. package/specs/weather/marine-weather.json +940 -0
  95. package/specs/weather/time-series-weather.json +1056 -0
  96. package/specs/weather/weather-forecast.json +1202 -0
  97. package/specs/whois/asn-lookup.json +729 -0
  98. package/specs/whois/bulk-whois-lookup.json +698 -0
  99. package/specs/whois/domain-whois-history-lookup.json +500 -0
  100. package/specs/whois/reverse-whois.json +625 -0
  101. package/specs/whois/whois-domain-lookup.json +533 -0
  102. package/specs/whois/whois-ip-lookup.json +1110 -0
  103. package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
  104. package/specs/zip-code/zip-code-api.json +299 -0
  105. package/specs/zip-code/zip-code-distance-match.json +311 -0
  106. package/specs/zip-code/zip-code-distance.json +307 -0
  107. package/specs/zip-code/zip-codes-by-city.json +279 -0
  108. package/specs/zip-code/zip-codes-by-region.json +278 -0
  109. package/specs/zip-code/zip-codes-radius-search.json +349 -0
@@ -0,0 +1,456 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "Phone Validation API - Carrier Lookup, Line Type Detection & Location Data",
5
+ "version": "1.0.0",
6
+ "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.",
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": "Phone Validation API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/phone/validation": {
21
+ "post": {
22
+ "tags": ["Phone Validation APIs"],
23
+ "summary": "Validate a single phone number",
24
+ "description": "Validates a single phone number and returns detailed metadata including carrier, line type, geolocation, time zones, and standardized formats.",
25
+ "parameters": [
26
+ {
27
+ "name": "format",
28
+ "in": "query",
29
+ "required": false,
30
+ "schema": {
31
+ "type": "string",
32
+ "enum": ["json", "xml"],
33
+ "default": "json"
34
+ },
35
+ "description": "Specifies the desired format for the API response. Choose 'json' for a JSON object. If not provided, the API defaults to JSON format."
36
+ }
37
+ ],
38
+ "requestBody": {
39
+ "required": true,
40
+ "description": "Send a JSON object with `number` as the only required field. Use `region` **or** `dialer_region` when needed — never both at the same time.\n\n- **International format** (`+` prefix): provide `number` only — no region needed.\n- **Local format** (no `+`, e.g. `03301112233`): provide `number` + `region` (ISO 2-letter country code).\n- **IDD format** (exit code, e.g. `00923301112233`): provide `number` + `dialer_region` (country you are dialing from).",
41
+ "content": {
42
+ "application/json": {
43
+ "schema": {
44
+ "$ref": "#/components/schemas/PhoneValidationRequest"
45
+ },
46
+ "examples": {
47
+ "international_format": {
48
+ "summary": "International format (+ prefix) — no region needed",
49
+ "value": {
50
+ "number": "+14155552671"
51
+ }
52
+ },
53
+ "local_format_with_region": {
54
+ "summary": "Local format — use region (not dialer_region)",
55
+ "value": {
56
+ "number": "03301112233",
57
+ "region": "PK"
58
+ }
59
+ },
60
+ "idd_format_with_dialer_region": {
61
+ "summary": "IDD format — use dialer_region (not region)",
62
+ "value": {
63
+ "number": "0014155552671",
64
+ "dialer_region": "AU"
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ },
71
+ "responses": {
72
+ "200": {
73
+ "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.",
74
+ "content": {
75
+ "application/json": {
76
+ "schema": {
77
+ "$ref": "#/components/schemas/PhoneValidationResponse"
78
+ },
79
+ "examples": {
80
+ "success": {
81
+ "summary": "Valid, fully-resolved number",
82
+ "value": {
83
+ "raw_input": {
84
+ "number": "+14155552671"
85
+ },
86
+ "possible": true,
87
+ "valid": true,
88
+ "country_prefix": 1,
89
+ "national_number": 4155552671,
90
+ "country_code": "US",
91
+ "location": "San Francisco, CA",
92
+ "time_zones": ["America/Los_Angeles"],
93
+ "line_type": "FIXED_LINE_OR_MOBILE",
94
+ "formats": {
95
+ "E164": "+14155552671",
96
+ "International": "+1 415-555-2671",
97
+ "National": "(415) 555-2671",
98
+ "RFC3966": "tel:+1-415-555-2671"
99
+ },
100
+ "area_code_length": 3,
101
+ "ndc_length": 3,
102
+ "can_be_internationally_dialled": true
103
+ }
104
+ },
105
+ "tooShort": {
106
+ "summary": "Too short to be a plausible number — not an error",
107
+ "value": {
108
+ "raw_input": {
109
+ "number": "123",
110
+ "region": "US"
111
+ },
112
+ "possible": false,
113
+ "valid": false
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ },
120
+ "400": {
121
+ "description": "Bad Request – e.g. missing required field or both region codes provided",
122
+ "content": {
123
+ "application/json": {
124
+ "schema": {
125
+ "$ref": "#/components/schemas/ErrorResponse"
126
+ },
127
+ "examples": {
128
+ "missing_number": {
129
+ "summary": "Missing number",
130
+ "value": {
131
+ "timestamp": "2026-07-27T12:55:03.470Z",
132
+ "status": 400,
133
+ "error": "Missing Number",
134
+ "message": "The 'number' is required in POST Body and cannot be empty.",
135
+ "path": "/v1.0/phone-number/info"
136
+ }
137
+ },
138
+ "missing_region_information": {
139
+ "summary": "Missing region information",
140
+ "value": {
141
+ "timestamp": "2026-07-27T12:55:03.962Z",
142
+ "status": 400,
143
+ "error": "Missing Region Information",
144
+ "message": "Provide the region explicitly (e.g. 'US') or include a '+' with the country code.",
145
+ "path": "/v1.0/phone-number/info"
146
+ }
147
+ },
148
+ "multiple_region_codes": {
149
+ "summary": "Multiple region codes provided",
150
+ "value": {
151
+ "timestamp": "2026-07-27T12:55:04.456Z",
152
+ "status": 400,
153
+ "error": "Multiple Region Codes Provided",
154
+ "message": "Provide only one region code, either 'region' or 'dialer_region', not both.",
155
+ "path": "/v1.0/phone-number/info"
156
+ }
157
+ },
158
+ "invalid_region_code": {
159
+ "summary": "Invalid region code",
160
+ "value": {
161
+ "timestamp": "2026-07-27T12:55:20.810Z",
162
+ "status": 400,
163
+ "error": "Invalid Region Code",
164
+ "message": "Region code must be a 2-letter ISO country code (e.g., 'US', 'GB').",
165
+ "path": "/v1.0/phone-number/info"
166
+ }
167
+ },
168
+ "invalid_number_format": {
169
+ "summary": "Invalid number format",
170
+ "value": {
171
+ "timestamp": "2026-07-27T12:55:21.336Z",
172
+ "status": 400,
173
+ "error": "Invalid Number Format",
174
+ "message": "The input does not match the expected structure of a phone number.",
175
+ "path": "/v1.0/phone-number/info"
176
+ }
177
+ },
178
+ "number_too_long": {
179
+ "summary": "Number too long",
180
+ "value": {
181
+ "timestamp": "2026-07-27T12:55:22.391Z",
182
+ "status": 400,
183
+ "error": "Number Too Long",
184
+ "message": "The phone number has more digits than any valid phone number can have.",
185
+ "path": "/v1.0/phone-number/info"
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+ },
192
+ "404": {
193
+ "description": "Not Found – Wrong HTTP method used on the endpoint (e.g. GET instead of POST)",
194
+ "content": {
195
+ "application/json": {
196
+ "schema": {
197
+ "$ref": "#/components/schemas/ErrorResponse"
198
+ },
199
+ "examples": {
200
+ "wrongMethod": {
201
+ "summary": "GET used instead of POST",
202
+ "value": {
203
+ "error": "Resource Not Found",
204
+ "message": "The requested resource could not be found. Please verify the URL and try again.",
205
+ "path": "/v1.0/phone/validation",
206
+ "status": 404,
207
+ "timestamp": "2026-07-27T12:56:14.351Z"
208
+ }
209
+ }
210
+ }
211
+ }
212
+ }
213
+ },
214
+ "408": {
215
+ "description": "Request Timeout – Timed out while connecting to the remote server",
216
+ "content": {
217
+ "application/json": {
218
+ "schema": {
219
+ "$ref": "#/components/schemas/ErrorResponse"
220
+ },
221
+ "examples": {
222
+ "error": {
223
+ "summary": "Error response",
224
+ "value": {
225
+ "timestamp": "2026-06-06T14:00:00.000Z",
226
+ "path": "/v1.0/phone/validation",
227
+ "status": 408,
228
+ "error": "Request Timeout",
229
+ "message": "Timed out while connecting to the remote URL."
230
+ }
231
+ }
232
+ }
233
+ }
234
+ }
235
+ },
236
+ "429": {
237
+ "description": "Rate Limit Exceeded – API rate limit exceeded",
238
+ "content": {
239
+ "application/json": {
240
+ "schema": {
241
+ "$ref": "#/components/schemas/ErrorResponse"
242
+ },
243
+ "examples": {
244
+ "error": {
245
+ "summary": "Error response",
246
+ "value": {
247
+ "timestamp": "2026-06-06T14:00:00.000Z",
248
+ "path": "/v1.0/phone/validation",
249
+ "status": 429,
250
+ "error": "Too Many Requests",
251
+ "message": "API rate limit exceeded."
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ }
258
+ },
259
+ "operationId": "validatePhoneNumber"
260
+ }
261
+ }
262
+ },
263
+ "components": {
264
+ "securitySchemes": {
265
+ "ApiKeyAuthHeader": {
266
+ "type": "apiKey",
267
+ "in": "header",
268
+ "name": "X-apiKey",
269
+ "description": "Pass your API key via the X-apiKey request header."
270
+ },
271
+ "ApiKeyAuthQuery": {
272
+ "type": "apiKey",
273
+ "in": "query",
274
+ "name": "apiKey",
275
+ "description": "Pass your API key via the apiKey query parameter."
276
+ }
277
+ },
278
+ "schemas": {
279
+ "PhoneValidationResponse": {
280
+ "type": "object",
281
+ "properties": {
282
+ "raw_input": {
283
+ "$ref": "#/components/schemas/PhoneRawInput"
284
+ },
285
+ "possible": {
286
+ "type": "boolean",
287
+ "description": "Whether the number is possible (length and format checks only). A number can be possible but not valid."
288
+ },
289
+ "valid": {
290
+ "type": "boolean",
291
+ "description": "Whether the number is valid according to the numbering plan."
292
+ },
293
+ "country_prefix": {
294
+ "type": "integer",
295
+ "description": "The international dialing prefix for the number's country (e.g., 1 for US/Canada, 44 for United Kingdom)."
296
+ },
297
+ "national_number": {
298
+ "type": "integer",
299
+ "description": "The national significant number (the phone number without the country code)."
300
+ },
301
+ "country_code": {
302
+ "type": "string",
303
+ "description": "ISO-2 country code inferred from the number (e.g., US, GB)."
304
+ },
305
+ "carrier": {
306
+ "type": "string",
307
+ "description": "Carrier name associated with the number (if available). May not reflect ported carriers."
308
+ },
309
+ "location": {
310
+ "type": "string",
311
+ "description": "Geographic description (city/region) for the number (if applicable)."
312
+ },
313
+ "time_zones": {
314
+ "type": "array",
315
+ "items": {
316
+ "type": "string"
317
+ },
318
+ "description": "Array of possible time zones associated with the number."
319
+ },
320
+ "line_type": {
321
+ "type": "string",
322
+ "description": "Classification of the phone line (MOBILE, FIXED_LINE, VOIP, etc.).",
323
+ "enum": [
324
+ "MOBILE",
325
+ "FIXED_LINE",
326
+ "FIXED_LINE_OR_MOBILE",
327
+ "VOIP",
328
+ "TOLL_FREE",
329
+ "PREMIUM_RATE",
330
+ "SHARED_COST",
331
+ "PERSONAL_NUMBER",
332
+ "PAGER",
333
+ "UAN",
334
+ "VOICEMAIL",
335
+ "UNKNOWN"
336
+ ]
337
+ },
338
+ "formats": {
339
+ "$ref": "#/components/schemas/PhoneFormats"
340
+ },
341
+ "area_code_length": {
342
+ "type": "integer",
343
+ "description": "Length of the geographic area code. Only applies to geographically-assigned numbers."
344
+ },
345
+ "ndc_length": {
346
+ "type": "integer",
347
+ "description": "Length of the National Destination Code (NDC), the routing prefix within a country."
348
+ },
349
+ "can_be_internationally_dialled": {
350
+ "type": "boolean",
351
+ "description": "Whether the number can be dialled internationally. false for short codes, emergency numbers, and domestic-only services."
352
+ }
353
+ },
354
+ "description": "Phone validation response containing validation status and metadata.",
355
+ "required": ["raw_input", "possible", "valid"]
356
+ },
357
+ "PhoneRawInput": {
358
+ "type": "object",
359
+ "description": "Original request payload sent by the caller.",
360
+ "properties": {
361
+ "number": {
362
+ "type": "string",
363
+ "description": "The phone number as entered by the user."
364
+ },
365
+ "region": {
366
+ "type": "string",
367
+ "description": "ISO-2 country code. Present when provided in the request."
368
+ },
369
+ "dialer_region": {
370
+ "type": "string",
371
+ "description": "ISO-2 country code of the dialing origin. Present when provided in the request."
372
+ }
373
+ },
374
+ "required": ["number"]
375
+ },
376
+ "PhoneFormats": {
377
+ "type": "object",
378
+ "description": "Four standardized representations of the phone number.",
379
+ "properties": {
380
+ "E164": {
381
+ "type": "string",
382
+ "description": "Number in E.164 format, the standard machine-readable format."
383
+ },
384
+ "International": {
385
+ "type": "string",
386
+ "description": "Human-readable international format with country code."
387
+ },
388
+ "National": {
389
+ "type": "string",
390
+ "description": "Local format as dialed within the country."
391
+ },
392
+ "RFC3966": {
393
+ "type": "string",
394
+ "description": "URI format following RFC 3966 for tel: links."
395
+ }
396
+ },
397
+ "required": []
398
+ },
399
+ "PhoneValidationRequest": {
400
+ "type": "object",
401
+ "description": "Request body for phone validation.",
402
+ "required": ["number"],
403
+ "properties": {
404
+ "number": {
405
+ "type": "string",
406
+ "description": "Phone number to validate. Accepts international format (+14155552671), local format (4155552671) with region, or IDD format (0014155552671) with dialer_region."
407
+ },
408
+ "region": {
409
+ "type": "string",
410
+ "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."
411
+ },
412
+ "dialer_region": {
413
+ "type": "string",
414
+ "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."
415
+ }
416
+ }
417
+ },
418
+ "ErrorResponse": {
419
+ "type": "object",
420
+ "properties": {
421
+ "error": {
422
+ "type": "string",
423
+ "description": "Short error category or exception type."
424
+ },
425
+ "message": {
426
+ "type": "string",
427
+ "description": "Human-readable error message describing the failure."
428
+ },
429
+ "path": {
430
+ "type": "string",
431
+ "description": "API endpoint path that produced the error."
432
+ },
433
+ "status": {
434
+ "type": "integer",
435
+ "description": "HTTP status code returned with the error."
436
+ },
437
+ "timestamp": {
438
+ "type": "string",
439
+ "format": "date-time",
440
+ "description": "Timestamp when the error occurred (ISO 8601)."
441
+ }
442
+ },
443
+ "description": "Standard error envelope returned by the API on failed requests.",
444
+ "required": ["message"]
445
+ }
446
+ }
447
+ },
448
+ "security": [
449
+ {
450
+ "ApiKeyAuthHeader": []
451
+ },
452
+ {
453
+ "ApiKeyAuthQuery": []
454
+ }
455
+ ]
456
+ }