Skip to content

Commit d02a8bc

Browse files
committed
Nick: extract urls to extract
1 parent 2fb8a3c commit d02a8bc

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

apps/js-sdk/example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const main = async () => {
5050
links: z.array(z.string())
5151
});
5252

53-
const extractResult = await app.extractUrls(['https://firecrawl.dev'], {
53+
const extractResult = await app.extract(['https://firecrawl.dev'], {
5454
prompt: "Extract the title, description, and links from the website",
5555
schema: extractSchema
5656
});

apps/js-sdk/firecrawl/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,12 +699,12 @@ export default class FirecrawlApp {
699699
}
700700

701701
/**
702-
* Extracts information from a URL using the Firecrawl API.
702+
* Extracts information from URLs using the Firecrawl API.
703703
* @param url - The URL to extract information from.
704704
* @param params - Additional parameters for the extract request.
705705
* @returns The response from the extract operation.
706706
*/
707-
async extractUrls(urls: string[], params?: ExtractParams): Promise<ExtractResponse | ErrorResponse> {
707+
async extract(urls: string[], params?: ExtractParams): Promise<ExtractResponse | ErrorResponse> {
708708
const headers = this.prepareHeaders();
709709

710710
if (!params?.prompt) {

apps/python-sdk/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class ExtractSchema(BaseModel):
124124
extract_schema = ExtractSchema.schema()
125125

126126
# Perform the extraction
127-
extract_result = app.extract_urls(['https://firecrawl.dev'], {
127+
extract_result = app.extract(['https://firecrawl.dev'], {
128128
'prompt': "Extract the title, description, and links from the website",
129129
'schema': extract_schema
130130
})

apps/python-sdk/firecrawl/firecrawl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def check_batch_scrape_status(self, id: str) -> Any:
460460
self._handle_error(response, 'check batch scrape status')
461461

462462

463-
def extract_urls(self, urls: List[str], params: Optional[ExtractParams] = None) -> Union[ExtractResponse, ErrorResponse]:
463+
def extract(self, urls: List[str], params: Optional[ExtractParams] = None) -> Union[ExtractResponse, ErrorResponse]:
464464
"""
465465
Extracts information from a URL using the Firecrawl API.
466466

0 commit comments

Comments
 (0)