mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 03:35:56 +08:00
feat(api/search): add search endpoint and update request limits
- Introduced a new POST endpoint for searching with a query and limit - Updated the maximum limit for search results from 20 to 50 in the request schema - Adjusted the default number of results in the Google search function from 7 to 5
This commit is contained in:
parent
9fd735f3a1
commit
da2f17c757
@ -120,3 +120,14 @@ content-type: application/json
|
|||||||
GET {{baseUrl}}/v1/llmstxt/{{generateLlmsTxtId}} HTTP/1.1
|
GET {{baseUrl}}/v1/llmstxt/{{generateLlmsTxtId}} HTTP/1.1
|
||||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||||
|
|
||||||
|
|
||||||
|
### Search
|
||||||
|
# @name search
|
||||||
|
POST {{baseUrl}}/v1/search HTTP/1.1
|
||||||
|
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||||
|
content-type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"query": "firecrawl",
|
||||||
|
"limit": 50
|
||||||
|
}
|
||||||
|
@ -969,7 +969,7 @@ export const searchRequestSchema = z
|
|||||||
.positive()
|
.positive()
|
||||||
.finite()
|
.finite()
|
||||||
.safe()
|
.safe()
|
||||||
.max(20)
|
.max(50)
|
||||||
.optional()
|
.optional()
|
||||||
.default(5),
|
.default(5),
|
||||||
tbs: z.string().optional(),
|
tbs: z.string().optional(),
|
||||||
|
@ -70,7 +70,7 @@ async function _req(
|
|||||||
export async function googleSearch(
|
export async function googleSearch(
|
||||||
term: string,
|
term: string,
|
||||||
advanced = false,
|
advanced = false,
|
||||||
num_results = 7,
|
num_results = 5,
|
||||||
tbs = undefined as string | undefined,
|
tbs = undefined as string | undefined,
|
||||||
filter = undefined as string | undefined,
|
filter = undefined as string | undefined,
|
||||||
lang = "en",
|
lang = "en",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user