Searchly
Searchly gives AI agents (and anyone else) one async interface to many web and news search APIs. Every provider returns the same pydantic result models, so switching from Serper to Tavily or Brave is a one-line change.
Installation
pip install searchly
# optional SDK-based providers
pip install "searchly[exa]" # Exa
pip install "searchly[brave_search_python_client]" # Brave
pip install "searchly[all]"
Requires Python 3.13+.
Quickstart
import asyncio
from searchly import AsyncSerperClient
async def main() -> None:
client = AsyncSerperClient() # reads SERPER_API_KEY, or pass api_key="..."
response = await client.web_search("python asyncio tutorial", max_results=5, country="US")
for result in response.results:
print(result.title, result.url)
news = await client.news_search("open source AI", max_results=3)
for item in news.results:
print(item.published, item.source, item.title)
asyncio.run(main())
Configuration-driven providers
searchly_config holds lightweight pydantic configs (a discriminated union on type) that
create providers lazily, which makes search backends easy to put into YAML/JSON settings:
from pydantic import TypeAdapter
from searchly import WebSearchProviderConfig
config = TypeAdapter(WebSearchProviderConfig).validate_python({"type": "tavily"})
if config.is_configured(): # api_key field or TAVILY_API_KEY env var
provider = config.get_provider()
Providers
| Provider | Client | Web | News | API key env var |
|---|---|---|---|---|
| Brave | AsyncBraveSearch |
yes | yes | BRAVE_API_KEY |
| DataForSEO | AsyncDataForSEOClient |
yes | yes | DATAFORSEO_LOGIN, DATAFORSEO_PASSWORD |
| Exa | AsyncExaClient |
yes | EXA_API_KEY |
|
| JigsawStack | AsyncJigsawStackClient |
yes | JIGSAWSTACK_API_KEY |
|
| Kagi | AsyncKagiClient |
yes | KAGI_API_KEY |
|
| LinkUp | AsyncLinkUpClient |
yes | LINKUP_API_KEY |
|
| Search1API | AsyncSearch1API |
yes | SEARCH1API_KEY |
|
| SerpAPI | AsyncSerpAPIClient |
yes | yes | SERPAPI_KEY |
| Serper | AsyncSerperClient |
yes | yes | SERPER_API_KEY |
| Tavily | AsyncTavilyClient |
yes | yes | TAVILY_API_KEY |
| You.com | AsyncYouClient |
yes | yes | YOU_API_KEY |
Features
- Common protocols:
WebSearchProvider.web_search()andNewsSearchProvider.news_search()with sharedquery,max_results,countryandlanguagearguments; provider-specific options are extra keyword arguments. - Unified results:
WebSearchResponse/NewsSearchResponsewithWebSearchResult(title,url,snippet) andNewsSearchResult(addssource,published). - Typed:
CountryCodeandLanguageCodeliterals, full type hints,py.typed. - Config models:
WebSearchProviderConfig,NewsSearchProviderConfig,get_config_class()for building providers from settings, with secrets stored asSecretStr.
Metadata
Release files for searchly 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| searchly-2.2.0.tar.gz | 21.8 kB | With provenance | Details for searchly-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| searchly-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for searchly-2.2.0-py3-none-any.whl |
Total release size: 55.9 kB
Release files / searchly-2.2.0.tar.gz
| Download URL | searchly-2.2.0.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe4819753ff36e6ae647716687dea9a59c7d7884fe0711d8e58d0b0be8a94e31
|
|
BLAKE2b-256 checksum How to use checksums |
4892f3869f2ebdb66aa255c22553624eff86cc11c352e86910cfc0eab0fee881
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / searchly-2.2.0-py3-none-any.whl
| Download URL | searchly-2.2.0-py3-none-any.whl |
|---|---|
| Size | 34.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ddd68bebe84b9fc9428ea2f35427ada713c4b8da9907277b9df3c7a8c5aa68ee
|
|
BLAKE2b-256 checksum How to use checksums |
5c72c005ec41c654ec4edf2d88c8090655ca746b2780ff421e54b0bb1c7f6339
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for searchly 2.2.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for searchly-2.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA 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.