How karust/openserp works
OpenSERP is a SERP API and CLI that returns structured results from six search engines, with multi-engine search, image search, and optional page extraction. The main path is a CLI or HTTP request through command/API handling to engine-specific search, then normalized results; extraction can fetch clean page content, while megasearch merges and deduplicates results. The tree and excerpts also show shared browser and HTTP-client infrastructure. Some server and runtime wiring is unsampled, so uncertain links are omitted or marked unverified.
Main entry points: server.go Megasearch · browser.go Browser runtime · extractor.go Page extraction · http_client.go HTTP clients
Components 21
Interfaces
- Process entry
main.go - CLI search
cmd/search.go - Command setup
cmd/root.go - HTTP API
core/server.go
Search orchestration
- Megasearch
core/server.go - Result clusters
core/clusters.go - Extraction API
core/server.go - Page extraction
extract/extractor.go - Clean content
extract/content.go
Engine adapters
- Google search
google/search.go - Yandex search
yandex/search.go - Baidu search
baidu/search.go - Bing search
bing/search.go - DuckDuckGo search
duckduckgo/search.go - Ecosia search
ecosia/search.go
Runtime services
- Browser runtime
core/browser.go - HTTP clients
core/http_client.go - Response cache
core/cache.go - Proxy handling
core/proxy.go - Resilient requests
core/resilient.go
Other components
- CLI/API user
Connections 26
- CLI/API user → CLI search: runs search
README.md - CLI/API user → HTTP API: sends request
README.md - Process entry → Command setup: executes
main.go - CLI/API user → Process entry: starts process
- CLI search → Page extraction: optionally extracts
cmd/search.go - HTTP API → Megasearch: routes search
core/server.go - HTTP API → Extraction API: routes extraction
core/server.go - Megasearch → Result clusters: forms clusters
README.md - Megasearch → Google search: queries engine
README.md - Megasearch → Yandex search: queries engine
README.md - Megasearch → Baidu search: queries engine
README.md - Megasearch → Bing search: queries engine
README.md - Megasearch → DuckDuckGo search: queries engine
README.md - Megasearch → Ecosia search: queries engine
README.md - Google search → Browser runtime: navigates pages
google/search.go - Yandex search → Browser runtime: navigates pages
yandex/search.go - Baidu search → Browser runtime: navigates pages
baidu/search.go - Bing search → Browser runtime: navigates pages
bing/search.go - DuckDuckGo search → Browser runtime: navigates pages
duckduckgo/search.go - Ecosia search → Browser runtime: navigates pages
ecosia/search.go - HTTP clients → Browser runtime: uses profile
core/http_client.go - Extraction API → Page extraction: fetches content
- Page extraction → Clean content: cleans pages
- HTTP API → Response cache: checks responses
- Browser runtime → Proxy handling: uses proxy
- HTTP clients → Resilient requests: uses retries