https://github.com/deedy5/duckduckgo_search_api
Deploy an API that pulls data from duckduckgo search engine.
https://github.com/deedy5/duckduckgo_search_api
api duckduckgo python
Last synced: 4 months ago
JSON representation
Deploy an API that pulls data from duckduckgo search engine.
- Host: GitHub
- URL: https://github.com/deedy5/duckduckgo_search_api
- Owner: deedy5
- Created: 2022-09-10T11:57:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-13T06:09:47.000Z (about 1 year ago)
- Last Synced: 2025-04-13T06:27:25.687Z (about 1 year ago)
- Topics: api, duckduckgo, python
- Language: Python
- Homepage:
- Size: 65.4 KB
- Stars: 16
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Duckduckgo_search_api
Deploy an API that pulls data from duckduckgo search engine.
## Usage
clone
```python3
git clone https://github.com/deedy5/duckduckgo_search_api.git
cd duckduckgo_search_api
```
[Optional] set PROXY and TIMEOUT in main.py (*example with [iproyal residential proxies](https://iproyal.com?r=residential_proxies)*)
```python3
TIMEOUT = 20
PROXY = "socks5://user:password@geo.iproyal.com:32325"
```
create venv and install requirements
```python3
python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt
```
build and run using `docker-compose`
```python3
docker-compose up --build
```
build and run using `docker`
```python3
docker build -t ddgs .
docker run -d --name ddgs -p 8000:8000 --dns 1.1.1.1 --dns 8.8.8.8 ddgs
```
**check**
[http://127.0.0.1:8000/](http://127.0.0.1:8000/)
[http://127.0.0.1:8000/text?q=test&max_results=5](http://127.0.0.1:8000/text?q=test&max_results=5)
## Disclaimer
This library is not affiliated with DuckDuckGo and is for educational purposes only. It is not intended for commercial use or any purpose that violates DuckDuckGo's Terms of Service. By using this library, you acknowledge that you will not use it in a way that infringes on DuckDuckGo's terms. The official DuckDuckGo website can be found at https://duckduckgo.com.