A local, keyless drop-in alternative for AI search engines.
Project description
websearch-lib
A performant, keyless, and local drop-in alternative to commercial AI search tools. Built specifically for AI Agent loops, and background RAG scrapers.
Features
- 🎯 AI-Optimized JSON Schema: Returns cleaned, structured markdown matching standard LLM search expectations.
- 🚀 Dual-Path Extraction Architecture: Uses ultra-fast C-accelerated
trafilatura[all]for raw speed, falling back to an evasion-hardenedplaywright-stealthengine for heavy JavaScript walls. - 🛡️ Built-in Content Cleaning: Automatically scrubs out cookie banners, privacy policy walls, login portals, and legal spam.
- ⚙️ Zero Configuration Setup: No API keys, no monthly fees, and handles its own automated browser binary downloads on first run.
Installation
Install the package via pip:
pip install websearch-lib==0.1.0b1
Install Chromium using playwright
playwright install chromium
Quick Start
The library exposes a highly natural, asynchronous .query() method perfect for AI framework integrations.
import asyncio
import websearch
async def main():
# Execute a web query
data = await websearch.query("Latest open-source LLM benchmarks 2026", max_results=3)
print(f"Query: {data['query']}")
print(f"Fetch Time: {data['response_time']}s\n")
for result in data['results']:
print(f"Title: {result['title']}")
print(f"URL: {result['url']}")
print(f"Content Summary:\n{result['content']}\n" + "-"*40)
if __name__ == "__main__":
asyncio.run(main())
License
MIT License
Copyright (c) 2026 solnsumei
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file websearch_lib-0.1.0b2.tar.gz.
File metadata
- Download URL: websearch_lib-0.1.0b2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
318819ebb09c4e55bd741e87b400b3d39d14f871ca76948dfec6076885468f56
|
|
| MD5 |
0d891fe23b1e1123d8ac0a3cec481fa9
|
|
| BLAKE2b-256 |
6432451564b514d8ef7544a63280016722f41dfccb59e13f477ea0acf8d12449
|
Provenance
The following attestation bundles were made for websearch_lib-0.1.0b2.tar.gz:
Publisher:
publish.yml on solnsumei/websearch-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
websearch_lib-0.1.0b2.tar.gz -
Subject digest:
318819ebb09c4e55bd741e87b400b3d39d14f871ca76948dfec6076885468f56 - Sigstore transparency entry: 2120123813
- Sigstore integration time:
-
Permalink:
solnsumei/websearch-lib@a77ce5434da0bb1d4a1f1088f7a67564a0b8cb8f -
Branch / Tag:
refs/tags/v0.1.0b2 - Owner: https://github.com/solnsumei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a77ce5434da0bb1d4a1f1088f7a67564a0b8cb8f -
Trigger Event:
release
-
Statement type:
File details
Details for the file websearch_lib-0.1.0b2-py3-none-any.whl.
File metadata
- Download URL: websearch_lib-0.1.0b2-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad826a90a75ea143384d4f7295267c756d969872c31ca3161d2da65f9b65e9e8
|
|
| MD5 |
17a574dfa617f5599c0adc58ed163d4e
|
|
| BLAKE2b-256 |
4455f5ce830c6ca52317ac8cd02f40cee37feef5a17d849ebefe8dd70aa580ef
|
Provenance
The following attestation bundles were made for websearch_lib-0.1.0b2-py3-none-any.whl:
Publisher:
publish.yml on solnsumei/websearch-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
websearch_lib-0.1.0b2-py3-none-any.whl -
Subject digest:
ad826a90a75ea143384d4f7295267c756d969872c31ca3161d2da65f9b65e9e8 - Sigstore transparency entry: 2120123896
- Sigstore integration time:
-
Permalink:
solnsumei/websearch-lib@a77ce5434da0bb1d4a1f1088f7a67564a0b8cb8f -
Branch / Tag:
refs/tags/v0.1.0b2 - Owner: https://github.com/solnsumei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a77ce5434da0bb1d4a1f1088f7a67564a0b8cb8f -
Trigger Event:
release
-
Statement type: