@search1api/client 0.2.0 → 0.3.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.
- package/README.md +42 -3
- package/dist/client.d.ts +12 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/generated.d.ts +375 -31
- package/dist/generated.d.ts.map +1 -1
- package/dist/index.cjs +36 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +36 -1
- package/dist/index.js.map +2 -2
- package/dist/types.d.ts +62 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/generated.d.ts
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
* Do not make direct changes to the file.
|
|
4
4
|
*/
|
|
5
5
|
export interface paths {
|
|
6
|
+
"/feedback": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
get?: never;
|
|
14
|
+
put?: never;
|
|
15
|
+
/**
|
|
16
|
+
* Report a Search1API problem or feature request
|
|
17
|
+
* @description Report a Search1API problem, missing capability, or confusing documentation encountered during a task. Only message is required. Optional request_id refers to the original problem request. Do not include credentials, personal data, or private user content. Reports are stored in Agentback and linked to an opaque account reference. Do not report every empty result or retry the same report automatically; feedback should not block the main task. Returns 201 only after storage succeeds. Maximum JSON body size: 16 KiB. Limited to 10 submissions per account per minute at a Cloudflare location. Free to call.
|
|
18
|
+
*/
|
|
19
|
+
post: operations["feedback"];
|
|
20
|
+
delete?: never;
|
|
21
|
+
options?: never;
|
|
22
|
+
head?: never;
|
|
23
|
+
patch?: never;
|
|
24
|
+
trace?: never;
|
|
25
|
+
};
|
|
6
26
|
"/screenshot": {
|
|
7
27
|
parameters: {
|
|
8
28
|
query?: never;
|
|
@@ -12,7 +32,10 @@ export interface paths {
|
|
|
12
32
|
};
|
|
13
33
|
get?: never;
|
|
14
34
|
put?: never;
|
|
15
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Render a web page as a PNG, JPEG, or WebP image
|
|
37
|
+
* @description Render a public webpage as a PNG, JPEG, or WebP image. Use it when appearance is the point — layout checks, visual previews, or content that does not survive text extraction — and control the viewport, when the page counts as ready, and whether to capture the full document or a single element by CSS selector. When you want the page's text instead, call POST /crawl. Costs 2 credits per request.
|
|
38
|
+
*/
|
|
16
39
|
post: operations["screenshot"];
|
|
17
40
|
delete?: never;
|
|
18
41
|
options?: never;
|
|
@@ -29,7 +52,10 @@ export interface paths {
|
|
|
29
52
|
};
|
|
30
53
|
get?: never;
|
|
31
54
|
put?: never;
|
|
32
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Search the web using multiple search engines
|
|
57
|
+
* @description Search the live public web when the answer depends on current information, sources, or research a model's training data cannot cover. Returns ranked results with id, title, URL, snippet, and `published_date` (ISO 8601, when the engine exposes one) across 13+ engines, with optional images. Set `crawl_results` to pull the top N result pages in the same call — each crawled page is billed as an additional crawl — or pass a result URL to POST /crawl separately. Costs 1 credit per request.
|
|
58
|
+
*/
|
|
33
59
|
post: operations["search"];
|
|
34
60
|
delete?: never;
|
|
35
61
|
options?: never;
|
|
@@ -46,7 +72,10 @@ export interface paths {
|
|
|
46
72
|
};
|
|
47
73
|
get?: never;
|
|
48
74
|
put?: never;
|
|
49
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Search news articles across multiple sources
|
|
77
|
+
* @description Search recent news when the question is about events, announcements, or coverage rather than reference material. Returns articles from verified publishers with title, URL, snippet, `published_date` (ISO 8601, when known), and optional full page content, filterable by site, language, and time range. For questions that are not time-sensitive, prefer POST /search. Costs 1 credit per request.
|
|
78
|
+
*/
|
|
50
79
|
post: operations["news"];
|
|
51
80
|
delete?: never;
|
|
52
81
|
options?: never;
|
|
@@ -54,6 +83,26 @@ export interface paths {
|
|
|
54
83
|
patch?: never;
|
|
55
84
|
trace?: never;
|
|
56
85
|
};
|
|
86
|
+
"/ask": {
|
|
87
|
+
parameters: {
|
|
88
|
+
query?: never;
|
|
89
|
+
header?: never;
|
|
90
|
+
path?: never;
|
|
91
|
+
cookie?: never;
|
|
92
|
+
};
|
|
93
|
+
get?: never;
|
|
94
|
+
put?: never;
|
|
95
|
+
/**
|
|
96
|
+
* Search the engines a natural-language request calls for
|
|
97
|
+
* @description Agentic search. Describe what you are looking for in plain language and let a decision model (currently TypeSafe Jev) decide where to look. It picks up to five engines (web search, Hacker News, Reddit, GitHub, X, arXiv, Wikipedia, IMDb, WeChat, YouTube), rewrites the request into search keywords, infers a publication window from phrases such as "this week", searches the engines in parallel, and returns only the results judged relevant, merged and ranked, so agents read fewer off-topic results. The request takes only `query`; engines, keywords, and the window are always chosen by the model, and the response reports them in `intent`. Use POST /search instead when you already know the engine and keywords and want its raw ranking. Costs 5 credits per request.
|
|
98
|
+
*/
|
|
99
|
+
post: operations["ask"];
|
|
100
|
+
delete?: never;
|
|
101
|
+
options?: never;
|
|
102
|
+
head?: never;
|
|
103
|
+
patch?: never;
|
|
104
|
+
trace?: never;
|
|
105
|
+
};
|
|
57
106
|
"/crawl": {
|
|
58
107
|
parameters: {
|
|
59
108
|
query?: never;
|
|
@@ -63,7 +112,10 @@ export interface paths {
|
|
|
63
112
|
};
|
|
64
113
|
get?: never;
|
|
65
114
|
put?: never;
|
|
66
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Crawl a URL and extract its content
|
|
117
|
+
* @description Fetch one public URL and return its readable title and body as clean text, with navigation, boilerplate, and scripts stripped. Use it on a URL the user supplied or one returned by POST /search. To ingest a whole site rather than a single page, use POST /deepcrawl. Send an array of request objects to crawl several URLs in one call: the response is an array containing only the URLs that succeeded, in no guaranteed order, so match items back to your input by `crawlParameters.url`; failed URLs are omitted and not charged. `enable_fallback` is accepted as a snake_case alias of `enableFallback`. Costs 1 credit per request.
|
|
118
|
+
*/
|
|
67
119
|
post: operations["crawl"];
|
|
68
120
|
delete?: never;
|
|
69
121
|
options?: never;
|
|
@@ -80,7 +132,10 @@ export interface paths {
|
|
|
80
132
|
};
|
|
81
133
|
get?: never;
|
|
82
134
|
put?: never;
|
|
83
|
-
/**
|
|
135
|
+
/**
|
|
136
|
+
* Extract sitemap URLs from a website
|
|
137
|
+
* @description Discover the public URLs of a site when you need to know which pages exist before fetching any of them — scoping a crawl, auditing coverage, or locating a section. With the default `type: "sitemap"` this reads the site's own sitemap: `Sitemap:` directives in robots.txt first, then the conventional paths, following sitemap index files and gzipped sitemaps, and returns the URLs it declares for the requested host. A site that publishes no sitemap falls back to the links found on the given page. Use `type: "all"` to skip the sitemap and get every link on that one page instead, including links to other hosts. Neither mode fetches page content. Costs 1 credit per request.
|
|
138
|
+
*/
|
|
84
139
|
post: operations["sitemap"];
|
|
85
140
|
delete?: never;
|
|
86
141
|
options?: never;
|
|
@@ -97,7 +152,10 @@ export interface paths {
|
|
|
97
152
|
};
|
|
98
153
|
get?: never;
|
|
99
154
|
put?: never;
|
|
100
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* Get trending topics from various platforms
|
|
157
|
+
* @description List what is currently popular on a supported platform, such as GitHub repositories or Hacker News stories, when the user asks what is trending or new right now. This reads a platform's own live ranking rather than performing a query — for topic searches use POST /search. Costs 1 credit per request.
|
|
158
|
+
*/
|
|
101
159
|
post: operations["trending"];
|
|
102
160
|
delete?: never;
|
|
103
161
|
options?: never;
|
|
@@ -114,7 +172,10 @@ export interface paths {
|
|
|
114
172
|
};
|
|
115
173
|
get?: never;
|
|
116
174
|
put?: never;
|
|
117
|
-
/**
|
|
175
|
+
/**
|
|
176
|
+
* Extract structured content from a URL
|
|
177
|
+
* @description Pull structured data out of a single webpage using a natural-language prompt and a JSON schema you supply. Use it when you need specific fields — prices, specifications, contact details — rather than the whole document; when you want the full text, use POST /crawl. Costs 10 credits per request.
|
|
178
|
+
*/
|
|
118
179
|
post: operations["extract"];
|
|
119
180
|
delete?: never;
|
|
120
181
|
options?: never;
|
|
@@ -131,7 +192,10 @@ export interface paths {
|
|
|
131
192
|
};
|
|
132
193
|
get?: never;
|
|
133
194
|
put?: never;
|
|
134
|
-
/**
|
|
195
|
+
/**
|
|
196
|
+
* Deep crawl a website across multiple pages
|
|
197
|
+
* @description Start an asynchronous crawl of an entire site and package the pages as documents. Use it for whole-site ingestion; a single page is POST /crawl. The call returns a task id immediately rather than the result — poll GET /deepcrawl/status/{taskId} until the task reports completion. Costs 20 credits per request.
|
|
198
|
+
*/
|
|
135
199
|
post: operations["deepcrawl"];
|
|
136
200
|
delete?: never;
|
|
137
201
|
options?: never;
|
|
@@ -146,7 +210,10 @@ export interface paths {
|
|
|
146
210
|
path?: never;
|
|
147
211
|
cookie?: never;
|
|
148
212
|
};
|
|
149
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* Check deepcrawl task status
|
|
215
|
+
* @description Poll a deepcrawl task started by POST /deepcrawl. Returns the task's current state and, once it finishes, where to retrieve the packaged result. Safe to call repeatedly. Free to call.
|
|
216
|
+
*/
|
|
150
217
|
get: operations["deepcrawlStatus"];
|
|
151
218
|
put?: never;
|
|
152
219
|
post?: never;
|
|
@@ -163,7 +230,10 @@ export interface paths {
|
|
|
163
230
|
path?: never;
|
|
164
231
|
cookie?: never;
|
|
165
232
|
};
|
|
166
|
-
/**
|
|
233
|
+
/**
|
|
234
|
+
* Health check
|
|
235
|
+
* @description Report whether the API is serving traffic. Takes no credentials, so use it for uptime and readiness checks — it will not tell you whether an API key is valid; call GET /usage for that. Free to call.
|
|
236
|
+
*/
|
|
167
237
|
get: operations["health"];
|
|
168
238
|
put?: never;
|
|
169
239
|
post?: never;
|
|
@@ -180,7 +250,10 @@ export interface paths {
|
|
|
180
250
|
path?: never;
|
|
181
251
|
cookie?: never;
|
|
182
252
|
};
|
|
183
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* Get API key usage statistics
|
|
255
|
+
* @description Return the remaining credit balance for the authenticated account. Use it to check headroom before starting an expensive job such as a deepcrawl, or to confirm an API key works. Free to call.
|
|
256
|
+
*/
|
|
184
257
|
get: operations["usage"];
|
|
185
258
|
put?: never;
|
|
186
259
|
post?: never;
|
|
@@ -194,7 +267,7 @@ export interface paths {
|
|
|
194
267
|
export type webhooks = Record<string, never>;
|
|
195
268
|
export interface components {
|
|
196
269
|
schemas: {
|
|
197
|
-
/** @description Search1API error. Payment challenges may use RFC 9457 problem detail fields. */
|
|
270
|
+
/** @description Search1API error. Every JSON error carries `ok: false`, `error` (a short status-derived label) and `message` (human-readable detail); validation failures add `errors`. Payment challenges may use RFC 9457 problem detail fields. */
|
|
198
271
|
ApiError: {
|
|
199
272
|
/** @enum {boolean} */
|
|
200
273
|
ok?: false;
|
|
@@ -216,9 +289,11 @@ export interface components {
|
|
|
216
289
|
SearchParameters: {
|
|
217
290
|
query: string;
|
|
218
291
|
/** @enum {string} */
|
|
219
|
-
search_service?: "google" | "bing" | "duckduckgo" | "yahoo" | "youtube" | "x" | "reddit" | "github" | "arxiv" | "wechat" | "bilibili" | "imdb" | "wikipedia" | "" | "
|
|
292
|
+
search_service?: "google" | "bing" | "bingcn" | "duckduckgo" | "yahoo" | "yandex" | "youtube" | "x" | "reddit" | "github" | "arxiv" | "wechat" | "bilibili" | "imdb" | "wikipedia" | "grokipedia" | "" | "baidu" | "360" | "quark";
|
|
220
293
|
/** @default 5 */
|
|
221
294
|
max_results: number;
|
|
295
|
+
/** @default 1 */
|
|
296
|
+
page: number;
|
|
222
297
|
/** @default 0 */
|
|
223
298
|
crawl_results: number;
|
|
224
299
|
/** @default false */
|
|
@@ -252,7 +327,7 @@ export interface components {
|
|
|
252
327
|
CrawlRequest: {
|
|
253
328
|
/** Format: uri */
|
|
254
329
|
url: string;
|
|
255
|
-
/** @default
|
|
330
|
+
/** @default true */
|
|
256
331
|
enableFallback: boolean;
|
|
257
332
|
};
|
|
258
333
|
SitemapRequest: {
|
|
@@ -285,6 +360,29 @@ export interface components {
|
|
|
285
360
|
link: string;
|
|
286
361
|
snippet: string;
|
|
287
362
|
content?: string;
|
|
363
|
+
/**
|
|
364
|
+
* @description When the page was published, as ISO 8601: `YYYY-MM-DD` when only the day is known (web search engines), or `YYYY-MM-DDTHH:MM:SSZ` in UTC when the source carries a time (x, reddit, github, arxiv, youtube, bilibili, wechat, news feeds). Omitted when the source exposes no date, so treat it as optional per result.
|
|
365
|
+
* @example 2026-09-03
|
|
366
|
+
*/
|
|
367
|
+
published_date?: string;
|
|
368
|
+
/**
|
|
369
|
+
* @description What a `github` result is: a repository, an issue, a pull request, or a discussion. Only present for `search_service: "github"`.
|
|
370
|
+
* @enum {string}
|
|
371
|
+
*/
|
|
372
|
+
kind?: "repo" | "issue" | "pr" | "discussion";
|
|
373
|
+
/** @description Stargazer count of a `github` repository result (`kind: "repo"`). */
|
|
374
|
+
stars?: number;
|
|
375
|
+
/** @description Primary language of a `github` repository result (`kind: "repo"`). Omitted when GitHub reports none. */
|
|
376
|
+
language?: string;
|
|
377
|
+
/** @description Comment count on a `github` issue, pull request or discussion, or on a `hackernews` thread (POST /news). */
|
|
378
|
+
num_comments?: number;
|
|
379
|
+
/**
|
|
380
|
+
* Format: uri
|
|
381
|
+
* @description POST /news with `search_service: "hackernews"` only: the submitted article. `link` is the Hacker News discussion thread; `story_url` is empty for Ask HN / Show HN text posts.
|
|
382
|
+
*/
|
|
383
|
+
story_url?: string;
|
|
384
|
+
/** @description POST /news with `search_service: "hackernews"` only: upvotes on the thread. */
|
|
385
|
+
points?: number;
|
|
288
386
|
} & {
|
|
289
387
|
[key: string]: unknown;
|
|
290
388
|
};
|
|
@@ -332,6 +430,44 @@ export interface components {
|
|
|
332
430
|
totalCost: number;
|
|
333
431
|
};
|
|
334
432
|
};
|
|
433
|
+
AskResult: {
|
|
434
|
+
title: string;
|
|
435
|
+
/** Format: uri */
|
|
436
|
+
link: string;
|
|
437
|
+
snippet: string;
|
|
438
|
+
/**
|
|
439
|
+
* @description When the page was published, as ISO 8601 (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`). Omitted when the engine exposes no date.
|
|
440
|
+
* @example 2026-09-03
|
|
441
|
+
*/
|
|
442
|
+
published_date?: string;
|
|
443
|
+
/** @description Engine that returned the result. */
|
|
444
|
+
source: string;
|
|
445
|
+
/** @description How likely the result is to be about the query, two decimals. Only results scoring at least 0.5 are returned. */
|
|
446
|
+
relevance: number;
|
|
447
|
+
};
|
|
448
|
+
AskResponse: {
|
|
449
|
+
/** @description The query as sent. */
|
|
450
|
+
query: string;
|
|
451
|
+
/** @description How the request was interpreted and searched. */
|
|
452
|
+
intent: {
|
|
453
|
+
/** @description Keywords sent to the engines, with platform and time phrases removed. */
|
|
454
|
+
search_query: string;
|
|
455
|
+
/** @description Engines searched. */
|
|
456
|
+
sources: string[];
|
|
457
|
+
/**
|
|
458
|
+
* @description Publication window applied, or null for none.
|
|
459
|
+
* @enum {string|null}
|
|
460
|
+
*/
|
|
461
|
+
time_range: "day" | "week" | "month" | "year" | null;
|
|
462
|
+
};
|
|
463
|
+
/** @description Relevant results from every engine, best first, with duplicates merged. May be empty. */
|
|
464
|
+
results: components["schemas"]["AskResult"][];
|
|
465
|
+
/** @description Engines that failed while others completed. The request is still charged. */
|
|
466
|
+
errors: {
|
|
467
|
+
source: string;
|
|
468
|
+
message: string;
|
|
469
|
+
}[];
|
|
470
|
+
};
|
|
335
471
|
CrawlResult: {
|
|
336
472
|
title: string;
|
|
337
473
|
/** Format: uri */
|
|
@@ -403,6 +539,11 @@ export interface components {
|
|
|
403
539
|
credential_type: "api_key" | "oauth";
|
|
404
540
|
client_id?: string | null;
|
|
405
541
|
};
|
|
542
|
+
FeedbackResponse: {
|
|
543
|
+
id: string;
|
|
544
|
+
/** @enum {string} */
|
|
545
|
+
status: "new";
|
|
546
|
+
};
|
|
406
547
|
};
|
|
407
548
|
responses: never;
|
|
408
549
|
parameters: never;
|
|
@@ -412,6 +553,115 @@ export interface components {
|
|
|
412
553
|
}
|
|
413
554
|
export type $defs = Record<string, never>;
|
|
414
555
|
export interface operations {
|
|
556
|
+
feedback: {
|
|
557
|
+
parameters: {
|
|
558
|
+
query?: never;
|
|
559
|
+
header?: never;
|
|
560
|
+
path?: never;
|
|
561
|
+
cookie?: never;
|
|
562
|
+
};
|
|
563
|
+
requestBody: {
|
|
564
|
+
content: {
|
|
565
|
+
"application/json": {
|
|
566
|
+
message: string;
|
|
567
|
+
intent?: string;
|
|
568
|
+
/**
|
|
569
|
+
* @default other
|
|
570
|
+
* @enum {string}
|
|
571
|
+
*/
|
|
572
|
+
category?: "bug" | "feature_request" | "docs" | "other";
|
|
573
|
+
request_id?: string;
|
|
574
|
+
agent?: {
|
|
575
|
+
name?: string;
|
|
576
|
+
model?: string;
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
responses: {
|
|
582
|
+
/** @description Successful response */
|
|
583
|
+
201: {
|
|
584
|
+
headers: {
|
|
585
|
+
[name: string]: unknown;
|
|
586
|
+
};
|
|
587
|
+
content: {
|
|
588
|
+
"application/json": components["schemas"]["FeedbackResponse"];
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
/** @description Bad Request */
|
|
592
|
+
400: {
|
|
593
|
+
headers: {
|
|
594
|
+
[name: string]: unknown;
|
|
595
|
+
};
|
|
596
|
+
content: {
|
|
597
|
+
"application/json": components["schemas"]["ApiError"];
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
/** @description Unauthorized */
|
|
601
|
+
401: {
|
|
602
|
+
headers: {
|
|
603
|
+
[name: string]: unknown;
|
|
604
|
+
};
|
|
605
|
+
content: {
|
|
606
|
+
"application/json": components["schemas"]["ApiError"];
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
/** @description Forbidden */
|
|
610
|
+
403: {
|
|
611
|
+
headers: {
|
|
612
|
+
[name: string]: unknown;
|
|
613
|
+
};
|
|
614
|
+
content: {
|
|
615
|
+
"application/json": components["schemas"]["ApiError"];
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
/** @description Payload Too Large */
|
|
619
|
+
413: {
|
|
620
|
+
headers: {
|
|
621
|
+
[name: string]: unknown;
|
|
622
|
+
};
|
|
623
|
+
content: {
|
|
624
|
+
"application/json": components["schemas"]["ApiError"];
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
/** @description Unsupported Media Type */
|
|
628
|
+
415: {
|
|
629
|
+
headers: {
|
|
630
|
+
[name: string]: unknown;
|
|
631
|
+
};
|
|
632
|
+
content: {
|
|
633
|
+
"application/json": components["schemas"]["ApiError"];
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
/** @description Too Many Requests */
|
|
637
|
+
429: {
|
|
638
|
+
headers: {
|
|
639
|
+
[name: string]: unknown;
|
|
640
|
+
};
|
|
641
|
+
content: {
|
|
642
|
+
"application/json": components["schemas"]["ApiError"];
|
|
643
|
+
};
|
|
644
|
+
};
|
|
645
|
+
/** @description Internal Server Error */
|
|
646
|
+
500: {
|
|
647
|
+
headers: {
|
|
648
|
+
[name: string]: unknown;
|
|
649
|
+
};
|
|
650
|
+
content: {
|
|
651
|
+
"application/json": components["schemas"]["ApiError"];
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
/** @description Service Unavailable */
|
|
655
|
+
503: {
|
|
656
|
+
headers: {
|
|
657
|
+
[name: string]: unknown;
|
|
658
|
+
};
|
|
659
|
+
content: {
|
|
660
|
+
"application/json": components["schemas"]["ApiError"];
|
|
661
|
+
};
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
};
|
|
415
665
|
screenshot: {
|
|
416
666
|
parameters: {
|
|
417
667
|
query?: never;
|
|
@@ -512,6 +762,15 @@ export interface operations {
|
|
|
512
762
|
"application/problem+json": components["schemas"]["ApiError"];
|
|
513
763
|
};
|
|
514
764
|
};
|
|
765
|
+
/** @description Forbidden */
|
|
766
|
+
403: {
|
|
767
|
+
headers: {
|
|
768
|
+
[name: string]: unknown;
|
|
769
|
+
};
|
|
770
|
+
content: {
|
|
771
|
+
"application/json": components["schemas"]["ApiError"];
|
|
772
|
+
};
|
|
773
|
+
};
|
|
515
774
|
/** @description Validation Error */
|
|
516
775
|
422: {
|
|
517
776
|
headers: {
|
|
@@ -580,9 +839,11 @@ export interface operations {
|
|
|
580
839
|
"application/json": {
|
|
581
840
|
query: string;
|
|
582
841
|
/** @enum {string} */
|
|
583
|
-
search_service?: "google" | "bing" | "duckduckgo" | "yahoo" | "youtube" | "x" | "reddit" | "github" | "arxiv" | "wechat" | "bilibili" | "imdb" | "wikipedia" | "" | "
|
|
842
|
+
search_service?: "google" | "bing" | "bingcn" | "duckduckgo" | "yahoo" | "yandex" | "youtube" | "x" | "reddit" | "github" | "arxiv" | "wechat" | "bilibili" | "imdb" | "wikipedia" | "grokipedia" | "" | "baidu" | "360" | "quark";
|
|
584
843
|
/** @default 5 */
|
|
585
844
|
max_results?: number;
|
|
845
|
+
/** @default 1 */
|
|
846
|
+
page?: number;
|
|
586
847
|
/** @default 0 */
|
|
587
848
|
crawl_results?: number;
|
|
588
849
|
/** @default false */
|
|
@@ -597,9 +858,11 @@ export interface operations {
|
|
|
597
858
|
} | {
|
|
598
859
|
query: string;
|
|
599
860
|
/** @enum {string} */
|
|
600
|
-
search_service?: "google" | "bing" | "duckduckgo" | "yahoo" | "youtube" | "x" | "reddit" | "github" | "arxiv" | "wechat" | "bilibili" | "imdb" | "wikipedia" | "" | "
|
|
861
|
+
search_service?: "google" | "bing" | "bingcn" | "duckduckgo" | "yahoo" | "yandex" | "youtube" | "x" | "reddit" | "github" | "arxiv" | "wechat" | "bilibili" | "imdb" | "wikipedia" | "grokipedia" | "" | "baidu" | "360" | "quark";
|
|
601
862
|
/** @default 5 */
|
|
602
863
|
max_results?: number;
|
|
864
|
+
/** @default 1 */
|
|
865
|
+
page?: number;
|
|
603
866
|
/** @default 0 */
|
|
604
867
|
crawl_results?: number;
|
|
605
868
|
/** @default false */
|
|
@@ -651,15 +914,6 @@ export interface operations {
|
|
|
651
914
|
"application/problem+json": components["schemas"]["ApiError"];
|
|
652
915
|
};
|
|
653
916
|
};
|
|
654
|
-
/** @description Not Found */
|
|
655
|
-
404: {
|
|
656
|
-
headers: {
|
|
657
|
-
[name: string]: unknown;
|
|
658
|
-
};
|
|
659
|
-
content: {
|
|
660
|
-
"application/json": components["schemas"]["ApiError"];
|
|
661
|
-
};
|
|
662
|
-
};
|
|
663
917
|
/** @description Validation Error */
|
|
664
918
|
422: {
|
|
665
919
|
headers: {
|
|
@@ -781,8 +1035,8 @@ export interface operations {
|
|
|
781
1035
|
"application/problem+json": components["schemas"]["ApiError"];
|
|
782
1036
|
};
|
|
783
1037
|
};
|
|
784
|
-
/** @description
|
|
785
|
-
|
|
1038
|
+
/** @description Validation Error */
|
|
1039
|
+
422: {
|
|
786
1040
|
headers: {
|
|
787
1041
|
[name: string]: unknown;
|
|
788
1042
|
};
|
|
@@ -790,8 +1044,26 @@ export interface operations {
|
|
|
790
1044
|
"application/json": components["schemas"]["ApiError"];
|
|
791
1045
|
};
|
|
792
1046
|
};
|
|
793
|
-
/** @description
|
|
794
|
-
|
|
1047
|
+
/** @description Too Many Requests */
|
|
1048
|
+
429: {
|
|
1049
|
+
headers: {
|
|
1050
|
+
[name: string]: unknown;
|
|
1051
|
+
};
|
|
1052
|
+
content: {
|
|
1053
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1056
|
+
/** @description Internal Server Error */
|
|
1057
|
+
500: {
|
|
1058
|
+
headers: {
|
|
1059
|
+
[name: string]: unknown;
|
|
1060
|
+
};
|
|
1061
|
+
content: {
|
|
1062
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1063
|
+
};
|
|
1064
|
+
};
|
|
1065
|
+
/** @description Bad Gateway */
|
|
1066
|
+
502: {
|
|
795
1067
|
headers: {
|
|
796
1068
|
[name: string]: unknown;
|
|
797
1069
|
};
|
|
@@ -799,6 +1071,60 @@ export interface operations {
|
|
|
799
1071
|
"application/json": components["schemas"]["ApiError"];
|
|
800
1072
|
};
|
|
801
1073
|
};
|
|
1074
|
+
};
|
|
1075
|
+
};
|
|
1076
|
+
ask: {
|
|
1077
|
+
parameters: {
|
|
1078
|
+
query?: never;
|
|
1079
|
+
header?: never;
|
|
1080
|
+
path?: never;
|
|
1081
|
+
cookie?: never;
|
|
1082
|
+
};
|
|
1083
|
+
requestBody: {
|
|
1084
|
+
content: {
|
|
1085
|
+
"application/json": {
|
|
1086
|
+
/** @description What you are looking for, in natural language. Platform hints ("on Reddit", "papers") and time hints ("this week") steer engine and time-range selection. */
|
|
1087
|
+
query: string;
|
|
1088
|
+
};
|
|
1089
|
+
};
|
|
1090
|
+
};
|
|
1091
|
+
responses: {
|
|
1092
|
+
/** @description Successful response */
|
|
1093
|
+
200: {
|
|
1094
|
+
headers: {
|
|
1095
|
+
[name: string]: unknown;
|
|
1096
|
+
};
|
|
1097
|
+
content: {
|
|
1098
|
+
"application/json": components["schemas"]["AskResponse"];
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
/** @description Bad Request */
|
|
1102
|
+
400: {
|
|
1103
|
+
headers: {
|
|
1104
|
+
[name: string]: unknown;
|
|
1105
|
+
};
|
|
1106
|
+
content: {
|
|
1107
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1108
|
+
};
|
|
1109
|
+
};
|
|
1110
|
+
/** @description Unauthorized */
|
|
1111
|
+
401: {
|
|
1112
|
+
headers: {
|
|
1113
|
+
[name: string]: unknown;
|
|
1114
|
+
};
|
|
1115
|
+
content: {
|
|
1116
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1117
|
+
};
|
|
1118
|
+
};
|
|
1119
|
+
/** @description Payment Required */
|
|
1120
|
+
402: {
|
|
1121
|
+
headers: {
|
|
1122
|
+
[name: string]: unknown;
|
|
1123
|
+
};
|
|
1124
|
+
content: {
|
|
1125
|
+
"application/problem+json": components["schemas"]["ApiError"];
|
|
1126
|
+
};
|
|
1127
|
+
};
|
|
802
1128
|
/** @description Too Many Requests */
|
|
803
1129
|
429: {
|
|
804
1130
|
headers: {
|
|
@@ -840,12 +1166,12 @@ export interface operations {
|
|
|
840
1166
|
"application/json": {
|
|
841
1167
|
/** Format: uri */
|
|
842
1168
|
url: string;
|
|
843
|
-
/** @default
|
|
1169
|
+
/** @default true */
|
|
844
1170
|
enableFallback?: boolean;
|
|
845
1171
|
} | {
|
|
846
1172
|
/** Format: uri */
|
|
847
1173
|
url: string;
|
|
848
|
-
/** @default
|
|
1174
|
+
/** @default true */
|
|
849
1175
|
enableFallback?: boolean;
|
|
850
1176
|
}[];
|
|
851
1177
|
};
|
|
@@ -887,6 +1213,24 @@ export interface operations {
|
|
|
887
1213
|
"application/problem+json": components["schemas"]["ApiError"];
|
|
888
1214
|
};
|
|
889
1215
|
};
|
|
1216
|
+
/** @description Not Found */
|
|
1217
|
+
404: {
|
|
1218
|
+
headers: {
|
|
1219
|
+
[name: string]: unknown;
|
|
1220
|
+
};
|
|
1221
|
+
content: {
|
|
1222
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1223
|
+
};
|
|
1224
|
+
};
|
|
1225
|
+
/** @description Gone */
|
|
1226
|
+
410: {
|
|
1227
|
+
headers: {
|
|
1228
|
+
[name: string]: unknown;
|
|
1229
|
+
};
|
|
1230
|
+
content: {
|
|
1231
|
+
"application/json": components["schemas"]["ApiError"];
|
|
1232
|
+
};
|
|
1233
|
+
};
|
|
890
1234
|
/** @description Validation Error */
|
|
891
1235
|
422: {
|
|
892
1236
|
headers: {
|