@apifreaks/openapi-specs 0.4.24 → 0.4.25

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 (67) hide show
  1. package/dist/index.cjs +3722 -546
  2. package/dist/index.js +3722 -546
  3. package/dist/specs/commodity/commodity-fluctuation.yaml +33 -2
  4. package/dist/specs/commodity/commodity-intraday-rates.yaml +33 -2
  5. package/dist/specs/commodity/commodity-prices.yaml +33 -2
  6. package/dist/specs/commodity/commodity-symbols.yaml +68 -1
  7. package/dist/specs/commodity/commodity-time-series.yaml +33 -2
  8. package/dist/specs/commodity/historical-commodity-prices.yaml +33 -2
  9. package/dist/specs/dns/bulk-dns-lookup.yaml +45 -3
  10. package/dist/specs/dns/dns-history-lookup.yaml +76 -3
  11. package/dist/specs/dns/dns-lookup.yaml +72 -6
  12. package/dist/specs/dns/reverse-dns-lookup.yaml +91 -2
  13. package/dist/specs/financial/bulk-vat-rates-country.yaml +18 -0
  14. package/dist/specs/financial/financial-apis-supported-countries.yaml +75 -17
  15. package/dist/specs/financial/iban-validation.yaml +19 -1
  16. package/dist/specs/financial/swift-code-finder.yaml +18 -0
  17. package/dist/specs/financial/swift-code-lookup.yaml +18 -0
  18. package/dist/specs/financial/vat-number-validation.yaml +48 -0
  19. package/dist/specs/financial/vat-rates-by-ip.yaml +18 -0
  20. package/dist/specs/financial/vat-rates-country.yaml +18 -0
  21. package/dist/specs/geocoding/forward-geocoding.yaml +95 -2
  22. package/dist/specs/geocoding/reverse-geocoding.yaml +71 -0
  23. package/dist/specs/phone-number-validation/bulk-phone-number-validation.yaml +25 -3
  24. package/dist/specs/phone-number-validation/phone-validation.yaml +49 -3
  25. package/dist/specs/scraper/web-scraper.yaml +85 -7
  26. package/dist/specs/weather/air-quality.yaml +71 -5
  27. package/dist/specs/weather/astronomy-data.yaml +84 -1
  28. package/dist/specs/weather/bulk-live-weather.yaml +159 -3
  29. package/dist/specs/weather/flood-forecast.yaml +61 -11
  30. package/dist/specs/weather/historical-weather.yaml +53 -3
  31. package/dist/specs/weather/live-weather.yaml +66 -15
  32. package/dist/specs/weather/marine-weather.yaml +74 -8
  33. package/dist/specs/weather/time-series-weather.yaml +60 -8
  34. package/dist/specs/weather/weather-forecast.yaml +76 -6
  35. package/package.json +1 -1
  36. package/specs/commodity/commodity-fluctuation.json +44 -2
  37. package/specs/commodity/commodity-intraday-rates.json +44 -2
  38. package/specs/commodity/commodity-prices.json +44 -2
  39. package/specs/commodity/commodity-symbols.json +95 -1
  40. package/specs/commodity/commodity-time-series.json +44 -2
  41. package/specs/commodity/historical-commodity-prices.json +44 -2
  42. package/specs/dns/bulk-dns-lookup.json +63 -4
  43. package/specs/dns/dns-history-lookup.json +102 -3
  44. package/specs/dns/dns-lookup.json +96 -6
  45. package/specs/dns/reverse-dns-lookup.json +121 -2
  46. package/specs/financial/bulk-vat-rates-country.json +27 -0
  47. package/specs/financial/financial-apis-supported-countries.json +114 -23
  48. package/specs/financial/iban-validation.json +28 -1
  49. package/specs/financial/swift-code-finder.json +27 -0
  50. package/specs/financial/swift-code-lookup.json +27 -0
  51. package/specs/financial/vat-number-validation.json +72 -0
  52. package/specs/financial/vat-rates-by-ip.json +27 -0
  53. package/specs/financial/vat-rates-country.json +27 -0
  54. package/specs/geocoding/forward-geocoding.json +127 -2
  55. package/specs/geocoding/reverse-geocoding.json +102 -0
  56. package/specs/phone-number-validation/bulk-phone-number-validation.json +35 -3
  57. package/specs/phone-number-validation/phone-validation.json +65 -3
  58. package/specs/scraper/web-scraper.json +110 -7
  59. package/specs/weather/air-quality.json +92 -5
  60. package/specs/weather/astronomy-data.json +122 -1
  61. package/specs/weather/bulk-live-weather.json +227 -3
  62. package/specs/weather/flood-forecast.json +78 -11
  63. package/specs/weather/historical-weather.json +70 -3
  64. package/specs/weather/live-weather.json +85 -17
  65. package/specs/weather/marine-weather.json +95 -8
  66. package/specs/weather/time-series-weather.json +82 -8
  67. package/specs/weather/weather-forecast.json +107 -6
@@ -44,6 +44,17 @@
44
44
  "format": "float"
45
45
  }
46
46
  },
47
+ {
48
+ "name": "format",
49
+ "in": "query",
50
+ "required": false,
51
+ "description": "Response format. Only `json` is supported; any other value is ignored and the response is still returned as JSON.",
52
+ "schema": {
53
+ "type": "string",
54
+ "enum": ["json"],
55
+ "default": "json"
56
+ }
57
+ },
47
58
  {
48
59
  "name": "Accept-Language",
49
60
  "in": "header",
@@ -156,6 +167,97 @@
156
167
  "status": 400,
157
168
  "timestamp": "2026-07-22T14:29:46.809Z"
158
169
  }
170
+ },
171
+ "missingApiKey": {
172
+ "summary": "No API key supplied",
173
+ "value": {
174
+ "error": "Invalid Param Exception",
175
+ "message": "Please provide apiKey",
176
+ "path": "/v1.0/geocoder/reverse",
177
+ "status": 400,
178
+ "timestamp": "2026-11-25T10:01:15.099Z"
179
+ }
180
+ }
181
+ }
182
+ }
183
+ },
184
+ "headers": {
185
+ "X-AF-Credits-Cost": {
186
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
187
+ }
188
+ }
189
+ },
190
+ "401": {
191
+ "description": "Unauthorized — The API key is invalid",
192
+ "content": {
193
+ "application/json": {
194
+ "schema": {
195
+ "$ref": "#/components/schemas/ErrorResponse"
196
+ },
197
+ "examples": {
198
+ "invalidApiKey": {
199
+ "summary": "Invalid API key",
200
+ "value": {
201
+ "error": "API Access Exception",
202
+ "message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
203
+ "path": "/v1.0/geocoder/reverse",
204
+ "status": 401,
205
+ "timestamp": "2026-11-25T10:01:15.616Z"
206
+ }
207
+ }
208
+ }
209
+ }
210
+ },
211
+ "headers": {
212
+ "X-AF-Credits-Cost": {
213
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
214
+ }
215
+ }
216
+ },
217
+ "404": {
218
+ "description": "Not Found — An unsupported HTTP method was used",
219
+ "content": {
220
+ "application/json": {
221
+ "schema": {
222
+ "$ref": "#/components/schemas/ErrorResponse"
223
+ },
224
+ "examples": {
225
+ "methodNotAllowed": {
226
+ "summary": "Non-GET HTTP method used",
227
+ "value": {
228
+ "error": "Resource Not Found",
229
+ "message": "The requested resource could not be found. Please verify the URL and try again.",
230
+ "path": "/v1.0/geocoder/reverse",
231
+ "status": 404,
232
+ "timestamp": "2026-11-25T10:01:28.856Z"
233
+ }
234
+ }
235
+ }
236
+ }
237
+ },
238
+ "headers": {
239
+ "X-AF-Credits-Cost": {
240
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
241
+ }
242
+ }
243
+ },
244
+ "500": {
245
+ "description": "Internal Server Error — No address could be resolved for the coordinates (e.g. open ocean) or the request failed",
246
+ "content": {
247
+ "application/json": {
248
+ "schema": {
249
+ "$ref": "#/components/schemas/ErrorResponse"
250
+ },
251
+ "examples": {
252
+ "internalError": {
253
+ "summary": "No address found for the coordinates, e.g. `lat=0&lon=0` in open ocean",
254
+ "value": {
255
+ "error": "Internal Server Error",
256
+ "message": "Internal Server Error Occurred.",
257
+ "path": "/v1.0/geocoder/reverse",
258
+ "status": 500,
259
+ "timestamp": "2026-11-25T10:01:25.626Z"
260
+ }
159
261
  }
160
262
  }
161
263
  }
@@ -29,10 +29,10 @@
29
29
  "required": false,
30
30
  "schema": {
31
31
  "type": "string",
32
- "enum": ["json", "xml"],
32
+ "enum": ["json"],
33
33
  "default": "json"
34
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."
35
+ "description": "Response format. Only `json` is supported; the default is `json`."
36
36
  }
37
37
  ],
38
38
  "requestBody": {
@@ -183,7 +183,7 @@
183
183
  }
184
184
  },
185
185
  "400": {
186
- "description": "Bad Request – Missing or malformed request body",
186
+ "description": "Bad Request – Missing or malformed request body (missing or empty `numbers`, non-array value, or invalid JSON), or missing API key",
187
187
  "content": {
188
188
  "application/json": {
189
189
  "schema": {
@@ -199,6 +199,16 @@
199
199
  "status": 400,
200
200
  "timestamp": "2026-07-27T12:56:50.387Z"
201
201
  }
202
+ },
203
+ "missingApiKey": {
204
+ "summary": "API key not sent",
205
+ "value": {
206
+ "error": "Invalid Param Exception",
207
+ "message": "Please provide apiKey",
208
+ "path": "/v1.0/phone/validation/bulk",
209
+ "status": 400,
210
+ "timestamp": "2026-11-25T10:07:00.000Z"
211
+ }
202
212
  }
203
213
  }
204
214
  }
@@ -209,6 +219,28 @@
209
219
  }
210
220
  }
211
221
  },
222
+ "401": {
223
+ "description": "Unauthorized — API key invalid",
224
+ "content": {
225
+ "application/json": {
226
+ "schema": {
227
+ "$ref": "#/components/schemas/ErrorResponse"
228
+ },
229
+ "examples": {
230
+ "invalidApiKey": {
231
+ "summary": "Invalid API key",
232
+ "value": {
233
+ "error": "API Access Exception",
234
+ "message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
235
+ "path": "/v1.0/phone/validation/bulk",
236
+ "status": 401,
237
+ "timestamp": "2026-11-25T10:07:00.000Z"
238
+ }
239
+ }
240
+ }
241
+ }
242
+ }
243
+ },
212
244
  "404": {
213
245
  "description": "Not Found – Wrong HTTP method used on the endpoint (e.g. GET instead of POST)",
214
246
  "content": {
@@ -29,10 +29,10 @@
29
29
  "required": false,
30
30
  "schema": {
31
31
  "type": "string",
32
- "enum": ["json", "xml"],
32
+ "enum": ["json"],
33
33
  "default": "json"
34
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."
35
+ "description": "Response format. Only `json` is supported; the default is `json`."
36
36
  }
37
37
  ],
38
38
  "requestBody": {
@@ -123,7 +123,7 @@
123
123
  }
124
124
  },
125
125
  "400": {
126
- "description": "Bad Request – e.g. missing required field or both region codes provided",
126
+ "description": "Bad Request – e.g. missing required field, both region codes provided, malformed body, or missing API key",
127
127
  "content": {
128
128
  "application/json": {
129
129
  "schema": {
@@ -189,6 +189,46 @@
189
189
  "message": "The phone number has more digits than any valid phone number can have.",
190
190
  "path": "/v1.0/phone-number/info"
191
191
  }
192
+ },
193
+ "number_too_short": {
194
+ "summary": "Number too short after removing the international dialing prefix (e.g. `00`)",
195
+ "value": {
196
+ "timestamp": "2026-11-25T10:07:00.000Z",
197
+ "status": 400,
198
+ "error": "Number Too Short",
199
+ "message": "The number is too short after removing the international dialing prefix.",
200
+ "path": "/v1.0/phone-number/info"
201
+ }
202
+ },
203
+ "too_short_national_number": {
204
+ "summary": "National number shorter than allowed (e.g. `00923` with `region` PK)",
205
+ "value": {
206
+ "timestamp": "2026-11-25T10:07:00.000Z",
207
+ "status": 400,
208
+ "error": "Too Short National Number",
209
+ "message": "The national number part is shorter than allowed for valid phone numbers.",
210
+ "path": "/v1.0/phone-number/info"
211
+ }
212
+ },
213
+ "invalid_parameters": {
214
+ "summary": "Malformed JSON, missing body, or a non-string number",
215
+ "value": {
216
+ "timestamp": "2026-11-25T10:07:00.000Z",
217
+ "status": 400,
218
+ "error": "Invalid Parameters Provided",
219
+ "message": "Please provide valid parameters.",
220
+ "path": "/v1.0/phone-number/info"
221
+ }
222
+ },
223
+ "missingApiKey": {
224
+ "summary": "API key not sent",
225
+ "value": {
226
+ "error": "Invalid Param Exception",
227
+ "message": "Please provide apiKey",
228
+ "path": "/v1.0/phone/validation",
229
+ "status": 400,
230
+ "timestamp": "2026-11-25T10:07:00.000Z"
231
+ }
192
232
  }
193
233
  }
194
234
  }
@@ -199,6 +239,28 @@
199
239
  }
200
240
  }
201
241
  },
242
+ "401": {
243
+ "description": "Unauthorized — API key invalid",
244
+ "content": {
245
+ "application/json": {
246
+ "schema": {
247
+ "$ref": "#/components/schemas/ErrorResponse"
248
+ },
249
+ "examples": {
250
+ "invalidApiKey": {
251
+ "summary": "Invalid API key",
252
+ "value": {
253
+ "error": "API Access Exception",
254
+ "message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
255
+ "path": "/v1.0/phone/validation",
256
+ "status": 401,
257
+ "timestamp": "2026-11-25T10:07:00.000Z"
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
263
+ },
202
264
  "404": {
203
265
  "description": "Not Found – Wrong HTTP method used on the endpoint (e.g. GET instead of POST)",
204
266
  "content": {
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Web Scraper API - JavaScript Rendering, Proxy Rotation & CAPTCHA Solving",
5
5
  "version": "1.0.0",
6
- "description": "Executes a sequence of scraping instructions against a target URL and returns the extracted data. Two modes are available via the `jsEnabled` query parameter: `jsEnabled=true` renders the page in a real browser and supports `fill`, `click`, `wait`, iframe switching, image/audio CAPTCHA solving, and other interactive instructions, plus request-level `blockUrl` and `cookies`; `jsEnabled=false` fetches static HTML and supports `postForm`, `getForm`, `getPage`, and `extract`. Every mode's response is an `extractedData` object keyed by the field names used in your `extract` instructions --- each value is a string when its selector matched exactly one element, or an array of strings when it matched more than one; a selector that matches nothing is omitted from the response entirely. The `text` query parameter strips HTML tags from extracted values; under `jsEnabled=true`, single-element matches are always returned as plain text regardless of `text`, while multi-element matches keep tags unless `text=true` is set.",
6
+ "description": "Executes a sequence of scraping instructions against a target URL and returns the extracted data. Two modes are available via the `jsEnabled` query parameter: `jsEnabled=true` (the default) renders the page in a real browser and supports `fill`, `click`, `wait`, iframe switching, image/audio CAPTCHA solving, and other interactive instructions, plus request-level `blockUrl` and `cookies`; `jsEnabled=false` (must be set explicitly) fetches static HTML and supports `postForm`, `getForm`, `getPage`, and `extract`. Every mode's response is an `extractedData` object keyed by the field names used in your `extract` instructions --- each value is a string when its selector matched exactly one element, or an array of strings when it matched more than one; a selector that matches nothing is omitted from the response entirely. The `text` query parameter strips HTML tags from extracted values; under `jsEnabled=true` (the default), single-element matches are always returned as plain text regardless of `text`, while multi-element matches keep tags unless `text=true` is set.",
7
7
  "contact": {
8
8
  "name": "APIFreaks Support",
9
9
  "url": "https://apifreaks.com/contact",
@@ -48,10 +48,10 @@
48
48
  "name": "jsEnabled",
49
49
  "in": "query",
50
50
  "required": false,
51
- "description": "Set to true to render the page in a real browser for dynamic/JavaScript-driven pages (enables fill, click, wait, CAPTCHA-solving, and related instructions). Set to false to fetch static HTML only (enables postForm, getForm, getPage, extract). Default is false.",
51
+ "description": "Set to true to render the page in a real browser for dynamic/JavaScript-driven pages (enables fill, click, wait, CAPTCHA-solving, and related instructions). Set to false to fetch static HTML only (enables postForm, getForm, getPage, extract). Default is true, so static mode must be requested explicitly with jsEnabled=false. Any value other than false is treated as true.",
52
52
  "schema": {
53
53
  "type": "boolean",
54
- "default": false
54
+ "default": true
55
55
  }
56
56
  },
57
57
  {
@@ -109,7 +109,7 @@
109
109
  ],
110
110
  "requestBody": {
111
111
  "required": false,
112
- "description": "The request body shape depends on the jsEnabled query parameter, not on any field inside the body itself. Pass jsEnabled=true for the interactive/browser instruction set (JsEnabledTrueBody: fill, click, wait, blockUrl, cookies, CAPTCHA solving, and more). Pass jsEnabled=false (or omit it) for the static-HTML instruction set (JsEnabledFalseBody: postForm, getForm, getPage, extract). instructions is an ordered array executed sequentially.",
112
+ "description": "The request body shape depends on the jsEnabled query parameter, not on any field inside the body itself. Pass jsEnabled=true for the interactive/browser instruction set (JsEnabledTrueBody: fill, click, wait, blockUrl, cookies, CAPTCHA solving, and more). Pass jsEnabled=false for the static-HTML instruction set (JsEnabledFalseBody: postForm, getForm, getPage, extract). instructions is an ordered array executed sequentially. If jsEnabled is omitted, the interactive/browser instruction set applies (jsEnabled defaults to true).",
113
113
  "content": {
114
114
  "application/json": {
115
115
  "schema": {
@@ -124,7 +124,7 @@
124
124
  },
125
125
  "examples": {
126
126
  "jsEnabledTrue": {
127
- "summary": "Example body for jsEnabled=true (fill, click, wait, extract)",
127
+ "summary": "Example body for jsEnabled=true, the default (fill, click, wait, extract)",
128
128
  "value": {
129
129
  "blockUrl": [
130
130
  "https://example.com/ads.js",
@@ -165,7 +165,7 @@
165
165
  }
166
166
  },
167
167
  "jsEnabledFalse": {
168
- "summary": "Example body for jsEnabled=false (extract only)",
168
+ "summary": "Example body for jsEnabled=false, set explicitly (extract only)",
169
169
  "value": {
170
170
  "instructions": [
171
171
  {
@@ -304,6 +304,76 @@
304
304
  "message": "Check the url or links",
305
305
  "path": "/v1/scraping/params"
306
306
  }
307
+ },
308
+ "jsInvalidSelector": {
309
+ "summary": "Unparseable CSS or XPath selector (jsEnabled=true)",
310
+ "value": {
311
+ "timestamp": "2026-11-25T10:02:47.975+00:00",
312
+ "status": 400,
313
+ "error": "Bad Request",
314
+ "message": "Scraping stopped due to an Unknown Exception [Unexpected token \"!\" while parsing selector \"!![\"]",
315
+ "path": "/v1/scraping/params"
316
+ }
317
+ },
318
+ "jsTargetUnreachable": {
319
+ "summary": "Target URL could not be resolved (jsEnabled=true)",
320
+ "value": {
321
+ "timestamp": "2026-11-25T10:02:49.424+00:00",
322
+ "status": 400,
323
+ "error": "Bad Request",
324
+ "message": "Scraping stopped due to an Unknown Exception [net::ERR_NAME_NOT_RESOLVED at https://thisdomaindoesnotexist12345xyz.com/]",
325
+ "path": "/v1/scraping/params"
326
+ }
327
+ },
328
+ "jsInvalidUrl": {
329
+ "summary": "url is not a valid absolute URL (jsEnabled=true)",
330
+ "value": {
331
+ "timestamp": "2026-11-25T10:02:45.069+00:00",
332
+ "status": 400,
333
+ "error": "Bad Request",
334
+ "message": "Scraping stopped due to an Unknown Exception [Protocol error (Page.navigate): Cannot navigate to invalid URL]",
335
+ "path": "/v1/scraping/params"
336
+ }
337
+ },
338
+ "invalidBooleanParam": {
339
+ "summary": "A boolean query parameter (for example text) has a non-boolean value",
340
+ "value": {
341
+ "timestamp": "2026-11-25T10:02:43.043+00:00",
342
+ "status": 400,
343
+ "error": "Bad Request",
344
+ "message": "Scraping stopped due to an Unknown Exception [Failed to convert value of type 'java.lang.String' to required type 'boolean'; Invalid boolean value [foo]]",
345
+ "path": "/v1/scraping/params"
346
+ }
347
+ },
348
+ "instructionsNotAppropriate": {
349
+ "summary": "Unknown instruction, or an instruction not supported by the selected mode (for example wait with jsEnabled=false)",
350
+ "value": {
351
+ "timestamp": "2026-11-25T10:02:36.923+00:00",
352
+ "status": 400,
353
+ "error": "Bad Request",
354
+ "message": "Instructions fields are not appropriate",
355
+ "path": "/v1/scraping/params"
356
+ }
357
+ },
358
+ "captchaDisabled": {
359
+ "summary": "CAPTCHA instruction sent without captcha=true",
360
+ "value": {
361
+ "timestamp": "2026-11-25T10:08:09.382+00:00",
362
+ "status": 400,
363
+ "error": "Bad Request",
364
+ "message": "Set 'captcha' to 'true' in the parameters to enable captcha solving",
365
+ "path": "/v1/scraping/params"
366
+ }
367
+ },
368
+ "formFieldsMissing": {
369
+ "summary": "getForm/postForm instruction missing its link/selector or data (jsEnabled=false)",
370
+ "value": {
371
+ "timestamp": "2026-11-25T10:08:10.293+00:00",
372
+ "status": 400,
373
+ "error": "Bad Request",
374
+ "message": "check your postForm or getForm fields, Either they are missing the link/selector or data",
375
+ "path": "/v1/scraping/params"
376
+ }
307
377
  }
308
378
  }
309
379
  }
@@ -352,6 +422,39 @@
352
422
  "$ref": "#/components/headers/X-Concurrent-Threads-Active"
353
423
  }
354
424
  }
425
+ },
426
+ "503": {
427
+ "description": "Service Unavailable — the scraping service could not complete the request (for example a click or fill instruction targeting an element that never appears, which runs until the browser times out)",
428
+ "content": {
429
+ "application/json": {
430
+ "schema": {
431
+ "$ref": "#/components/schemas/ErrorResponse"
432
+ },
433
+ "examples": {
434
+ "serviceUnavailable": {
435
+ "summary": "Scraping service unavailable or timed out",
436
+ "value": {
437
+ "error": "Service Unavailable",
438
+ "message": "Service is unavailable. Please try after some time or contact support@apifreaks.com",
439
+ "path": "/v1.0/scraping",
440
+ "status": 503,
441
+ "timestamp": "2026-11-25T10:04:14.938Z"
442
+ }
443
+ }
444
+ }
445
+ }
446
+ },
447
+ "headers": {
448
+ "X-AF-Credits-Cost": {
449
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
450
+ },
451
+ "X-Concurrent-Threads": {
452
+ "$ref": "#/components/headers/X-Concurrent-Threads"
453
+ },
454
+ "X-Concurrent-Threads-Active": {
455
+ "$ref": "#/components/headers/X-Concurrent-Threads-Active"
456
+ }
457
+ }
355
458
  }
356
459
  }
357
460
  }
@@ -594,7 +697,7 @@
594
697
  },
595
698
  "JsEnabledFalseBody": {
596
699
  "type": "object",
597
- "description": "Request body for jsEnabled=false (or omitted): fetches static HTML only, no browser rendering.",
700
+ "description": "Request body for jsEnabled=false: fetches static HTML only, no browser rendering.",
598
701
  "properties": {
599
702
  "instructions": {
600
703
  "type": "array",
@@ -28,7 +28,7 @@
28
28
  "name": "format",
29
29
  "in": "query",
30
30
  "required": false,
31
- "description": "Format of the response. Possible values: json.",
31
+ "description": "Format of the response. Only json is supported.",
32
32
  "schema": {
33
33
  "type": "string",
34
34
  "enum": ["json"],
@@ -61,7 +61,7 @@
61
61
  "schema": {
62
62
  "type": "string"
63
63
  },
64
- "description": "City name, place name, or full address.",
64
+ "description": "City name, place name, or full address. Ignored when lat and long are both provided; takes precedence over ip.",
65
65
  "required": false
66
66
  },
67
67
  {
@@ -70,7 +70,7 @@
70
70
  "schema": {
71
71
  "type": "number"
72
72
  },
73
- "description": "Latitude of the location. Must be supplied together with long — passing only one of the two returns a 400 error.",
73
+ "description": "Latitude of the location. Must be supplied together with long. lat=0 together with long=0 is treated as missing and the location falls back to the requester IP (or to location/ip if given); use a small non-zero value (for example 0.0001) to query the equator or prime meridian.",
74
74
  "required": false
75
75
  },
76
76
  {
@@ -79,7 +79,7 @@
79
79
  "schema": {
80
80
  "type": "number"
81
81
  },
82
- "description": "Longitude of the location. Must be supplied together with lat — passing only one of the two returns a 400 error.",
82
+ "description": "Longitude of the location. Must be supplied together with lat. lat=0 together with long=0 is treated as missing and the location falls back to the requester IP (or to location/ip if given); use a small non-zero value (for example 0.0001) to query the equator or prime meridian.",
83
83
  "required": false
84
84
  },
85
85
  {
@@ -88,9 +88,19 @@
88
88
  "schema": {
89
89
  "type": "string"
90
90
  },
91
- "description": "IP(v4 or v6) address for location inference.",
91
+ "description": "IP(v4 or v6) address for location inference. Ignored when location or lat/long is provided; if no location parameter is supplied at all, the requester's own IP is used.",
92
92
  "required": false
93
93
  },
94
+ {
95
+ "name": "precision",
96
+ "in": "query",
97
+ "required": false,
98
+ "description": "Data granularity. Air quality data is only available hourly, so hourly is the only accepted value and the parameter is optional: omitting it (or passing an empty value) behaves the same as hourly (current readings, or hourly forecast data when startDate/endDate are given). The value is case-sensitive.",
99
+ "schema": {
100
+ "type": "string",
101
+ "enum": ["hourly"]
102
+ }
103
+ },
94
104
  {
95
105
  "name": "timezone",
96
106
  "in": "query",
@@ -287,6 +297,46 @@
287
297
  "error": "params-exception-error",
288
298
  "path": "/v1.0/weather/air-quality"
289
299
  }
300
+ },
301
+ "InvalidPrecision": {
302
+ "summary": "Unknown or wrongly-cased precision value (e.g. precision=foo or precision=HOURLY)",
303
+ "value": {
304
+ "timestamp": "2026-11-25T10:01:00.000Z",
305
+ "status": 400,
306
+ "message": "Invalid precision",
307
+ "error": "invalid-params",
308
+ "path": "/v1.0/weather/air-quality"
309
+ }
310
+ },
311
+ "UnsupportedPrecision": {
312
+ "summary": "Precision that exists on other weather endpoints but not here (daily or minutely)",
313
+ "value": {
314
+ "timestamp": "2026-11-25T10:01:00.000Z",
315
+ "status": 400,
316
+ "message": "'daily' precision is not supported on this endpoint",
317
+ "error": "invalid-params",
318
+ "path": "/v1.0/weather/air-quality"
319
+ }
320
+ },
321
+ "UnresolvedCoordinates": {
322
+ "summary": "lat/long not a number, or exactly one of them is 0 (e.g. lat=abc&long=10 or lat=0&long=10)",
323
+ "value": {
324
+ "timestamp": "2026-11-25T10:01:00.000Z",
325
+ "status": 400,
326
+ "message": "Please provide both lat and long parameters.",
327
+ "error": "invalid-params",
328
+ "path": "/v1.0/weather/air-quality"
329
+ }
330
+ },
331
+ "MissingApiKey": {
332
+ "summary": "No API key supplied (neither X-apiKey header nor apiKey query parameter)",
333
+ "value": {
334
+ "error": "Invalid Param Exception",
335
+ "message": "Please provide apiKey",
336
+ "path": "/v1.0/weather/air-quality",
337
+ "status": 400,
338
+ "timestamp": "2026-11-25T10:01:00.000Z"
339
+ }
290
340
  }
291
341
  }
292
342
  }
@@ -314,6 +364,43 @@
314
364
  "error": "error",
315
365
  "path": "/v1.0/weather/air-quality"
316
366
  }
367
+ },
368
+ "ResourceNotFound": {
369
+ "summary": "Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)",
370
+ "value": {
371
+ "error": "Resource Not Found",
372
+ "message": "The requested resource could not be found. Please verify the URL and try again.",
373
+ "path": "/v1.0/weather/air-quality",
374
+ "status": 404,
375
+ "timestamp": "2026-11-25T10:01:00.000Z"
376
+ }
377
+ }
378
+ }
379
+ }
380
+ },
381
+ "headers": {
382
+ "X-AF-Credits-Cost": {
383
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
384
+ }
385
+ }
386
+ },
387
+ "401": {
388
+ "description": "Unauthorized — The API key is invalid",
389
+ "content": {
390
+ "application/json": {
391
+ "schema": {
392
+ "$ref": "#/components/schemas/ErrorResponse"
393
+ },
394
+ "examples": {
395
+ "invalidApiKey": {
396
+ "summary": "Invalid API key",
397
+ "value": {
398
+ "error": "API Access Exception",
399
+ "message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
400
+ "path": "/v1.0/weather/air-quality",
401
+ "status": 401,
402
+ "timestamp": "2026-11-25T10:01:00.000Z"
403
+ }
317
404
  }
318
405
  }
319
406
  }