mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
Update index.ts
Some checks failed
STAGING Deploy Images to GHCR / push-app-image (push) Has been cancelled
Some checks failed
STAGING Deploy Images to GHCR / push-app-image (push) Has been cancelled
This commit is contained in:
parent
ec0542e942
commit
b9e732bdd5
|
@ -31,16 +31,6 @@ export async function search({
|
|||
timeout?: number;
|
||||
}): Promise<SearchResult[]> {
|
||||
try {
|
||||
if (process.env.SEARCHAPI_API_KEY) {
|
||||
return await searchapi_search(query, {
|
||||
num_results,
|
||||
tbs,
|
||||
filter,
|
||||
lang,
|
||||
country,
|
||||
location
|
||||
});
|
||||
}
|
||||
if (process.env.SERPER_API_KEY) {
|
||||
return await serper_search(query, {
|
||||
num_results,
|
||||
|
@ -51,6 +41,16 @@ export async function search({
|
|||
location,
|
||||
});
|
||||
}
|
||||
if (process.env.SEARCHAPI_API_KEY) {
|
||||
return await searchapi_search(query, {
|
||||
num_results,
|
||||
tbs,
|
||||
filter,
|
||||
lang,
|
||||
country,
|
||||
location
|
||||
});
|
||||
}
|
||||
return await googleSearch(
|
||||
query,
|
||||
advanced,
|
||||
|
|
Loading…
Reference in New Issue
Block a user