Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning » AI Answers

Search APIs are too expensive, how do I build a free search engine myself?

2024-11-29 2.4 K

Build your own private search engine SearXNG

Preparation. Make sure you have Docker and Docker Compose installed on your machine.

Step 1: Create the instance catalog

First, create a directory to hold the SearXNG configuration files:

mkdir searxng

Step 2: Run the SearXNG Docker Container

Use the following command to pull the Docker image of SearXNG and run the container:

docker run \ --rm -d -p 8081:8080 \ -v "${PWD}/searxng:/etc/searxng" \ -e "BASE_URL=http://localhost:8081/" \ -e "INSTANCE_NAME=searxng" \ searxng/searxng

Step 3: Enable JSON Format Output

SearXNG does not output results in JSON format by default.

  1. Go to the container's configuration file directory:cd /root/searxng
  2. Open it with your favorite text editor settings.yml Documentation.
  3. locate formats section, add json
formats: - json # 添加 json 格式
  1. Restart the Docker container to make the changes take effect:
docker restart

Step 4: Configure SearXNG in Open Web UI

Now you can add SearXNG as a custom search engine in Open Web UI.

  • Searxng query URL. http://<SearXNG_IP>:8081

将 <SearXNG_IP> Replace with the IP address of the SearXNG instance.

  • Intranet access. Use the IP address of the container.
  • Extranet access. Use the public IP address of your server.

Done!

Note that the port can be replaced with the one you want to prevent whitelining.

🍐 Duck & Pear AI Article Smart Writer
Selection → Writing → Publishing
Fully automated!
WordPress AI Writing Plugin
500+ content creators are using
🎯Intelligent Selection: Batch generation, say goodbye to exhaustion
🧠retrieval enhancement: networking + knowledge base with depth
Fully automated: Writing → Mapping → Publishing
💎Permanently free: Free version = Paid version, no limitations
🔥 Download the plugin for free now!
✅ Free forever · 🔓 100% Open Source · 🔒 Local storage of data

Recommended

Can't find AI tools? Try here!

Enter keywords.Accessibility to Bing SearchYou can find AI tools on this site quickly.

Top