Agno ScrapeGraphTools enable an Agent to extract structured data from webpages for LLMs in markdown format.
scrapegraph-py
library.
SGAI_API_KEY
environment variable:
ScrapeGraphTools
to extract specific information from a webpage using the smartscraper
functionality.
Function | Description |
---|---|
smartscraper | Extracts structured data from a webpage using an LLM and a natural language prompt. Returns a JSON string of the result or an error. |
markdownify | Converts a webpage to markdown format. Returns the markdown string or an error. |
ScrapeGraphTools
constructor.
Parameter | Type | Default | Description |
---|---|---|---|
api_key | Optional[str] | None | API key for ScrapeGraph services. If not provided, it defaults to the SGAI_API_KEY environment variable. |
smartscraper | bool | True | Enable the smartscraper tool. |
markdownify | bool | False | Enable the markdownify tool. |