-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexa-openapi-spec.yaml
More file actions
1793 lines (1741 loc) · 64.8 KB
/
exa-openapi-spec.yaml
File metadata and controls
1793 lines (1741 loc) · 64.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:
version: 1.2.0
title: Exa Search API
description: A comprehensive API for internet-scale search, allowing users to perform queries and retrieve results from a wide variety of sources using embeddings-based and traditional search.
servers:
- url: https://api.exa.ai
security:
- apikey: []
paths:
/search:
post:
operationId: search
summary: Search
description: Perform a search with a Exa prompt-engineered query and retrieve a list of relevant results. Optionally get contents.
x-codeSamples:
- lang: bash
label: Simple search and contents
source: |
curl -X POST 'https://api.exa.ai/search' \
-H 'x-api-key: YOUR-EXA-API-KEY' \
-H 'Content-Type: application/json' \
-d '{
"query": "Latest research in LLMs",
"text": true
}'
- lang: python
label: Simple search and contents
source: |
# pip install exa-py
from exa_py import Exa
exa = Exa('YOUR_EXA_API_KEY')
results = exa.search_and_contents(
"Latest research in LLMs",
text=True
)
print(results)
- lang: javascript
label: Simple search and contents
source: |
// npm install exa-js
import Exa from 'exa-js';
const exa = new Exa('YOUR_EXA_API_KEY');
const results = await exa.searchAndContents(
'Latest research in LLMs',
{ text: true }
);
console.log(results);
- lang: php
label: Simple search and contents
source: ""
- lang: go
label: Simple search and contents
source: ""
- lang: java
label: Simple search and contents
source: ""
- lang: bash
label: Advanced search with filters
source: |
curl --request POST \
--url https://api.exa.ai/search \
--header 'x-api-key: <token>' \
--header 'Content-Type: application/json' \
--data '{
"query": "Latest research in LLMs",
"type": "auto",
"category": "research paper",
"numResults": 10,
"contents": {
"text": true,
"summary": {
"query": "Main developments"
},
"subpages": 1,
"subpageTarget": "sources",
"extras": {
"links": 1,
"imageLinks": 1
}
}
}'
- lang: python
label: Advanced search with filters
source: |
# pip install exa-py
from exa_py import Exa
exa = Exa('YOUR_EXA_API_KEY')
results = exa.search_and_contents(
"Latest research in LLMs",
type="auto",
category="research paper",
num_results=10,
text=True,
summary={
"query": "Main developments"
},
subpages=1,
subpage_target="sources",
extras={
"links": 1,
"image_links": 1
}
)
print(results)
- lang: javascript
label: Advanced search with filters
source: |
// npm install exa-js
import Exa from 'exa-js';
const exa = new Exa('YOUR_EXA_API_KEY');
const results = await exa.searchAndContents('Latest research in LLMs', {
type: 'auto',
category: 'research paper',
numResults: 10,
contents: {
text: true,
summary: {
query: 'Main developments'
},
subpages: 1,
subpageTarget: 'sources',
extras: {
links: 1,
imageLinks: 1
}
}
});
console.log(results);
- lang: bash
label: Deep search with query variations
source: |
curl --request POST \
--url https://api.exa.ai/search \
--header 'x-api-key: <token>' \
--header 'Content-Type: application/json' \
--data '{
"query": "blog post about AI",
"additionalQueries": ["AI blogpost", "machine learning blogs"],
"type": "deep",
"contents": {
"text": true,
"context": true
}
}'
- lang: python
label: Deep search with query variations
source: |
# pip install exa-py
from exa_py import Exa
exa = Exa('YOUR_EXA_API_KEY')
results = exa.search_and_contents(
"blog post about AI",
type="deep",
additional_queries=["AI blogpost", "machine learning blogs"],
text=True,
context=True
)
print(results)
- lang: javascript
label: Deep search with query variations
source: |
// npm install exa-js
import Exa from 'exa-js';
const exa = new Exa('YOUR_EXA_API_KEY');
const results = await exa.searchAndContents('blog post about AI', {
type: 'deep',
additionalQueries: ['AI blogpost', 'machine learning blogs'],
text: true,
context: true
});
console.log(results);
- lang: php
label: Advanced search with filters
source: ""
- lang: go
label: Advanced search with filters
source: ""
- lang: java
label: Advanced search with filters
source: ""
requestBody:
required: true
content:
application/json:
schema:
allOf:
- type: object
properties:
query:
type: string
example: "Latest developments in LLM capabilities"
description: The query string for the search.
additionalQueries:
type: array
items:
type: string
description: Additional query variations for deep search. Only works with type="deep" or type="deep-reasoning". When provided, these queries are used alongside the main query for comprehensive results.
example: ["LLM advancements", "large language model progress"]
type:
type: string
enum:
- neural
- fast
- auto
- deep
- deep-reasoning
- instant
description: The type of search. Neural uses an embeddings-based model, auto (default) intelligently combines neural and other search methods, fast uses streamlined versions of the search models, deep is light deep search, deep-reasoning is base deep search, and instant provides the lowest latency search optimized for real-time applications.
example: "auto"
default: "auto"
outputSchema:
type: object
description: >-
JSON schema for deep search structured output mode. When provided, the
output.content field is returned as structured JSON matching this schema.
additionalProperties: {}
category:
type: string
enum:
- company
- research paper
- news
- pdf
- github
- personal site
- people
- financial report
description: "A data category to focus on. The `people` and `company` categories have improved quality for finding LinkedIn profiles and company pages. Note: The `company` and `people` categories only support a limited set of filters. The following parameters are NOT supported for these categories: `startPublishedDate`, `endPublishedDate`, `startCrawlDate`, `endCrawlDate`, `includeText`, `excludeText`, `excludeDomains`. For `people` category, `includeDomains` only accepts LinkedIn domains. Using unsupported parameters will result in a 400 error."
example: "research paper"
userLocation:
type: string
description: The two-letter ISO country code of the user, e.g. US.
example: "US"
required:
- query
- $ref: "#/components/schemas/CommonRequest"
responses:
"200":
$ref: "#/components/responses/SearchResponse"
/findSimilar:
post:
operationId: findSimilar
summary: Find similar links
description: Find similar links to the link provided. Optionally get contents.
x-codeSamples:
- lang: bash
label: Find similar links
source: |
curl -X POST 'https://api.exa.ai/findSimilar' \
-H 'x-api-key: YOUR-EXA-API-KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://arxiv.org/abs/2307.06435",
"text": true
}'
- lang: python
label: Find similar links
source: |
# pip install exa-py
from exa_py import Exa
exa = Exa('YOUR_EXA_API_KEY')
results = exa.find_similar_and_contents(
url="https://arxiv.org/abs/2307.06435",
text=True
)
print(results)
- lang: javascript
label: Find similar links
source: |
// npm install exa-js
import Exa from 'exa-js';
const exa = new Exa('YOUR_EXA_API_KEY');
const results = await exa.findSimilarAndContents(
'https://arxiv.org/abs/2307.06435',
{ text: true }
);
console.log(results);
- lang: php
label: Find similar links
source: ""
- lang: go
label: Find similar links
source: ""
- lang: java
label: Find similar links
source: ""
requestBody:
required: true
content:
application/json:
schema:
allOf:
- type: object
properties:
url:
type: string
example: "https://arxiv.org/abs/2307.06435"
description: The url for which you would like to find similar links.
excludeSourceDomain:
type: boolean
description: If true, excludes links from the same domain as the provided URL from the results.
example: true
required:
- url
- $ref: "#/components/schemas/CommonRequest"
responses:
"200":
$ref: "#/components/responses/FindSimilarResponse"
/contents:
post:
summary: Get Contents
operationId: "getContents"
x-codeSamples:
- lang: bash
label: Simple contents retrieval
source: |
curl -X POST 'https://api.exa.ai/contents' \
-H 'x-api-key: YOUR-EXA-API-KEY' \
-H 'Content-Type: application/json' \
-d '{
"urls": ["https://arxiv.org/abs/2307.06435"],
"text": true
}'
- lang: python
label: Simple contents retrieval
source: |
# pip install exa-py
from exa_py import Exa
exa = Exa('YOUR_EXA_API_KEY')
results = exa.get_contents(
urls=["https://arxiv.org/abs/2307.06435"],
text=True
)
print(results)
- lang: javascript
label: Simple contents retrieval
source: |
// npm install exa-js
import Exa from 'exa-js';
const exa = new Exa('YOUR_EXA_API_KEY');
const results = await exa.getContents(
["https://arxiv.org/abs/2307.06435"],
{ text: true }
);
console.log(results);
- lang: php
label: Simple contents retrieval
source: ""
- lang: go
label: Simple contents retrieval
source: ""
- lang: java
label: Simple contents retrieval
source: ""
- lang: bash
label: Advanced contents retrieval
source: |
curl --request POST \
--url https://api.exa.ai/contents \
--header 'x-api-key: YOUR-EXA-API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"urls": ["https://arxiv.org/abs/2307.06435"],
"text": {
"maxCharacters": 1000,
"includeHtmlTags": false
},
"highlights": {
"numSentences": 3,
"highlightsPerUrl": 2,
"query": "Key findings"
},
"summary": {
"query": "Main research contributions"
},
"subpages": 1,
"subpageTarget": "references",
"extras": {
"links": 2,
"imageLinks": 1
}
}'
- lang: python
label: Advanced contents retrieval
source: |
# pip install exa-py
from exa_py import Exa
exa = Exa('YOUR_EXA_API_KEY')
results = exa.get_contents(
urls=["https://arxiv.org/abs/2307.06435"],
text={
"maxCharacters": 1000,
"includeHtmlTags": False
},
highlights={
"numSentences": 3,
"highlightsPerUrl": 2,
"query": "Key findings"
},
summary={
"query": "Main research contributions"
},
subpages=1,
subpage_target="references",
extras={
"links": 2,
"image_links": 1
}
)
print(results)
- lang: javascript
label: Advanced contents retrieval
source: |
// npm install exa-js
import Exa from 'exa-js';
const exa = new Exa('YOUR_EXA_API_KEY');
const results = await exa.getContents(
["https://arxiv.org/abs/2307.06435"],
{
text: {
maxCharacters: 1000,
includeHtmlTags: false
},
highlights: {
numSentences: 3,
highlightsPerUrl: 2,
query: "Key findings"
},
summary: {
query: "Main research contributions"
},
subpages: 1,
subpageTarget: "references",
extras: {
links: 2,
imageLinks: 1
}
}
);
console.log(results);
requestBody:
required: true
content:
application/json:
schema:
type: object
allOf:
- type: object
properties:
urls:
type: array
description: Array of URLs to crawl (backwards compatible with 'ids' parameter).
items:
type: string
example: ["https://arxiv.org/pdf/2307.06435"]
ids:
type: array
deprecated: true
description: Deprecated - use 'urls' instead. Array of document IDs obtained from searches.
items:
type: string
example: ["https://arxiv.org/pdf/2307.06435"]
required:
- urls
- $ref: "#/components/schemas/ContentsRequest"
responses:
"200":
$ref: "#/components/responses/ContentsResponse"
/answer:
post:
operationId: answer
summary: Generate an answer from search results
description: |
Performs a search based on the query and generates either a direct answer or a detailed summary with citations, depending on the query type.
x-codeSamples:
- lang: bash
label: Simple answer
source: |
curl -X POST 'https://api.exa.ai/answer' \
-H 'x-api-key: YOUR-EXA-API-KEY' \
-H 'Content-Type: application/json' \
-d '{
"query": "What is the latest valuation of SpaceX?",
"text": true
}'
- lang: python
label: Simple answer
source: |
# pip install exa-py
from exa_py import Exa
exa = Exa('YOUR_EXA_API_KEY')
result = exa.answer(
"What is the latest valuation of SpaceX?",
text=True
)
print(result)
- lang: javascript
label: Simple answer
source: |
// npm install exa-js
import Exa from 'exa-js';
const exa = new Exa('YOUR_EXA_API_KEY');
const result = await exa.answer(
'What is the latest valuation of SpaceX?',
{ text: true }
);
console.log(result);
- lang: php
label: Simple answer
source: ""
- lang: go
label: Simple answer
source: ""
- lang: java
label: Simple answer
source: ""
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- query
properties:
query:
type: string
description: The question or query to answer.
example: "What is the latest valuation of SpaceX?"
minLength: 1
stream:
type: boolean
default: false
description: If true, the response is returned as a server-sent events (SSS) stream.
text:
type: boolean
default: false
description: If true, the response includes full text content in the search results
outputSchema:
type: object
description: >-
A [JSON Schema Draft 7](https://json-schema.org/draft-07) specification
for the desired answer structure. When provided, the answer will be
returned as a structured object matching the schema instead of a plain string.
properties:
type:
type: string
description: The root schema type (typically "object").
example: "object"
properties:
type: object
description: >-
An object where each key is a property name and each value is
a JSON Schema describing that property (with `type`, `description`, etc).
required:
type: array
items:
type: string
description: List of required property names.
description:
type: string
description: A description of the schema.
additionalProperties:
type: boolean
description: Whether to allow properties not listed in `properties`.
default: false
responses:
"200":
$ref: "#/components/responses/AnswerResponse"
/research/v0/tasks:
post:
operationId: research-tasks-create
parameters: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
instructions:
type: string
maxLength: 4096
description: Instructions for what the research task should accomplish
model:
type: string
enum:
- exa-research
- exa-research-pro
default: exa-research
output:
type: object
properties:
schema:
description: >-
A JsonSchema specification of the desired output. See
https://json-schema.org/draft-07.
inferSchema:
type: boolean
description: When set to true and no output schema is provided, an LLM will generate an output schema.
required:
- instructions
example:
instructions: "What species of ant are similar to honeypot ants?"
model: "exa-research"
output:
schema:
type: "object"
properties:
answer:
type: "string"
responses:
"201":
$ref: "#/components/responses/ResearchCreateTaskResponse"
summary: Create a research task with instructions and an output schema
tags: &ref_0
- Research
get:
operationId: research-tasks-list
parameters:
- name: cursor
required: false
in: query
description: The cursor to paginate through the results
schema:
minLength: 1
type: string
- name: limit
required: false
in: query
description: The number of results to return
schema:
minimum: 1
maximum: 200
default: 25
type: number
responses:
"200":
$ref: "#/components/responses/ListResearchTasksResponse"
summary: List research tasks
tags: *ref_0
/research/v0/tasks/{id}:
get:
operationId: ResearchControllerV0_getResearchTask
parameters:
- name: id
required: true
in: path
schema:
type: string
responses:
"200":
$ref: "#/components/responses/ResearchTaskResponse"
summary: Get a research task by id
tags: *ref_0
components:
securitySchemes:
apikey:
type: apiKey
name: x-api-key
in: header
description: API key can be provided either via x-api-key header or Authorization header with Bearer scheme
bearer:
type: http
scheme: bearer
description: API key can be provided either via x-api-key header or Authorization header with Bearer scheme
schemas:
AnswerCitation:
type: object
properties:
id:
type: string
description: The temporary ID for the document.
example: "https://www.theguardian.com/science/2024/dec/11/spacex-valued-at-350bn-as-company-agrees-to-buy-shares-from-employees"
url:
type: string
format: uri
description: The URL of the search result.
example: "https://www.theguardian.com/science/2024/dec/11/spacex-valued-at-350bn-as-company-agrees-to-buy-shares-from-employees"
title:
type: string
description: The title of the search result.
example: "SpaceX valued at $350bn as company agrees to buy shares from ..."
author:
type:
- string
- "null"
description: If available, the author of the content.
example: "Dan Milmon"
publishedDate:
type:
- string
- "null"
description: An estimate of the creation date, from parsing HTML content. Format is YYYY-MM-DD.
example: "2023-11-16T01:36:32.547Z"
text:
type: string
description: The full text content of each source. Only present when includeText is enabled.
example: "SpaceX valued at $350bn as company agrees to buy shares from ..."
image:
type: string
format: uri
description: The URL of the image associated with the search result, if available.
example: "https://i.guim.co.uk/img/media/7cfee7e84b24b73c97a079c402642a333ad31e77/0_380_6176_3706/master/6176.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctZGVmYXVsdC5wbmc&enable=upscale&s=71ebb2fbf458c185229d02d380c01530"
favicon:
type: string
format: uri
description: The URL of the favicon for the search result's domain, if available.
example: "https://assets.guim.co.uk/static/frontend/icons/homescreen/apple-touch-icon.svg"
AnswerResult:
type: object
properties:
answer:
oneOf:
- type: string
- type: object
additionalProperties: {}
description: >-
The generated answer based on search results. Returns a string by
default, or a structured object matching the provided outputSchema.
example: "$350 billion."
citations:
type: array
description: Search results used to generate the answer.
items:
$ref: "#/components/schemas/AnswerCitation"
ContentsRequest:
type: object
properties:
text:
oneOf:
- type: boolean
title: "Simple text retrieval"
description: If true, returns full page text with default settings. If false, disables text return.
- type: object
title: "Advanced text options"
description: Advanced options for controlling text extraction. Use this when you need to limit text length or include HTML structure.
properties:
maxCharacters:
type: integer
description: Maximum character limit for the full page text. Useful for controlling response size and API costs.
example: 1000
includeHtmlTags:
type: boolean
default: false
description: Include HTML tags in the response, which can help LLMs understand text structure and formatting.
example: false
verbosity:
type: string
enum: ["compact", "standard", "full"]
default: "compact"
description: |
Controls the verbosity level of returned content. Requires livecrawl: "always" to take effect.
- compact: Most concise output, main content only (default)
- standard: Balanced content with more detail
- full: Complete content including all sections
example: "standard"
includeSections:
type: array
items:
type: string
enum:
[
"header",
"navigation",
"banner",
"body",
"sidebar",
"footer",
"metadata",
]
description: |
Only include content from these semantic page sections. Requires livecrawl: "always" to take effect.
example: ["body", "header"]
excludeSections:
type: array
items:
type: string
enum:
[
"header",
"navigation",
"banner",
"body",
"sidebar",
"footer",
"metadata",
]
description: |
Exclude content from these semantic page sections. Requires livecrawl: "always" to take effect.
example: ["navigation", "footer", "sidebar"]
highlights:
oneOf:
- type: boolean
title: "Simple highlights retrieval"
description: If true, returns highlights with default settings. If false, disables highlights.
- type: object
title: "Advanced highlights options"
description: Advanced options for controlling highlight extraction. Use this when you need to customize the number of sentences, highlights per URL, or provide a custom query.
properties:
maxCharacters:
type: integer
minimum: 1
description: Maximum number of characters to return for highlights. Controls the total length of highlight text returned per URL.
example: 2000
numSentences:
type: integer
minimum: 1
description: "Deprecated: use maxCharacters instead. The number of sentences to return for each snippet."
example: 1
deprecated: true
highlightsPerUrl:
type: integer
minimum: 1
description: "Deprecated: use maxCharacters instead. The number of snippets to return for each result."
deprecated: true
query:
type: string
description: Custom query to direct the LLM's selection of highlights.
example: "Key advancements"
description: Text snippets the LLM identifies as most relevant from each page.
summary:
type: object
description: Summary of the webpage
properties:
query:
type: string
description: Custom query for the LLM-generated summary.
example: "Main developments"
schema:
type: object
description: |
JSON schema for structured output from summary.
See https://json-schema.org/overview/what-is-jsonschema for JSON Schema documentation.
example:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Title",
"type": "object",
"properties":
{
"Property 1":
{ "type": "string", "description": "Description" },
"Property 2":
{
"type": "string",
"enum": ["option 1", "option 2", "option 3"],
"description": "Description",
},
},
"required": ["Property 1"],
}
livecrawl:
type: string
enum: [never, fallback, preferred, always]
deprecated: true
description: |
**Deprecated**: Use `maxAgeHours` instead for more precise control over content freshness.
Options for livecrawling pages.
'never': Disable livecrawling (default for neural search).
'fallback': Livecrawl when cache is empty.
'preferred': Always try to livecrawl, but fall back to cache if crawling fails.
'always': Always live-crawl, never use cache. Only use if you cannot tolerate any cached content. This option is not recommended unless consulted with the Exa team.
example: "preferred"
livecrawlTimeout:
type: integer
default: 10000
description: The timeout for livecrawling in milliseconds.
example: 1000
maxAgeHours:
type: integer
description: |
Maximum age of cached content in hours. Controls when livecrawling is triggered based on content freshness.
- Positive value (e.g. 24): Use cached content if it's less than this many hours old, otherwise livecrawl.
- 0: Always livecrawl, never use cache.
- -1: Never livecrawl, always use cache.
- Omit (default): Livecrawl as fallback only when no cached content exists.
example: 24
subpages:
type: integer
default: 0
description: The number of subpages to crawl. The actual number crawled may be limited by system constraints.
example: 1
subpageTarget:
oneOf:
- type: string
- type: array
items:
type: string
description: Keyword to find specific subpages of search results. Can be a single string or an array of strings, comma delimited.
example: "sources"
extras:
type: object
description: Extra parameters to pass.
properties:
links:
type: integer
default: 0
description: Number of URLs to return from each webpage.
example: 1
imageLinks:
type: integer
default: 0
description: Number of images to return for each result.
example: 1
context:
oneOf:
- type: boolean
deprecated: true
description: "Deprecated: Use highlights or text instead. Returns page contents as a combined context string."
example: true
- type: object
deprecated: true
description: "Deprecated: Use highlights or text instead. Returns page contents as a combined context string."
properties:
maxCharacters:
type: integer
description: "Deprecated. Maximum character limit for the context string."
example: 10000
CommonRequest:
type: object
properties:
numResults:
type: integer
maximum: 100
default: 10
minimum: 1
description: Number of results to return (up to thousands of results available for custom plans)
example: 10
includeDomains:
type: array
items:
type: string
description: List of domains to include in the search. If specified, results will only come from these domains.
example:
- arxiv.org
- paperswithcode.com
excludeDomains:
type: array
items:
type: string
description: List of domains to exclude from search results. If specified, no results will be returned from these domains.
startCrawlDate:
type: string
format: date-time
description: Crawl date refers to the date that Exa discovered a link. Results will include links that were crawled after this date. Must be specified in ISO 8601 format.
example: 2023-01-01
endCrawlDate:
type: string
format: date-time
description: Crawl date refers to the date that Exa discovered a link. Results will include links that were crawled before this date. Must be specified in ISO 8601 format.
example: 2023-12-31
startPublishedDate:
type: string
format: date-time
description: Only links with a published date after this will be returned. Must be specified in ISO 8601 format.
example: 2023-01-01
endPublishedDate:
type: string
format: date-time
description: Only links with a published date before this will be returned. Must be specified in ISO 8601 format.
example: 2023-12-31
includeText:
type: array
items:
type: string
description: List of strings that must be present in webpage text of results. Currently, only 1 string is supported, of up to 5 words.
example:
- large language model