TaCertoIssoAI is a non-profit project dedicated to combating misinformation and educating Brazilians against fake news. Its use of search libraries (Playwright/Camoufox for browser-based search and ddgs for lightweight HTTP-based search) is grounded in this mission — enabling automated verification of claims and retrieval of trustworthy sources to help users distinguish reliable information from disinformation.
- Python 3.11+
- Playwright browsers installed
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
python -m playwright installweb-search-serverOr, directly with Python:
python -m web_search_service.serverddgs-cliStarts the server in the background and opens a REPL that sends queries to /ddgs/search.
Build the image:
docker build -t web-search-service .Run the container:
docker run --rm -p 6050:6050 web-search-serviceVerify:
curl http://127.0.0.1:6050/healthcurl http://127.0.0.1:6050/healthExpected response (shape):
{"status":"ok","pool_size":5,"pool_available":4,"pool_in_use":1}Browser-based search:
curl "http://127.0.0.1:6050/search?query=python"Lightweight ddgs search (no browser):
curl "http://127.0.0.1:6050/ddgs/search?query=python"Optional parameters:
domains(repeatable):?domains=example.com&domains=foo.comn_results:?n_results=5
Base URL: http://127.0.0.1:6050
Endpoints:
GET /health- Response: JSON with pool stats.
- Example:
{"status":"ok","pool_size":5,"pool_available":4,"pool_in_use":1}
GET /search- Browser-based DuckDuckGo search via Playwright + Camoufox.
- Query params:
query(string, required)domains(string, repeatable)n_results(int, 1..50)
- Response (shape):
{ "query": "python", "effective_query": "python", "results": [ { "position": 1, "title": "Example Title", "url": "https://example.com", "snippet": "Example snippet", "displayed_url": "example.com", "date": "2 hours ago" } ], "total_results": 1 }
GET /ddgs/search- Lightweight DuckDuckGo search via the
ddgslibrary (no browser required). Same query params and response shape as/search.
- Lightweight DuckDuckGo search via the
- The
/searchendpoint opens a browser via Playwright/Camoufox. If DuckDuckGo presents a CAPTCHA, the request will return429. - The
/ddgs/searchendpoint uses pure HTTP requests — no browser overhead, no CAPTCHA issues. - This project is intended for non-commercial, educational, and public-interest use only.