Results will only include links crawled after this date.
undefined
endCrawlDate
string
Results will only include links crawled before this date.
undefined
startPublishedDate
string
Results will only include links with a published date after this date.
undefined
endPublishedDate
string
Results will only include links with a published date before this date.
undefined
useAutoprompt
boolean
If true, convert query to a query best suited for Exa.
false
type
string
The type of search, “keyword” or “neural”.
“auto”
category
string
A data category to focus on when searching, with higher comprehensivity and data cleanliness. Available categories: “company”, “research paper”, “news”, “github”, “tweet”, “movie”, “song”, “personal site”, “pdf”.
Perform an Exa search given an input query and retrieve a list of relevant results as links, optionally including the full text and/or highlights of the content.
If provided, includes the full text of the content in the results.
undefined
highlights
`boolean
{ query?: string, numSentences?: number, highlightsPerUrl?: number }`
If provided, includes highlights of the content in the results.
undefined
numResults
number
Number of search results to return.
10
includeDomains
string[]
List of domains to include in the search.
undefined
excludeDomains
string[]
List of domains to exclude in the search.
undefined
startCrawlDate
string
Results will only include links crawled after this date.
undefined
endCrawlDate
string
Results will only include links crawled before this date.
undefined
startPublishedDate
string
Results will only include links with a published date after this date.
undefined
endPublishedDate
string
Results will only include links with a published date before this date.
undefined
useAutoprompt
boolean
If true, convert query to a query best suited for Exa.
false
type
string
The type of search, “keyword” or “neural”.
“auto”
category
string
A data category to focus on when searching, with higher comprehensivity and data cleanliness. Available categories: “company”, “research paper”, “news”, “github”, “tweet”, “movie”, “song”, “personal site”, “pdf”.
{ "results": [ { "score": 0.20826785266399384, "title": "2023 AI Trends in Health Care", "id": "https://aibusiness.com/verticals/2023-ai-trends-in-health-care-", "url": "https://aibusiness.com/verticals/2023-ai-trends-in-health-care-", "publishedDate": "2022-12-29", "author": "Wylie Wong", "text": "While the health care industry was initially slow to [... TRUNCATED FOR BREVITY ...]", "highlights": [ "But to do so, many health care institutions would like to share data, so they can build a more comprehensive dataset to use to train an AI model. Traditionally, they would have to move the data to one central repository. However, with federated or swarm learning, the data does not have to move. Instead, the AI model goes to each individual health care facility and trains on the data, he said. This way, health care providers can maintain security and governance over their data." ], "highlightScores": [ 0.5566554069519043 ] }, { "score": 0.20796334743499756, "title": "AI in healthcare: Innovative use cases and applications", "id": "https://www.leewayhertz.com/ai-use-cases-in-healthcare", "url": "https://www.leewayhertz.com/ai-use-cases-in-healthcare", "publishedDate": "2023-02-13", "author": "Akash Takyar", "text": "The integration of AI in healthcare is not [... TRUNCATED FOR BREVITY ...]", "highlights": [ "The ability of AI to analyze large amounts of medical data and identify patterns has led to more accurate and timely diagnoses. This has been especially helpful in identifying complex medical conditions, which may be difficult to detect using traditional methods. Here are some examples of successful implementation of AI in healthcare. IBM Watson Health: IBM Watson Health is an AI-powered system used in healthcare to improve patient care and outcomes. The system uses natural language processing and machine learning to analyze large amounts of data and provide personalized treatment plans for patients." ], "highlightScores": [ 0.6563674807548523 ] } ]}
// Find similar with full text contentconst similarWithText = await exa.findSimilarAndContents( "https://www.example.com/article", { text: true, numResults: 2 });// Find similar with highlightsconst similarWithHighlights = await exa.findSimilarAndContents( "https://www.example.com/article", { highlights: true, numResults: 2 });// Find similar with both text and highlightsconst similarWithTextAndHighlights = await exa.findSimilarAndContents( "https://www.example.com/article", { text: true, highlights: true, numResults: 2, excludeSourceDomain: true });
{ "results": [ { "score": 0.8777582049369812, "title": "Similar Article: AI and Machine Learning", "id": "https://www.similarsite.com/ai-ml-article", "url": "https://www.similarsite.com/ai-ml-article", "publishedDate": "2023-05-15", "author": "Jane Doe", "text": "Artificial Intelligence (AI) and Machine Learning (ML) are revolutionizing various industries. [... TRUNCATED FOR BREVITY ...]", "highlights": [ "AI and ML are transforming how businesses operate, enabling more efficient processes and data-driven decision making.", "The future of AI looks promising, with potential applications in healthcare, finance, and autonomous vehicles." ], "highlightScores": [ 0.95, 0.89 ] }, { "score": 0.87653648853302, "title": "The Impact of AI on Modern Technology", "id": "https://www.techblog.com/ai-impact", "url": "https://www.techblog.com/ai-impact", "publishedDate": "2023-06-01", "author": "John Smith", "text": "In recent years, artificial intelligence has made significant strides in various technological domains. [... TRUNCATED FOR BREVITY ...]", "highlights": [ "AI is not just a buzzword; it's a transformative technology that's reshaping industries and creating new opportunities.", "As AI continues to evolve, ethical considerations and responsible development become increasingly important." ], "highlightScores": [ 0.92, 0.88 ] } ]}
{ "results": [ { "id": "https://www.example.com/article1", "url": "https://www.example.com/article1", "title": "The Future of Artificial Intelligence", "publishedDate": "2023-06-15", "author": "Jane Doe", "text": "Artificial Intelligence (AI) has made significant strides in recent years. [... TRUNCATED FOR BREVITY ...]", "highlights": [ "AI is revolutionizing industries from healthcare to finance, enabling more efficient processes and data-driven decision making.", "As AI continues to evolve, ethical considerations and responsible development become increasingly important." ], "highlightScores": [ 0.95, 0.92 ] }, { "id": "https://www.example.com/article2", "url": "https://www.example.com/article2", "title": "Machine Learning Applications in Business", "publishedDate": "2023-06-20", "author": "John Smith", "text": "Machine Learning (ML) is transforming how businesses operate and make decisions. [... TRUNCATED FOR BREVITY ...]", "highlights": [ "Machine Learning algorithms can analyze vast amounts of data to identify patterns and make predictions.", "Businesses are leveraging ML for customer segmentation, demand forecasting, and fraud detection." ], "highlightScores": [ 0.93, 0.90 ] } ]}
The fields in the SearchResult<T> object depend on the options provided in the getContents call:
Field
Type
Description
id
string
Temporary ID for the document
url
string
URL of the search result
title
`string
null`
Title of the search result
publishedDate?
string
Estimated creation date
author?
string
Author of the content, if available
text?
string
Text of the search result page (if requested)
highlights?
string[]
Highlights of the search result (if requested)
highlightScores?
number[]
Scores of the highlights (if requested)
Note: The actual fields present in the SearchResult<T> object depend on the options provided in the getContents call. If neither text nor highlights is specified, the method defaults to including the full text content.