frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

AI Web Search and Scraping

https://github.com/larryste1/web-search-tool
2•larryste•1h ago

Comments

larryste•1h ago
# Show HN: web-search-tool – Search/scrape web with AI-friendly output

*Project:* https://github.com/larryste1/web-search-tool *PyPI:* https://pypi.org/project/web-search-tool/

## The Problem

Building AI assistants needs: reliable search with fallback, clean content extraction, API flexibility, and structured JSON output. Existing solutions are single-backend (breaks when API fails), too complex, or output raw HTML.

## The Solution

`web-search-tool` searches/scrapes with clean, AI-friendly output:

```bash pip install web-search-tool web-search "Python async best practices" # Search with AI answer web-search "React hooks tutorial" --scrape # Full article content web-search "machine learning" --include-domain arxiv.org # Filter domain web-search "API design" --json # JSON output ```

## Features

- *3 Backends with Auto-Fallback*: Tavily → Serper → DuckDuckGo - *Content Scraping*: Extract main article text via BeautifulSoup - *Domain Filtering*: Include/exclude specific domains - *Search Depth*: Basic or advanced - *AI-Friendly Output*: Structured results with optional AI answers - *JSON Output*: Pipe to jq or parse in scripts

## How It Works

``` Query → Tavily (AI, needs key) → Serper (Google, needs key) → DuckDuckGo (free) ```

## Examples

```bash # AI Research with Answer $ web-search "What is Rust ownership?"

Search: What is Rust ownership? Backend: Tavily Answer: Rust ownership manages memory allocation. Each value has one owner...

# Scrape Full Articles $ web-search "Python decorators" --scrape --num 3

# Domain-Specific $ web-search "type hints" --include-domain realpython.com --include-domain docs.python.org

# Programmatic Use from web_search_tool import search_web result = search_web("Python best practices", scrape_urls=True) ```

## API Keys

| Backend | Key | Get Key | |---------|-----|---------| | Tavily | Optional | https://tavily.com/ | | Serper | Optional | https://serper.dev/ | | DuckDuckGo | None | Free |

```bash export TAVILY_API_KEY=your-key-here export SERPER_API_KEY=your-key-here ```

Without keys, falls back to DuckDuckGo automatically.

## Why I Built This

Building AI assistants, I hit: single point of failure, messy output, no fallback. This tool tries multiple backends, extracts clean text, returns structured JSON, works without API keys.

## Tech Stack

Requests, BeautifulSoup4, Tavily API, Serper API, DuckDuckGo HTML

## Try It

```bash pip install web-search-tool web-search "Python tutorials" # No API key needed ```

*GitHub:* https://github.com/larryste1/web-search-tool

*Feedback:* What backends should I add? How do you handle web search in AI projects?

--- Built after too many API failures with single-backend tools.

Show HN: Giggles – A batteries-included React framework for TUIs

https://github.com/zion-off/giggles
2•ajz317•1m ago•0 comments

Curl documentation bans the word 'very'

https://mastodon.social/@bagder/116161776616642292
1•keyboardJones•1m ago•0 comments

Building an Open-Source Verilog Simulator with AI: 580K Lines in 43 Days

https://normalcomputing.com/blog/building-an-open-source-verilog-simulator-with-ai-580k-lines-in-...
1•matt_d•2m ago•0 comments

Iran's Cryptic Shortwave Messages [video]

https://www.youtube.com/watch?v=ErmbTpxAM7Q
1•bane•3m ago•0 comments

Entry-level PC market to 'disappear' by 2028 – memory prices strain PC market

https://www.tomshardware.com/tech-industry/rising-memory-prices-pile-more-strain-on-consumer-pc-m...
3•ivewonyoung•5m ago•0 comments

How to Recover Your Stolen Crypto After a Scam–Guidance from Intelligence Wizard

1•Petersrobert•5m ago•0 comments

Show HN: Autonoma – Python secret fixer that refuses unsafe fixes

https://github.com/VihaanInnovations/autonoma
1•v_CodeSentinal•6m ago•0 comments

The Excommunicated Devs Making Games with AI

https://www.tyleo.com/blog/the-excommunicated-devs-making-games-with-ai
3•tyleo•11m ago•0 comments

Ask HN: What Online LLM / Chat do you use?

3•ddxv•14m ago•0 comments

CKAN – an open-source DMS (data management system)

https://ckan.org/
3•gjvc•19m ago•1 comments

My (Hypothetical) SRECon26 Keynote

https://charity.wtf/2026/03/03/my-hypothetical-srecon26-keynote-xpost/
2•donutshop•21m ago•0 comments

Prompt Vault – Save and organize your AI prompts ($9 Pro)

https://prompt-vault-sage.vercel.app
2•VyperandUltron•22m ago•0 comments

Show HN: An Auditable Decision Engine for AI Systems

https://maelstrom.ghostlogic.tech
2•adamscottthomas•24m ago•0 comments

How to Recover Your Stolen Crypto After a Scam–Guidance from Intelligence Wizard

2•Petersrobert•27m ago•0 comments

Do AI Agents Make Money in 2026? Or Is It Just Mac Minis and Vibes?

https://www.siliconsnark.com/do-ai-agents-actually-make-money-in-2026-or-is-it-just-mac-minis-and...
4•SaaSasaurus•27m ago•0 comments

Underground Salt Caverns Are Preserving Our History

https://eos.org/features/salt-of-the-earth-vast-underground-salt-caverns-are-preserving-our-histo...
2•sohkamyung•28m ago•0 comments

One-Stop Wan AI Video and Image Generator Platform

https://towan.net/
2•seagnson•29m ago•1 comments

Show HN: Ask Mob

https://mob.army/
2•cc-d•37m ago•0 comments

Show HN: A Kotlin Multiplatform app that works on watch, CLI, browser extension

https://arnav.tech/architecting-twofac-my-journey-into-kotlin-multiplatform-module-structure
2•championswimmer•37m ago•0 comments

NY bill would prohibit AI chatbots from giving legal advice

https://twitter.com/RobertFreundLaw/status/2028550955386704285
5•timr•39m ago•0 comments

Show HN: Generate random, valid US residential addresses for testing

https://meiguodz.com
3•roookiecookie•41m ago•0 comments

Unbound Video AI is the most unrestricted AI video tool I've tried in 2026

https://unbound.video
3•gabrieln•42m ago•1 comments

A timeline of cyber attacks:home users, contractors, and SMBs are now targets

3•EricAUS•44m ago•0 comments

Iran unleashes Shahed drones aimed at targets across Middle East

https://www.theguardian.com/world/2026/mar/02/iran-unleashes-hundreds-of-drones-aimed-at-targets-...
15•0in•46m ago•4 comments

Shutting down, open sourced private AI document server

https://github.com/queryhat/super-hat
4•chhetri978•47m ago•4 comments

Zuckerberg's internal emails rendered as Facebook Messenger

https://zuckmail.vercel.app/
32•not-chatgpt•49m ago•1 comments

Daily LNG freight rates jump over 40% amid Mideast strikes

https://www.reuters.com/business/energy/daily-lng-freight-rates-jump-over-40-amid-mideast-strikes...
6•geox•50m ago•0 comments

Solar Time vs. Standard Time heat map chart

https://blog.poormansmath.net/images/SolarTimeVsStandardTime.png
3•ivewonyoung•50m ago•0 comments

Show HN: One-click ComfyUI setup for RTX 50-series on Windows (cu130, no Docker)

https://github.com/hiroki-abe-58/ComfyUI-Win-Blackwell
2•GeneLab_999•52m ago•0 comments

Ask HN: Codex CLI error reveals "GPT-5.4-ab-arm2" string

2•quantisan•54m ago•1 comments