JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9482
  • Score
    100M100P100Q149893F
  • License MIT

TS SDK for the Tavily search API which is tailored for LLM agents.

Package Exports

  • tavily

Readme

NPM Build Status MIT License Prettier Code Formatting

Tavily

Tavily is a search API tailored for LLM Agents.

Install

npm install tavily

This package is ESM only and requires Node.js >= 18 or an equivalent environment (bun, deno, CF workers, etc).

Usage

Sign up for a Tavily API key.

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 for more info.

License

MIT © Travis Fischer

To stay up to date or learn more, follow @transitive_bs on Twitter.