https://github.com/transitive-bullshit/tavily
SDK for the Tavily search API which is tailored for LLM agents.
https://github.com/transitive-bullshit/tavily
llms search web-search
Last synced: about 2 months ago
JSON representation
SDK for the Tavily search API which is tailored for LLM agents.
- Host: GitHub
- URL: https://github.com/transitive-bullshit/tavily
- Owner: transitive-bullshit
- License: mit
- Created: 2024-06-06T06:32:32.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-06T07:29:44.000Z (about 1 year ago)
- Last Synced: 2025-04-21T04:42:49.918Z (about 2 months ago)
- Topics: llms, search, web-search
- Language: TypeScript
- Homepage: https://tavily.com
- Size: 83 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license
Awesome Lists containing this project
README
# Tavily
> [Tavily](https://tavily.com) is a search API tailored for LLM Agents.
## Install
```sh
npm install tavily
```This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) and requires `Node.js >= 18` or an equivalent environment (bun, deno, CF workers, etc).
## Usage
Sign up for a [Tavily API key](https://docs.tavily.com).
```ts
import { TavilyClient } from 'tavily'const tavily = new TavilyClient() // api key defaults to "TAVILY_API_KEY" env var
const result0 = await tavily.search('what is AGI?')
console.log(result0)const result1 = await tavily.search({
query: 'when can we expect to have AGI?',
search_depth: 'advanced',
include_answer: true,
include_images: true,
max_results: 10
})
console.log(result1)
```See the [Tavily docs](https://docs.tavily.com/docs/tavily-api/introduction) for more info.
## License
MIT © [Travis Fischer](https://twitter.com/transitive_bs)
To stay up to date or learn more, follow [@transitive_bs](https://twitter.com/transitive_bs) on Twitter.