Repository navigation
Expand file tree
/
Copy pathopenapi.json
More file actions
1277 lines (1277 loc) · 45.8 KB
/
Copy pathopenapi.json
File metadata and controls
1277 lines (1277 loc) · 45.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.1.0",
"info": {
"title": "Live Web Data API",
"version": "1.0.0",
"summary": "Live web pages as clean Markdown, text or HTML for AI agents.",
"description": "Fetch public web pages through our fetch network and get clean Markdown, text or HTML back.\n\nAuthentication: `Authorization: Bearer <api_key>`.\n\n**Per-URL errors** (HTTP 200, in `statuses[].error.tag`, 0 credits): `CRAWL_NOT_FOUND`, `SOURCE_NOT_AVAILABLE`, `CRAWL_LIVECRAWL_TIMEOUT`, `CRAWL_NOT_RENDERED`, `UNSUPPORTED_CONTENT_TYPE`, `CRAWL_UNKNOWN_ERROR`, `SOURCE_BLOCKED`, `BROWSER_UNAVAILABLE`, `RATE_LIMITED`, and `RESTRICTED_TARGET` for blocked URLs inside a multi-URL request.\n\nUp to 10 URLs per request; rate limits count URLs.",
"contact": {
"email": "support@livewebdata.com"
}
},
"servers": [
{
"url": "https://livewebdata.com/api",
"description": "Production"
}
],
"security": [
{
"bearerAuth": []
}
],
"tags": [
{
"name": "Contents"
},
{
"name": "Account"
}
],
"paths": {
"/v1/contents": {
"post": {
"operationId": "getContents",
"tags": [
"Contents"
],
"x-cli": {
"command": "fetch",
"aliases": [
"contents"
],
"positional": "urls",
"output": {
"items": "results",
"fields": [
"markdown",
"text",
"html"
],
"heading": "url",
"errors": "statuses"
}
},
"summary": "Fetch page contents",
"description": "Fetch 1–10 URLs live and return clean content. HTTP 200 even if individual URLs failed — check `statuses[]`.\n\nA fetch still running after about 100 seconds answers **202** instead: send the same request again with the `Idempotency-Key` from that answer (after `Retry-After` seconds) to get the result. A repeat is not charged again. Results are kept for 15 minutes; a result nobody collects stays charged. Always send your own `Idempotency-Key`: a connection cut after the API received the request (a network error, a timeout, a deploy) can then be retried with the same key without a second charge.",
"parameters": [
{
"name": "Idempotency-Key",
"in": "header",
"required": false,
"description": "Your id for this request, 8–128 characters of `A–Z a–z 0–9 _ - : .`. A repeat with the same key and the same body returns the same result instead of fetching (and charging) again, for 24 hours; with a different body it answers 409. Without it, the API creates one and returns it in the `Idempotency-Key` response header.",
"schema": {
"type": "string",
"pattern": "^[A-Za-z0-9_\\-:.]{8,128}$"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentsRequest"
},
"examples": {
"single": {
"summary": "One URL",
"value": {
"urls": [
"https://example.com/article"
]
}
},
"options": {
"summary": "All options",
"value": {
"urls": [
"https://example.com/article"
],
"countryCode": "de",
"text": {
"maxCharacters": 50000,
"verbosity": "compact"
},
"livecrawlTimeout": 15000
}
},
"multi": {
"summary": "Several URLs (one restricted)",
"value": {
"urls": [
"https://example.com/a",
"https://example.com/b",
"https://example.com/blocked"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Processed. One status per URL; successful pages in results.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"X-Credits-Remaining": {
"description": "Credit balance after this request.",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Limit": {
"description": "URLs you can send at once (bucket size, = rateLimit.burst in GET /v1/account). The bucket refills at rateLimit.requestsPerSecond URLs per second.",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Remaining": {
"description": "URLs you can send right now.",
"schema": {
"type": "integer"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentsResponse"
},
"example": {
"requestId": "req_01JEXAMPLE0000000000000",
"results": [
{
"id": "https://example.com/article",
"url": "https://example.com/article",
"title": "Article",
"author": null,
"publishedDate": null,
"image": null,
"favicon": "https://example.com/favicon.ico",
"markdown": "# Article\n\n…",
"text": "Article\n\n…",
"html": "<!doctype html>…"
}
],
"statuses": [
{
"id": "https://example.com/article",
"status": "success",
"source": "livecrawled",
"httpStatusCode": 200,
"strategy": "fast",
"credits": 1,
"error": null
}
],
"searchTime": 1240
}
}
}
},
"202": {
"description": "Still fetching after about 100 seconds. Send the same request again with this Idempotency-Key after Retry-After seconds; the repeat waits for the result and is not charged again.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"Retry-After": {
"description": "Seconds to wait: before retrying a 429, or before repeating a 202 with the same Idempotency-Key.",
"schema": {
"type": "integer"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pending"
},
"example": {
"status": "pending",
"requestId": "req_01JEXAMPLE0000000000000",
"idempotencyKey": "lwda_3f1c2b7e-0d4a-4c1e-9a55-2b8f0e6c7d10",
"retryAfter": 1,
"message": "Still fetching. Send the same request again with the same Idempotency-Key header to get the result; it is not charged again."
}
}
}
},
"400": {
"description": "INVALID_REQUEST: Invalid parameters. TOO_MANY_URLS: More URLs than allowed per request (10). FREE_TIER_SINGLE_URL: Free test: one URL per request. Upgrade for up to 10.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"INVALID_REQUEST": {
"value": {
"error": {
"code": 400,
"tag": "INVALID_REQUEST",
"message": "Invalid parameters."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
},
"TOO_MANY_URLS": {
"value": {
"error": {
"code": 400,
"tag": "TOO_MANY_URLS",
"message": "More URLs than allowed per request (10)."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
},
"FREE_TIER_SINGLE_URL": {
"value": {
"error": {
"code": 400,
"tag": "FREE_TIER_SINGLE_URL",
"message": "Free test: one URL per request. Upgrade for up to 10."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
},
"401": {
"description": "UNAUTHORIZED: Missing or invalid API key.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"UNAUTHORIZED": {
"value": {
"error": {
"code": 401,
"tag": "UNAUTHORIZED",
"message": "Missing or invalid API key."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
},
"402": {
"description": "INSUFFICIENT_CREDITS: Not enough credits. Top up or upgrade. On the free test the body adds nextResetAt and freeTierEnded.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"INSUFFICIENT_CREDITS": {
"value": {
"error": {
"code": 402,
"tag": "INSUFFICIENT_CREDITS",
"message": "Not enough credits. Top up or upgrade. On the free test the body adds nextResetAt and freeTierEnded."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
},
"403": {
"description": "KEY_SUSPENDED: The key or account is suspended or not yet approved. FREE_TIER_FEATURE: Free test: this feature is available on paid plans.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"KEY_SUSPENDED": {
"value": {
"error": {
"code": 403,
"tag": "KEY_SUSPENDED",
"message": "The key or account is suspended or not yet approved."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
},
"FREE_TIER_FEATURE": {
"value": {
"error": {
"code": 403,
"tag": "FREE_TIER_FEATURE",
"message": "Free test: this feature is available on paid plans."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
},
"409": {
"description": "IDEMPOTENCY_CONFLICT: The Idempotency-Key was already used with a different request, or its result is no longer available (results are kept 15 minutes). Use a new key.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"IDEMPOTENCY_CONFLICT": {
"value": {
"error": {
"code": 409,
"tag": "IDEMPOTENCY_CONFLICT",
"message": "The Idempotency-Key was already used with a different request, or its result is no longer available (results are kept 15 minutes). Use a new key."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
},
"413": {
"description": "PAYLOAD_TOO_LARGE: The request body is larger than 10 MiB. Nothing was read or charged.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"PAYLOAD_TOO_LARGE": {
"value": {
"error": {
"code": 413,
"tag": "PAYLOAD_TOO_LARGE",
"message": "The request body is larger than 10 MiB. Nothing was read or charged."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
},
"429": {
"description": "RATE_LIMITED: Rate limit exceeded. Retry after the Retry-After header.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"X-RateLimit-Limit": {
"description": "URLs you can send at once (bucket size, = rateLimit.burst in GET /v1/account). The bucket refills at rateLimit.requestsPerSecond URLs per second.",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Remaining": {
"description": "URLs you can send right now.",
"schema": {
"type": "integer"
}
},
"Retry-After": {
"description": "Seconds to wait: before retrying a 429, or before repeating a 202 with the same Idempotency-Key.",
"schema": {
"type": "integer"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"RATE_LIMITED": {
"value": {
"error": {
"code": 429,
"tag": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after the Retry-After header."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
},
"451": {
"description": "RESTRICTED_TARGET: All requested URLs are restricted. No credits charged.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"RESTRICTED_TARGET": {
"value": {
"error": {
"code": 451,
"tag": "RESTRICTED_TARGET",
"message": "All requested URLs are restricted. No credits charged."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
},
"503": {
"description": "SERVICE_UNAVAILABLE: Temporarily unavailable. Retry shortly.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"SERVICE_UNAVAILABLE": {
"value": {
"error": {
"code": 503,
"tag": "SERVICE_UNAVAILABLE",
"message": "Temporarily unavailable. Retry shortly."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
}
}
}
},
"/v1/account": {
"get": {
"operationId": "getAccount",
"tags": [
"Account"
],
"x-cli": {
"command": "account"
},
"summary": "Get account status",
"description": "Plan, remaining credits and rate limit for the calling key. Free. Use before large batches.",
"responses": {
"200": {
"description": "Account summary.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Account"
},
"example": {
"plan": "starter",
"status": "active",
"credits": {
"plan": 81234,
"topup": 10000,
"total": 91234
},
"rateLimit": {
"requestsPerSecond": 2,
"burst": 4
},
"periodEndsAt": "2026-11-01T00:00:00Z"
}
}
}
},
"401": {
"description": "UNAUTHORIZED: Missing or invalid API key.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"UNAUTHORIZED": {
"value": {
"error": {
"code": 401,
"tag": "UNAUTHORIZED",
"message": "Missing or invalid API key."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
},
"403": {
"description": "KEY_SUSPENDED: The key or account is suspended or not yet approved. FREE_TIER_FEATURE: Free test: this feature is available on paid plans.",
"headers": {
"X-Request-Id": {
"description": "Same as requestId in the body.",
"schema": {
"type": "string"
}
},
"Idempotency-Key": {
"description": "The request's Idempotency-Key: yours, or one the API created when you sent none. On every answer (200, 202, errors) except a 400 for a malformed key and a 413 for a body over 10 MiB (refused unread). Repeat a 202 with it.",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"KEY_SUSPENDED": {
"value": {
"error": {
"code": 403,
"tag": "KEY_SUSPENDED",
"message": "The key or account is suspended or not yet approved."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
},
"FREE_TIER_FEATURE": {
"value": {
"error": {
"code": 403,
"tag": "FREE_TIER_FEATURE",
"message": "Free test: this feature is available on paid plans."
},
"requestId": "req_01JEXAMPLE0000000000000"
}
}
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "API key, e.g. 1337_live_…"
}
},
"schemas": {
"ContentsRequest": {
"type": "object",
"properties": {
"urls": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"maxLength": 8192,
"format": "uri"
},
"description": "Pages to fetch (1–10), each at most 8,192 characters. Processed in parallel; one entry per URL in statuses. Duplicates (same URL, ignoring #fragment) are fetched once; repeated positions cost 0 credits."
},
"countryCode": {
"description": "ISO-3166-1 alpha-2 country to fetch from. Default \"us\".",
"type": "string",
"minLength": 2,
"maxLength": 2
},
"text": {
"description": "Content options. Default enabled.",
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"maxCharacters": {
"description": "Truncate text and markdown to this many characters. Default 100000. results[].textTruncated tells you when it did.",
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"verbosity": {
"description": "\"compact\" = main content (default), \"full\" = whole body.",
"type": "string",
"enum": [
"compact",
"full"
]
}
},
"additionalProperties": false
}
]
},
"maxAgeHours": {
"description": "Accepted only as 0 (for older clients): there is no cache, every request is fetched live.",
"type": "number",
"const": 0
},
"html": {
"description": "Include the page HTML as served in results[].html. Default false. A response carries at most 24 MiB of JSON: past that, the remaining results come without html (warning RESPONSE_SIZE_LIMIT).",
"type": "boolean"
},
"livecrawlTimeout": {
"description": "Live fetch timeout in ms (1–90000). Default 60000, and a value below 30000 is raised to 30000 (the browser fallback needs it); with renderFallback: false any value, default 10000; with render or renderFallback: true at least 30000, default 60000.",
"type": "integer",
"minimum": 1,
"maximum": 90000
},
"render": {
"description": "Render every URL in a real browser, as a normal visitor sees it (3 credits, 5 when the page needed a retry through another connection). Cannot be combined with renderFallback. Default false.",
"type": "boolean"
},
"renderFallback": {
"description": "Fetch normally first; render in a real browser only when the first attempt did not return the page or shows no or very little visible text. On by default (omit it); false = plain fetch only, never a browser. A normal success costs its normal credits, a rendered one only the render credits. Cannot be combined with render: true.",
"type": "boolean"
}
},
"required": [
"urls"
],
"additionalProperties": false
},
"ContentsResponse": {
"type": "object",
"properties": {
"requestId": {
"type": "string"
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContentsResult"
},
"description": "One entry per successfully fetched URL."
},
"statuses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContentsStatus"
},
"description": "One entry per requested URL."
},
"searchTime": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Processing time in ms."
}
},
"required": [
"requestId",
"results",
"statuses",
"searchTime"
]
},
"ContentsResult": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The requested URL (matches statuses[].id)."
},
"url": {
"type": "string",
"description": "Final URL after redirects."
},
"title": {
"description": "At most 2,000 characters (cut with an ellipsis).",
"type": [
"string",
"null"
]
},
"author": {
"description": "At most 2,000 characters (cut with an ellipsis).",
"type": [
"string",
"null"
]
},
"publishedDate": {
"type": [
"string",
"null"
]
},
"image": {
"description": "null when the page names none, or a URL longer than 4,096 characters.",
"type": [
"string",
"null"
]
},
"favicon": {
"description": "The page's icon, else /favicon.ico of its origin (an icon URL longer than 4,096 characters is not used).",
"type": [
"string",
"null"
]
},
"text": {
"description": "Plain text, tags removed, whitespace normalized.",
"type": "string"
},
"markdown": {
"description": "Main content as Markdown.",
"type": "string"
},
"html": {
"description": "Page HTML as served. Only with html: true, and only while the response stays within its 24 MiB size limit (else warning RESPONSE_SIZE_LIMIT).",
"type": "string"
},
"textTruncated": {
"description": "true when text or markdown was cut at text.maxCharacters, or at the response size limit (warning RESPONSE_SIZE_LIMIT). Present whenever text is enabled.",
"type": "boolean"
},
"warnings": {
"description": "Absent when empty. \"PAGE_TRUNCATED\" = only part of the page could be retrieved; \"THIN_CONTENT\" = the page probably needs render: true; \"EXTRACTION_FALLBACK\" = converted as plain text (too complex in time); \"RESPONSE_SIZE_LIMIT\" = the response reached its 24 MiB size limit, so this result has no html (and maybe cut text/markdown).",
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"PAGE_TRUNCATED",
"THIN_CONTENT",
"EXTRACTION_FALLBACK",
"RESPONSE_SIZE_LIMIT"
]
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
]
}
}
},
"required": [
"id",
"url",
"title",
"author",
"publishedDate",
"image",
"favicon"
]
},
"ContentsStatus": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"success",
"error"
]
},
"source": {
"anyOf": [
{
"type": "string",
"enum": [
"livecrawled",
"cached",
"cached-fallback"
]
},
{
"type": "null"
}
],
"description": "Always \"livecrawled\" on success (there is no cache); null on error."
},
"fetchedAt": {
"description": "When the page was fetched (ISO 8601); null on error.",
"type": [
"string",
"null"
]
},
"httpStatusCode": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"strategy": {
"type": "string",
"enum": [
"fast",
"retry",
"browser",
"local-browser"
],
"description": "\"fast\" = standard fetch (1 credit). \"retry\" = the first attempt did not return the page, a retry through another connection did (2 credits). \"browser\" = rendered in a real browser, as a normal visitor sees it (3 credits, 5 when it needed a retry through another connection). \"local-browser\" is reserved."
},
"credits": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Credits charged for this URL: 1 standard, 2 retried, 3 rendered, 5 rendered + retried, 0 on error and for a short page delivered with thin: true (a success, not an error)."
},
"fallbackUsed": {
"description": "Present (true) only when the browser fallback ran for this URL: with strategy \"browser\" the content is that render (fast → render); with another strategy, or on error, rendering was tried and did not help.",
"type": "boolean"
},
"thin": {
"description": "Present (true) only for a short page delivered at 0 credits: fewer than 500 characters of visible text even after rendering. The result holds only that visible text. A success, not an error.",
"type": "boolean"