Skip to main content

LangChain Search1API Tools

This package provides LangChain tools for the Search1API service, allowing easy integration of web search, news search, and web crawling capabilities into your LangChain applications.

Disclaimer: The author of this package is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Search1API, or any of its subsidiaries or its affiliates. The official Search1API website can be found at https://www.search1api.com/.

Installation

You can install the package using pip:

pip install langchain_search1api

Usage

Here's an example of how to use the tools in a LangChain application:

from langchain_search1api import SearchTool, NewsTool, CrawlTool
from langchain.agents import initialize_agent, AgentType
from langchain.llms import OpenAI

# Initialize the tools
api_key = "your_api_key_here"
search_tool = SearchTool(api_key=api_key)
news_tool = NewsTool(api_key=api_key)
crawl_tool = CrawlTool(api_key=api_key)

# Initialize the language model
llm = OpenAI(temperature=0)

# Create the agent
agent = initialize_agent(
    tools=[search_tool, news_tool, crawl_tool],
    llm=llm,
    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True
)

# Use the agent
result = agent.run("Search for recent news about artificial intelligence and summarize the top 3 results.")
print(result)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for langchain-search1api 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-search1api 0.1.0
File Size Uploaded Provenance Actions
langchain_search1api-0.1.0.tar.gz 4.9 kB Without provenance Details for langchain_search1api-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-search1api 0.1.0
File Interpreter ABI Platform Actions
langchain_search1api-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_search1api-0.1.0-py3-none-any.whl

Total release size: 9.7 kB

Release files / langchain_search1api-0.1.0.tar.gz

Download URL langchain_search1api-0.1.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a9402aff97bdf0b9cba298e2a6a5d227be371a3d1fdcc6b5467dcf8f7cfa49a2
BLAKE2b-256 checksum
How to use checksums
5471cf8d39a199279c5ce58c9e195396bb9b90f95fdc870e4e7ee222f1894431
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / langchain_search1api-0.1.0-py3-none-any.whl

Download URL langchain_search1api-0.1.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d466a1e178aca0176e4763f52ec486df2c4a381016ea1178ab09cfe7f6da39dc
BLAKE2b-256 checksum
How to use checksums
9c112bcfd0c0d2af778868e07c93684eaca56edfb84bd884a5a5845f3cb10889
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Security for langchain-search1api 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page