@@ -8,38 +8,39 @@ This package contains the LangChain integration with ScraperAPI
88pip install -U langchain-scraperapi
99```
1010
11- And you should configure credentials by setting the following environment variables:
11+ And you should configure credentials by setting the environment variable ` SCRAPERAPI_API_KEY ` .
1212
13- * TODO: fill this out
13+ ## Tools
1414
15- ## Chat Models
15+ ### ScraperAPITool
1616
17- ` ChatScraperAPI ` class exposes chat models from ScraperAPI.
17+ ` ScraperAPITool ` exposes the web scraping tool from ScraperAPI.
1818
1919``` python
20- from langchain_scraperapi import ChatScraperAPI
20+ from langchain_scraperapi import ScraperAPITool
2121
22- llm = ChatScraperAPI ()
23- llm .invoke(" Sing a ballad of LangChain. " )
22+ tool = ScraperAPITool ()
23+ tool .invoke(" url: http://example.com " , " output_format " : " markdown " )
2424```
2525
26- ## Embeddings
26+ ### ScraperAPIGoogleSearchTool
2727
28- ` ScraperAPIEmbeddings ` class exposes embeddings from ScraperAPI .
28+ ` ScraperAPIGoogleSearchTool ` allows the scraping of Google search results in ` json ` or ` csv ` format .
2929
3030``` python
31- from langchain_scraperapi import ScraperAPIEmbeddings
31+ from langchain_scraperapi import ScraperAPIGoogleSearchTool
3232
33- embeddings = ScraperAPIEmbeddings ()
34- embeddings.embed_query( " What is the meaning of life ?" )
33+ tool = ScraperAPITool ()
34+ tool.invoke( " query " : " What is ScraperAPI ?" )
3535```
3636
37- ## LLMs
38- ` ScraperAPILLM ` class exposes LLMs from ScraperAPI.
37+ ### ScraperAPIAmazonSearchTool
38+
39+ ` ScraperAPIAmazonSearchTool ` allows the scraping of Amazon search results in ` json ` or ` csv ` format.
3940
4041``` python
41- from langchain_scraperapi import ScraperAPILLM
42+ from langchain_scraperapi import ScraperAPIAmazonSearchTool
4243
43- llm = ScraperAPILLM ()
44- llm .invoke(" The meaning of life is " )
45- ```
44+ tool = ScraperAPITool ()
45+ tool .invoke(" query " : " office chairs " , " output_format " : " csv " )
46+ ```
0 commit comments