from firecrawl import Firecrawl
from pydantic import BaseModel, Field
# Initialize the Firecrawl with your API key
app = Firecrawl(api_key='xxx')
# Define your extraction schema
class ExtractSchema(BaseModel):
lawyers: list = Field(description="The lawyers")
# Perform the extraction
data = app.extract(
urls=['www.floridabar.org/directories/find-mbr/?locType=T&locValue=miami-dade&sdx=N&eligible=Y&deceased=N&pageSize=10&pageNumber=1'],
prompt='Ensure that the first name, last name, city, state, and email are included as required fields. Wait for 5 seconds before starting the extraction.',
schema=ExtractSchema.model_json_schema()
)
print(data)
from firecrawl import Firecrawl
from pydantic import BaseModel, Field
# Initialize the Firecrawl with your API key
app = Firecrawl(api_key='xxx')
# Define your extraction schema
class ExtractSchema(BaseModel):
lawyers: list = Field(description="The lawyers")
# Perform the extraction
data = app.extract(
urls=['www.floridabar.org/directories/find-mbr/?locType=T&locValue=miami-dade&sdx=N&eligible=Y&deceased=N&pageSize=10&pageNumber=1'],
prompt='Ensure that the first name, last name, city, state, and email are included as required fields. Wait for 5 seconds before starting the extraction.',
schema=ExtractSchema.model_json_schema()
)
print(data)