fix: serper search

This commit is contained in:
yanlong.wang
2025-02-20 14:23:07 +08:00
parent 36921f444c
commit 40ee042e56

View File

@@ -5,10 +5,9 @@ import { SerperSearchResponse } from '../types';
export async function serperSearch(query: string): Promise<{ response: SerperSearchResponse }> {
const response = await axios.post<SerperSearchResponse>('https://google.serper.dev/search', {
data: JSON.stringify({
q: query,
autocorrect: false,
}),
q: query,
autocorrect: false,
}, {
headers: {
'X-API-KEY': SERPER_API_KEY,
'Content-Type': 'application/json'