-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathopenapi.yaml
More file actions
2039 lines (2039 loc) · 66.1 KB
/
Copy pathopenapi.yaml
File metadata and controls
2039 lines (2039 loc) · 66.1 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.0.3
info:
title: OpenSERP API
version: 2.2.0
description: >
OpenSERP provides dedicated and multi-engine search endpoints for Google, Yandex,
Baidu, Bing, and DuckDuckGo. Search responses are wrapped in a v2 envelope with
query echo, metadata, normalized results, and pagination. Invalid client input
returns 400 with a machine-readable `reason` code.
license:
name: MIT
url: https://opensource.org/licenses/MIT
servers:
- url: http://127.0.0.1:7000
description: Local default server
security: []
tags:
- name: Search
description: Dedicated per-engine search endpoints
- name: Mega
description: Cross-engine aggregated search endpoints
- name: Health
description: Health and readiness endpoints
- name: Stats
description: Runtime statistics endpoints
- name: Docs
description: OpenAPI and Swagger UI endpoints
paths:
/{engine}/search:
get:
tags: [Search]
operationId: searchWeb
summary: Search web results from a specific engine
description: >
Engine path values are `google`, `yandex`, `baidu`, `bing`, `duck`, and `ecosia`
(`duck` maps to DuckDuckGo internally). Use `?format=markdown|text|ndjson`
for alternative output formats.
parameters:
- $ref: "#/components/parameters/EnginePath"
- $ref: "#/components/parameters/TextQuery"
- $ref: "#/components/parameters/LangQuery"
- $ref: "#/components/parameters/RegionQuery"
- $ref: "#/components/parameters/DateQuery"
- $ref: "#/components/parameters/FileQuery"
- $ref: "#/components/parameters/SiteQuery"
- $ref: "#/components/parameters/LimitQuery"
- $ref: "#/components/parameters/StartQuery"
- $ref: "#/components/parameters/FilterQuery"
- $ref: "#/components/parameters/FeaturesQuery"
- $ref: "#/components/parameters/ExtractQuery"
- $ref: "#/components/parameters/ExtractModeQuery"
- $ref: "#/components/parameters/MinRunesQuery"
- $ref: "#/components/parameters/FormatQuery"
- $ref: "#/components/parameters/UseProxyHeader"
- $ref: "#/components/parameters/ProxyURLHeader"
- $ref: "#/components/parameters/ProxyCountryHeader"
- $ref: "#/components/parameters/ProxyClassHeader"
- $ref: "#/components/parameters/ProxyProviderHeader"
- $ref: "#/components/parameters/ProxySessionIDHeader"
- $ref: "#/components/parameters/TenantHeader"
responses:
"200":
description: Search results envelope
headers:
X-Request-ID:
$ref: "#/components/headers/XRequestID"
X-Cache:
$ref: "#/components/headers/XCache"
X-Fallback-Engine:
$ref: "#/components/headers/XFallbackEngine"
X-Proxy-Mode:
$ref: "#/components/headers/XProxyMode"
X-Proxy-Tag:
$ref: "#/components/headers/XProxyTag"
X-Proxy-Used:
$ref: "#/components/headers/XProxyUsed"
X-Network-Bytes:
$ref: "#/components/headers/XNetworkBytes"
X-Browser-Profile-Id:
$ref: "#/components/headers/XBrowserProfileID"
content:
application/json:
schema:
$ref: "#/components/schemas/SearchEnvelope"
examples:
default:
value:
query:
text: golang
lang: EN
region: US
engines_requested: [google]
meta:
request_id: 01HXYZ...
requested_at: "2026-04-24T12:00:00Z"
took_ms: 842
engines_failed: []
version: "2.1"
results:
- id: s_a1b2c3d4e5f6a1b2
rank: 1
type: organic
title: The Go Programming Language
url: https://go.dev/
display_url: go.dev
snippet: Go is an open source programming language...
domain: go.dev
favicon: https://go.dev/favicon.ico
position:
absolute: 1
engine: google
domain_info:
tld: dev
sld: go
category: ""
serp_features:
- id: f_a1b2c3d4e5f6a1b2
engine: google
type: ai_summary
text: Go is an open source programming language used for fast, reliable services.
links:
- title: The Go Programming Language
url: https://go.dev/
source_result_ids: [s_a1b2c3d4e5f6a1b2]
position:
absolute: 1
confidence: 0.95
extracted_at: "2026-04-24T12:00:00Z"
pagination:
page: 1
has_more: true
next_start: 25
text/markdown:
schema:
type: string
text/plain:
schema:
type: string
application/x-ndjson:
schema:
type: string
"400":
$ref: "#/components/responses/BadRequestError"
"403":
$ref: "#/components/responses/ForbiddenError"
"429":
$ref: "#/components/responses/TooManyRequestsError"
"502":
$ref: "#/components/responses/BadGatewayError"
"503":
$ref: "#/components/responses/ServiceUnavailableError"
"504":
$ref: "#/components/responses/GatewayTimeoutError"
"404":
$ref: "#/components/responses/NotFoundError"
"500":
$ref: "#/components/responses/InternalServerError"
/{engine}/image:
get:
tags: [Search]
operationId: searchImages
summary: Search image results from a specific engine
parameters:
- $ref: "#/components/parameters/EnginePath"
- $ref: "#/components/parameters/TextQuery"
- $ref: "#/components/parameters/LangQuery"
- $ref: "#/components/parameters/RegionQuery"
- $ref: "#/components/parameters/DateQuery"
- $ref: "#/components/parameters/FileQuery"
- $ref: "#/components/parameters/SiteQuery"
- $ref: "#/components/parameters/LimitQuery"
- $ref: "#/components/parameters/StartQuery"
- $ref: "#/components/parameters/FilterQuery"
- $ref: "#/components/parameters/FeaturesQuery"
- $ref: "#/components/parameters/FormatQuery"
- $ref: "#/components/parameters/UseProxyHeader"
- $ref: "#/components/parameters/ProxyURLHeader"
- $ref: "#/components/parameters/ProxyCountryHeader"
- $ref: "#/components/parameters/ProxyClassHeader"
- $ref: "#/components/parameters/ProxyProviderHeader"
- $ref: "#/components/parameters/ProxySessionIDHeader"
- $ref: "#/components/parameters/TenantHeader"
responses:
"200":
description: Image search results envelope
headers:
X-Request-ID:
$ref: "#/components/headers/XRequestID"
X-Cache:
$ref: "#/components/headers/XCache"
X-Fallback-Engine:
$ref: "#/components/headers/XFallbackEngine"
X-Proxy-Mode:
$ref: "#/components/headers/XProxyMode"
X-Proxy-Tag:
$ref: "#/components/headers/XProxyTag"
X-Proxy-Used:
$ref: "#/components/headers/XProxyUsed"
X-Network-Bytes:
$ref: "#/components/headers/XNetworkBytes"
X-Browser-Profile-Id:
$ref: "#/components/headers/XBrowserProfileID"
content:
application/json:
schema:
$ref: "#/components/schemas/ImageEnvelope"
"400":
$ref: "#/components/responses/BadRequestError"
"403":
$ref: "#/components/responses/ForbiddenError"
"429":
$ref: "#/components/responses/TooManyRequestsError"
"502":
$ref: "#/components/responses/BadGatewayError"
"503":
$ref: "#/components/responses/ServiceUnavailableError"
"504":
$ref: "#/components/responses/GatewayTimeoutError"
"404":
$ref: "#/components/responses/NotFoundError"
"500":
$ref: "#/components/responses/InternalServerError"
/google/parse:
post:
tags: [Search]
operationId: parseGoogleHTML
summary: Parse a Google SERP HTML document into structured results
description: >
Accepts raw Google SERP HTML in the request body and returns a standard
search envelope. Useful when an upstream provider delivers raw HTML
rather than JSON. No browser is used; parsing is done with goquery.
The body size limit is 10 MB.
requestBody:
required: true
content:
text/html:
schema:
type: string
description: Raw Google SERP HTML page
parameters:
- $ref: "#/components/parameters/FormatQuery"
responses:
"200":
description: Parsed search results envelope
content:
application/json:
schema:
$ref: "#/components/schemas/SearchEnvelope"
text/markdown:
schema:
type: string
text/plain:
schema:
type: string
application/x-ndjson:
schema:
type: string
"400":
$ref: "#/components/responses/BadRequestError"
"500":
$ref: "#/components/responses/InternalServerError"
/bing/parse:
post:
tags: [Search]
operationId: parseBingHTML
summary: Parse a Bing SERP HTML document into structured results
description: >
Accepts raw Bing SERP HTML in the request body and returns a standard
search envelope. Useful when an upstream provider delivers raw HTML
rather than JSON. No browser is used; parsing is done with goquery.
The body size limit is 10 MB.
requestBody:
required: true
content:
text/html:
schema:
type: string
description: Raw Bing SERP HTML page
parameters:
- $ref: "#/components/parameters/FormatQuery"
responses:
"200":
description: Parsed search results envelope
content:
application/json:
schema:
$ref: "#/components/schemas/SearchEnvelope"
text/markdown:
schema:
type: string
text/plain:
schema:
type: string
application/x-ndjson:
schema:
type: string
"400":
$ref: "#/components/responses/BadRequestError"
"500":
$ref: "#/components/responses/InternalServerError"
/mega/search:
get:
tags: [Mega]
operationId: megaSearch
summary: Search across multiple engines with selectable execution mode
description: >
Mode controls engine execution strategy: `balanced` (default) queries all
selected engines in parallel, `any` runs engines sequentially in requested
order until first success, and `fast` queries only the fastest engine based
on circuit-breaker average response time stats.
In `balanced` mode, `dedupe` and `merge` tune aggregation behavior.
Partial failures are surfaced in `meta.engines_failed` and
`meta.engine_errors`. If all selected engines fail, the endpoint returns
a 502 with per-engine error details. Use `?format=markdown|text|ndjson`
for alternative output formats.
parameters:
- $ref: "#/components/parameters/TextQuery"
- $ref: "#/components/parameters/LangQuery"
- $ref: "#/components/parameters/RegionQuery"
- $ref: "#/components/parameters/DateQuery"
- $ref: "#/components/parameters/FileQuery"
- $ref: "#/components/parameters/SiteQuery"
- $ref: "#/components/parameters/LimitQuery"
- $ref: "#/components/parameters/StartQuery"
- $ref: "#/components/parameters/FilterQuery"
- $ref: "#/components/parameters/FeaturesQuery"
- $ref: "#/components/parameters/EnginesQuery"
- $ref: "#/components/parameters/MegaModeQuery"
- $ref: "#/components/parameters/MegaDedupeQuery"
- $ref: "#/components/parameters/MegaMergeQuery"
- $ref: "#/components/parameters/ExtractQuery"
- $ref: "#/components/parameters/ExtractModeQuery"
- $ref: "#/components/parameters/MinRunesQuery"
- $ref: "#/components/parameters/FormatQuery"
- $ref: "#/components/parameters/UseProxyHeader"
- $ref: "#/components/parameters/ProxyURLHeader"
- $ref: "#/components/parameters/ProxyCountryHeader"
- $ref: "#/components/parameters/ProxyClassHeader"
- $ref: "#/components/parameters/ProxyProviderHeader"
- $ref: "#/components/parameters/ProxySessionIDHeader"
- $ref: "#/components/parameters/TenantHeader"
responses:
"200":
description: Aggregated envelope with clusters
headers:
X-Request-ID:
$ref: "#/components/headers/XRequestID"
X-Cache:
$ref: "#/components/headers/XCache"
X-Proxy-Mode:
$ref: "#/components/headers/XProxyMode"
X-Proxy-Tag:
$ref: "#/components/headers/XProxyTag"
X-Proxy-Used:
$ref: "#/components/headers/XProxyUsed"
X-Network-Bytes:
$ref: "#/components/headers/XNetworkBytes"
X-Browser-Profile-Id:
$ref: "#/components/headers/XBrowserProfileID"
content:
application/json:
schema:
$ref: "#/components/schemas/MegaSearchEnvelope"
text/markdown:
schema:
type: string
text/plain:
schema:
type: string
application/x-ndjson:
schema:
type: string
"400":
$ref: "#/components/responses/BadRequestError"
"403":
$ref: "#/components/responses/ForbiddenError"
"429":
$ref: "#/components/responses/TooManyRequestsError"
"502":
$ref: "#/components/responses/BadGatewayError"
"503":
$ref: "#/components/responses/ServiceUnavailableError"
"504":
$ref: "#/components/responses/GatewayTimeoutError"
"500":
$ref: "#/components/responses/InternalServerError"
/mega/image:
get:
tags: [Mega]
operationId: megaImageSearch
summary: Image search across multiple engines with selectable execution mode
parameters:
- $ref: "#/components/parameters/TextQuery"
- $ref: "#/components/parameters/LangQuery"
- $ref: "#/components/parameters/RegionQuery"
- $ref: "#/components/parameters/DateQuery"
- $ref: "#/components/parameters/FileQuery"
- $ref: "#/components/parameters/SiteQuery"
- $ref: "#/components/parameters/LimitQuery"
- $ref: "#/components/parameters/StartQuery"
- $ref: "#/components/parameters/FilterQuery"
- $ref: "#/components/parameters/FeaturesQuery"
- $ref: "#/components/parameters/EnginesQuery"
- $ref: "#/components/parameters/MegaModeQuery"
- $ref: "#/components/parameters/MegaDedupeQuery"
- $ref: "#/components/parameters/MegaMergeQuery"
- $ref: "#/components/parameters/FormatQuery"
- $ref: "#/components/parameters/UseProxyHeader"
- $ref: "#/components/parameters/ProxyURLHeader"
- $ref: "#/components/parameters/ProxyCountryHeader"
- $ref: "#/components/parameters/ProxyClassHeader"
- $ref: "#/components/parameters/ProxyProviderHeader"
- $ref: "#/components/parameters/ProxySessionIDHeader"
- $ref: "#/components/parameters/TenantHeader"
responses:
"200":
description: Aggregated image results envelope
headers:
X-Request-ID:
$ref: "#/components/headers/XRequestID"
X-Cache:
$ref: "#/components/headers/XCache"
X-Proxy-Mode:
$ref: "#/components/headers/XProxyMode"
X-Proxy-Tag:
$ref: "#/components/headers/XProxyTag"
X-Proxy-Used:
$ref: "#/components/headers/XProxyUsed"
X-Network-Bytes:
$ref: "#/components/headers/XNetworkBytes"
X-Browser-Profile-Id:
$ref: "#/components/headers/XBrowserProfileID"
content:
application/json:
schema:
$ref: "#/components/schemas/ImageEnvelope"
"400":
$ref: "#/components/responses/BadRequestError"
"403":
$ref: "#/components/responses/ForbiddenError"
"429":
$ref: "#/components/responses/TooManyRequestsError"
"502":
$ref: "#/components/responses/BadGatewayError"
"503":
$ref: "#/components/responses/ServiceUnavailableError"
"504":
$ref: "#/components/responses/GatewayTimeoutError"
"500":
$ref: "#/components/responses/InternalServerError"
/mega/engines:
get:
tags: [Mega]
operationId: listMegaEngines
summary: List available engines and runtime state
responses:
"200":
description: Engine list
content:
application/json:
schema:
$ref: "#/components/schemas/MegaEnginesResponse"
/extract:
get:
tags: [Search]
operationId: extractURL
summary: Extract clean content from one URL
parameters:
- $ref: "#/components/parameters/URLQuery"
- $ref: "#/components/parameters/ExtractModeShortQuery"
- $ref: "#/components/parameters/MinRunesQuery"
- $ref: "#/components/parameters/LangQuery"
- $ref: "#/components/parameters/CleanQuery"
- $ref: "#/components/parameters/UseLLMSTxtQuery"
- $ref: "#/components/parameters/FormatQuery"
- $ref: "#/components/parameters/UseProxyHeader"
- $ref: "#/components/parameters/ProxyURLHeader"
responses:
"200":
description: Extracted URL content
content:
application/json:
schema:
$ref: "#/components/schemas/ExtractResult"
text/markdown:
schema:
type: string
text/plain:
schema:
type: string
application/x-ndjson:
schema:
type: string
"400":
$ref: "#/components/responses/BadRequestError"
"502":
$ref: "#/components/responses/BadGatewayError"
post:
tags: [Search]
operationId: extractURLPost
summary: Extract clean content from one URL
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [url]
properties:
url:
type: string
format: uri
mode:
type: string
enum: [auto, fast, rendered]
default: auto
clean:
type: boolean
default: true
description: >
Article-only extraction (default). Set `false` for
whole-readable-body extraction that keeps nav/feature/landing
content trafilatura would otherwise strip.
use_llms_txt:
type: boolean
default: false
description: >
When the URL is a site root, probe `/llms-full.txt` then
`/llms.txt` and return that LLM-optimized markdown instead of
scraping HTML. Falls through to normal extraction when absent.
min_runes:
type: integer
minimum: 0
description: >
Auto-mode escalation floor: if the fast (raw) pass yields fewer
extracted-text runes than this, escalate to a browser render.
`0` (default) uses the built-in floor. Ignored in `fast` and
`rendered` modes.
responses:
"200":
description: Extracted URL content
content:
application/json:
schema:
$ref: "#/components/schemas/ExtractResult"
"400":
$ref: "#/components/responses/BadRequestError"
"502":
$ref: "#/components/responses/BadGatewayError"
/health:
get:
tags: [Health]
operationId: healthCheck
summary: Service health status
responses:
"200":
description: Healthy or degraded service
content:
application/json:
schema:
$ref: "#/components/schemas/HealthStatus"
"503":
description: Unhealthy service
content:
application/json:
schema:
$ref: "#/components/schemas/HealthStatus"
/ready:
get:
tags: [Health]
operationId: readinessCheck
summary: Service readiness status
responses:
"200":
description: Instance is ready
content:
application/json:
schema:
$ref: "#/components/schemas/ReadinessStatus"
"503":
description: Instance is draining
content:
application/json:
schema:
$ref: "#/components/schemas/ReadinessStatus"
/stats:
get:
tags: [Stats]
operationId: getStats
summary: Combined cache, proxy, and circuit-breaker stats
responses:
"200":
description: Runtime statistics
content:
application/json:
schema:
$ref: "#/components/schemas/StatsResponse"
/stats/cache:
get:
tags: [Stats]
operationId: getCacheStats
summary: Cache statistics only
responses:
"200":
description: Cache status
content:
application/json:
schema:
$ref: "#/components/schemas/CacheStats"
/stats/proxy:
get:
tags: [Stats]
operationId: getProxyStats
summary: Proxy pool and per-engine proxy policy statistics
responses:
"200":
description: Proxy stats
content:
application/json:
schema:
$ref: "#/components/schemas/ProxyStats"
/stats/cb:
get:
tags: [Stats]
operationId: getCircuitBreakerStats
summary: Circuit breaker state per engine
responses:
"200":
description: Circuit breaker stats
content:
application/json:
schema:
$ref: "#/components/schemas/CircuitBreakerStatsResponse"
/openapi.yaml:
get:
tags: [Docs]
operationId: getOpenAPISpec
summary: Get raw OpenAPI YAML
responses:
"200":
description: OpenAPI YAML
content:
application/yaml:
schema:
type: string
/docs:
get:
tags: [Docs]
operationId: getSwaggerUI
summary: Swagger UI for interactive API docs
responses:
"200":
description: HTML page loading Swagger UI from CDN
content:
text/html:
schema:
type: string
components:
parameters:
EnginePath:
name: engine
in: path
required: true
description: Search engine endpoint alias (`duck` is DuckDuckGo).
schema:
type: string
enum: [google, yandex, baidu, bing, duck, ecosia]
TextQuery:
name: text
in: query
required: false
description: >
Search query text. At least one of `text`, `site`, or `file` must be non-empty.
schema:
type: string
example: golang
LangQuery:
name: lang
in: query
required: false
description: Language code (engine-specific behavior).
schema:
type: string
example: EN
RegionQuery:
name: region
in: query
required: false
description: >
Market/location hint. Country or locale-style values such as `US`,
`DE`, or `en-GB` are shared by engines that support them. Google also
accepts city names such as `Berlin` or `New York` and sends them as
`uule`. Yandex accepts numeric `lr` region IDs such as `213`; those IDs
are engine-specific and are ignored by other engines.
schema:
type: string
examples:
yandex:
value: "213"
country:
value: RU
google_city:
value: Berlin
DateQuery:
name: date
in: query
required: false
description: Date interval in `YYYYMMDD..YYYYMMDD` format.
schema:
type: string
pattern: "^[0-9]{8}\\.\\.[0-9]{8}$"
example: 20250101..20250131
FileQuery:
name: file
in: query
required: false
description: File extension filter (for engines that support it).
schema:
type: string
example: PDF
SiteQuery:
name: site
in: query
required: false
description: Site/domain filter.
schema:
type: string
example: github.com
LimitQuery:
name: limit
in: query
required: false
description: Maximum organic results to return (1-100). Ads may be returned in addition. Omitted or small limits (<=10) parse only the first SERP page; larger limits may paginate when an engine supports it.
schema:
type: integer
minimum: 1
maximum: 100
default: 10
example: 10
StartQuery:
name: start
in: query
required: false
description: Pagination offset (must be >= 0).
schema:
type: integer
minimum: 0
default: 0
example: 20
FilterQuery:
name: filter
in: query
required: false
description: Duplicate filtering flag (primarily used by Google parser behavior).
schema:
type: boolean
default: true
FeaturesQuery:
name: features
in: query
required: false
description: >
Populate the top-level serp_features array (AI summaries, answer boxes,
people-also-ask, related searches) from the live browser search when
supported by the engine.
schema:
type: boolean
default: true
EnginesQuery:
name: engines
in: query
required: false
description: >
Comma-separated engine list for mega endpoints. If omitted, all available engines are used.
schema:
type: string
example: google,bing,duckduckgo
MegaModeQuery:
name: mode
in: query
required: false
description: >
Mega execution mode. `balanced` (default) runs all selected engines in parallel.
`any` runs selected engines sequentially in request order until first success.
`fast` runs only one engine: the fastest by circuit-breaker average response time.
schema:
type: string
enum: [balanced, any, fast]
default: balanced
MegaDedupeQuery:
name: dedupe
in: query
required: false
description: >
Enable deduplication by normalized URL. Default `true`.
schema:
type: boolean
default: true
MegaMergeQuery:
name: merge
in: query
required: false
description: >
Merge results from all successful engines into one flat list. Default `true`.
When `false`, only the first requested engine that returned results is kept.
schema:
type: boolean
default: true
FormatQuery:
name: format
in: query
required: false
description: >
Output format. `json` (default) returns the envelope. `markdown` returns a
Markdown document suitable for Slack/email. `text` returns a minimal plain-text
block optimised for LLM context windows. `ndjson` returns one result object per
line with no envelope. The `Accept` header is also checked
(`text/markdown`, `text/plain`, `application/x-ndjson`).
schema:
type: string
enum: [json, markdown, text, ndjson]
default: json
URLQuery:
name: url
in: query
required: true
description: Absolute URL to fetch and extract.
schema:
type: string
format: uri
ExtractQuery:
name: extract
in: query
required: false
description: >
Fetch and embed cleaned target-page content for the top web results.
Accepts a boolean or an integer depth: `extract=0`/`false` disables
extraction; `extract=true`/`1` enriches the top result; `extract=N`
(1-5) enriches the top N results. The tuning params `extract_mode` and
`min_runes` imply `extract=true` (top 1) when present, unless
`extract=0` is set explicitly.
schema:
oneOf:
- type: boolean
- type: integer
minimum: 0
maximum: 5
default: false
ExtractModeQuery:
name: extract_mode
in: query
required: false
description: >
Extraction strategy for target pages. Its presence implies
`extract=true` unless `extract=0` is set explicitly.
schema:
type: string
enum: [auto, fast, rendered]
default: auto
ExtractModeShortQuery:
name: mode
in: query
required: false
description: Extraction strategy for one URL.
schema:
type: string
enum: [auto, fast, rendered]
default: auto
MinRunesQuery:
name: min_runes
in: query
required: false
description: >
Auto-mode escalation floor: if the fast (raw) pass yields fewer
extracted-text runes than this, escalate to a browser render. `0`
(default) uses the built-in floor. Ignored in `fast` and `rendered`
modes.
schema:
type: integer
minimum: 0
CleanQuery:
name: clean
in: query
required: false
description: >
Article-only extraction (default). Set `false` for whole-readable-body
extraction that keeps nav/feature/landing content trafilatura would
otherwise strip — useful for landing pages, doc indexes, and dashboards.
schema:
type: boolean
default: true
UseLLMSTxtQuery:
name: use_llms_txt
in: query
required: false
description: >
When the URL is a site root, probe `/llms-full.txt` then `/llms.txt` and
return that LLM-optimized markdown instead of scraping HTML
(see https://llmstxt.org/). Falls through to normal extraction when
absent. Ignored for non-root URLs, where it would miss the requested
page's own content.
schema:
type: boolean
default: false
UseProxyHeader:
name: X-Use-Proxy
in: header
required: false
description: >
Request-scoped proxy override. Use `direct` to disable proxy or a tag name to
force a specific proxy pool.
schema:
type: string
examples:
direct:
value: direct
tag:
value: us
ProxyURLHeader:
name: X-Proxy-URL
in: header
required: false
description: >
Per-request proxy URL supplied by an upstream balancer. Honored only when
`proxies.allow_request_proxy_url: true` is set on the worker; otherwise the
request is rejected with `400 bad_request` and `reason=REQUEST_PROXY_URL_DISABLED`.
Authenticated SOCKS proxies are rejected in browser mode
(`reason=UNSUPPORTED_PROXY_SCHEME`). Credentials are never logged or returned.
Precedence: `X-Use-Proxy: direct` > `X-Proxy-URL` > `X-Use-Proxy: <tag>` >
per-engine configured tag > `proxies.global` > direct.
schema:
type: string
example: http://user:pass@proxy.example:8080
ProxyCountryHeader:
name: X-Proxy-Country
in: header
required: false
description: >
Two-letter market country code for the supplied proxy. Used as part of the
cache key so different markets do not share results.
schema:
type: string
example: us
ProxyClassHeader:
name: X-Proxy-Class
in: header
required: false
description: Proxy class identifier (e.g. `datacenter`, `residential`, `mobile`). Part of the cache key.
schema:
type: string
example: residential
ProxyProviderHeader:
name: X-Proxy-Provider
in: header
required: false
description: Upstream proxy provider identifier (e.g. `webshare`, `brightdata`). Part of the cache key.
schema:
type: string
example: webshare
ProxySessionIDHeader:
name: X-Proxy-Session-ID
in: header
required: false
description: >
Sticky session identifier minted by the balancer. Reusing the same value lets
OpenSERP reuse cookies and browser profile for that lane. Lanes are LRU-bounded
by `proxies.lanes.max_lanes`. Rotating the session ID gives a clean lane.
schema:
type: string
example: sid-123
TenantHeader:
name: X-Tenant
in: header
required: false
description: >
Optional tenant scope used to namespace sticky lane state across multi-tenant
deployments. When present, lanes are keyed by `tenant + engine + session_id`.
schema:
type: string
headers:
XRequestID:
description: >
UUID v7 request identifier. Matches `meta.request_id` in the response body and
appears in server logs for correlation.
schema:
type: string
XCache:
description: Cache status when cache is enabled (`HIT`, `MISS`, `BYPASS`).
schema:
type: string
enum: [HIT, MISS, BYPASS]
XFallbackEngine:
description: Engine name used when dedicated endpoint fallback served the response.
schema:
type: string
XProxyMode:
description: >
Effective proxy mode for the request. `request_url` indicates a per-request
`X-Proxy-URL` was honored.
schema: