Files
reason-flow/test.js
T
2025-11-06 11:08:59 +01:00

16 lines
380 B
JavaScript

import axios from "axios";
import 'dotenv/config';
const API_KEY = process.env.TAVILY_API_KEY;
async function webSearch(query) {
const response = await axios.post("https://api.tavily.com/search",
{ query },
{ headers: { Authorization: `Bearer ${API_KEY}` } }
);
console.log(response.data.results);
}
webSearch("who is the current president of united states");