2026-03-17 01:54:25 +03:00
# OpenSERP (Search Engine Results)
2025-04-09 02:11:22 +08:00
2025-10-01 04:34:41 +03:00

2023-06-23 04:08:00 +03:00
2023-06-24 22:25:43 +03:00
[](https://goreportcard.com/report/github.com/karust/openserp)
2025-10-08 03:33:48 +03:00
[](https://pkg.go.dev/github.com/karust/openserp)
[](https://github.com/karust/openserp/releases)
2026-04-14 02:05:58 +03:00
[](https://github.com/karust/openserp/actions/workflows/ci.yml)
2025-10-08 03:33:48 +03:00
2026-04-04 18:54:10 +03:00
<!-- [](https://hub.docker.com/repository/docker/karust/openserp) -->
2025-04-09 02:11:22 +08:00
2026-04-07 22:44:20 +03:00
**OpenSERP** is an API and CLI for accessing search engine results from **Google, Yandex, Baidu, Bing, and DuckDuckGo ** .
A developer-friendly alternative to paid SERP API services!
2025-04-09 02:11:22 +08:00
2026-04-07 22:44:20 +03:00
**Official website:** [openserp.org ](https://openserp.org )
> 💡 OpenSerp is free and open-source. Only links listed in this repository and on the official website are associated with the project.
2026-04-07 18:34:12 +03:00
2025-10-01 04:34:41 +03:00
## Features
2023-06-24 22:25:43 +03:00
2026-04-04 18:54:10 +03:00
- 🔍 **Multi-engine ** - search with dedicated endpoints for each engine
- 🌐 **Megasearch ** - cross-engine aggregation with deduplication
- 🖼 **Images ** - image search is also available
- 🎯 **Advanced filters ** - language, date range, file type, and site queries
- 🌍 **Configurable ** - proxy, cache, and resilient mode support
- 🐳 **Docker-ready ** - local and container deployment
2023-06-24 22:25:43 +03:00
2025-10-01 04:34:41 +03:00
## Quick Start⚡️
2023-06-24 22:25:43 +03:00
2025-10-01 04:34:41 +03:00
### Docker (Recommended)
2025-04-09 02:11:22 +08:00
2023-06-23 04:08:00 +03:00
```bash
2025-10-01 04:34:41 +03:00
# Run the API server via prebuilt image
2023-06-23 04:08:00 +03:00
docker run -p 127.0.0.1:7000:7000 -it karust/openserp serve -a 0.0.0.0 -p 7000
2025-10-01 04:34:41 +03:00
# Or use docker-compose
docker compose up --build
2023-06-23 04:08:00 +03:00
```
2026-04-04 18:54:10 +03:00
### From source
2025-04-09 02:11:22 +08:00
2025-10-01 04:34:41 +03:00
```bash
git clone https://github.com/karust/openserp.git
cd openserp
go build -o openserp .
./openserp serve
```
2025-04-09 02:11:22 +08:00
2026-04-04 18:54:10 +03:00
## 🌐 Megasearch & Megaimage
2025-04-09 02:11:22 +08:00
2026-04-04 18:54:10 +03:00
Search all engines at once:
2025-04-09 02:11:22 +08:00
2026-04-04 18:54:10 +03:00
```bash
curl "http://127.0.0.1:7000/mega/search?text=golang&limit=10"
```
Search only selected engines:
2025-04-09 02:11:22 +08:00
2025-10-01 04:34:41 +03:00
```bash
2026-04-04 18:54:10 +03:00
curl "http://127.0.0.1:7000/mega/search?text=golang&engines=duckduckgo,bing&limit=15"
```
2025-10-01 04:34:41 +03:00
2026-04-04 18:54:10 +03:00
Advanced filtering:
2025-10-01 04:34:41 +03:00
2026-04-04 18:54:10 +03:00
```bash
curl "http://127.0.0.1:7000/mega/search?text=Donald+Trump&engines=duckduckgo,bing&limit=20&date=20251005..20251005&lang=EN"
2023-08-06 15:09:26 +03:00
```
2025-04-09 02:11:22 +08:00
2026-04-04 18:54:10 +03:00
API response example:
2025-10-01 04:56:40 +03:00
```json
[
{
"rank": 1,
"url": "https://en.wikipedia.org/wiki/Golden_Retriever",
"title": "Golden Retriever - Wikipedia",
2026-04-04 18:54:10 +03:00
"description": "The Golden Retriever is a Scottish breed of retriever dog of medium size. It is characterised by a gentle and affectionate nature and a striking golden coat.",
2025-10-01 04:56:40 +03:00
"ad": false,
"engine": "duckduckgo"
},
{
"rank": 2,
2026-04-04 18:54:10 +03:00
"url": "https://www.bing.com/ck/a?!&&p=6f15ac4589858d0a104cd6f55cc8",
"title": "Golden Retriever Dog Forums",
"description": "Oct 20, 2024 · Back in the 1970s, Golden Retrievers routinely lived until 16 and 17 years old, they are now...",
2025-10-01 04:56:40 +03:00
"ad": false,
"engine": "bing"
},
{
"rank": 3,
2026-04-04 18:54:10 +03:00
"url": "http://www.baidu.com/link?url==2544q3ugc68j0scVxdpWCSX-gl2AmuCy1l7uRR3loIfS1",
"title": "golden retrievers是什么意思",
"description": "2025年9月21日golden retrievers 读音:美英 golden retrievers基本解释 金毛猎犬 分词解释 golden金(黄)色的...",
2025-10-01 04:56:40 +03:00
"ad": false,
"engine": "baidu"
}
]
```
2026-04-04 18:54:10 +03:00
Image search:
2025-04-09 02:11:22 +08:00
2025-10-01 04:34:41 +03:00
```bash
2026-04-04 18:54:10 +03:00
curl "http://127.0.0.1:7000/mega/image?text=golang logo&limit=20"
2023-08-06 15:09:26 +03:00
```
2025-10-01 04:34:41 +03:00
2026-04-04 18:54:10 +03:00
List available engines:
2025-10-01 04:34:41 +03:00
```bash
2026-04-04 18:54:10 +03:00
curl "http://127.0.0.1:7000/mega/engines"
2023-08-06 15:09:26 +03:00
```
2024-05-06 01:13:07 +03:00
2025-10-01 04:34:41 +03:00
**Available engines:** `google` , `yandex` , `baidu` , `bing` , `duckduckgo`
## 🔍 Individual Engine APIs
2026-04-04 18:54:10 +03:00
Common query parameters:
2025-04-09 02:11:22 +08:00
2025-10-01 04:34:41 +03:00
| Parameter | Description | Example |
| --------- | -------------------- | --------------------------------- |
| `text` | Search query | `golang programming` |
| `lang` | Language code | `EN` , `DE` , `RU` , `ES` |
| `date` | Date range | `20230101..20231231` |
| `file` | File extension | `PDF` , `DOC` , `XLS` |
| `site` | Site-specific search | `github.com` , `stackoverflow.com` |
| `limit` | Number of results | `10` , `25` , `50` |
2026-03-17 01:54:25 +03:00
2026-04-04 18:54:10 +03:00
Engine-specific parameters:
2026-03-17 01:54:25 +03:00
2026-04-04 18:54:10 +03:00
| Parameter | Supported engines | Notes |
| --------- | ----------------------------------- | ------------------------------------------------------------------ |
| `start` | `google` , `bing` , `yandex` , `baidu` | Web search pagination offset. |
| `filter` | `google` | Duplicate filter (`true` hides similar, `false` includes similar). |
| `answers` | `google` | Include Google answer boxes in output with negative ranks. |
2025-10-01 04:34:41 +03:00
2026-04-04 18:54:10 +03:00
Examples:
2025-04-09 02:11:22 +08:00
2023-06-23 04:08:00 +03:00
```bash
2026-04-04 18:54:10 +03:00
curl "http://127.0.0.1:7000/duck/search?text=golang&limit=7"
curl "http://127.0.0.1:7000/google/search?text=golang&lang=EN&limit=10"
curl "http://127.0.0.1:7000/bing/search?text=golang&limit=10&start=20"
curl "http://127.0.0.1:7000/yandex/search?text=golang&limit=10&start=10"
curl "http://127.0.0.1:7000/bing/image?text=golang&limit=20"
2023-06-23 04:08:00 +03:00
```
2025-04-09 02:11:22 +08:00
2026-04-04 18:54:10 +03:00
## 🌍 Proxy Support
2025-04-09 02:11:22 +08:00
2026-04-04 18:54:10 +03:00
OpenSERP supports HTTP and SOCKS5 proxies.
2025-04-09 02:11:22 +08:00
2026-04-04 18:54:10 +03:00
Simple global proxy:
2025-04-09 02:55:59 +08:00
```bash
2025-10-01 04:34:41 +03:00
./openserp serve --proxy socks5://127.0.0.1:1080
./openserp search bing "query" --proxy http://user:pass@127 .0.0.1:8080
2025-04-09 02:55:59 +08:00
```
2026-04-04 18:54:10 +03:00
Advanced proxy configuration is available in [config.yaml ](./config.yaml ).
You can enable tagged proxy pools and per-request override via `X-Use-Proxy: <tag>` or `X-Use-Proxy: direct` .
## Health & Stats
2026-03-17 01:54:25 +03:00
```bash
curl -i "http://127.0.0.1:7000/health"
2026-04-04 18:54:10 +03:00
curl "http://127.0.0.1:7000/stats"
curl "http://127.0.0.1:7000/stats/cache"
curl "http://127.0.0.1:7000/stats/proxy"
curl "http://127.0.0.1:7000/stats/cb"
2026-03-17 01:54:25 +03:00
```
2026-04-04 18:54:10 +03:00
Useful response headers in server mode: `X-Cache` , `X-Fallback-Engine` ,`X-Proxy-Mode` , `X-Proxy-Tag` , `X-Proxy-Used`
2026-03-17 01:54:25 +03:00
2025-04-09 02:11:22 +08:00
## License
2023-06-24 22:25:43 +03:00
2026-04-04 18:54:10 +03:00
This project is licensed under the MIT License. See [LICENSE ](LICENSE ).
2025-10-01 04:34:41 +03:00
## 🤝 Contributing
2026-04-04 18:54:10 +03:00
Contributions are welcome. Please feel free to submit a pull request.
2025-10-01 04:34:41 +03:00
## 👾 Issues & Support
2023-06-24 22:25:43 +03:00
2026-04-04 18:54:10 +03:00
If you encounter issues or have questions:
2025-04-09 02:11:22 +08:00
2025-10-01 04:34:41 +03:00
- Open an issue on GitHub
2026-04-04 18:54:10 +03:00
- Check existing issues for similar reports
- Review the documentation and example config
2026-04-07 18:34:12 +03:00
2026-04-14 02:05:58 +03:00
###### _"OpenSerp" is the name of this open-source project. Use of the name in a way that implies affiliation, endorsement, or official status is not permitted._