API access for search engines results if available isn't free.
Using OpenSERP, you can get search results fromGoogle,Yandex,Baiduvia API or CLI!
SeeDockerandCLIusage examples below (search,images).
- Run API server:
#Use prebuilt image
docker run -p 127.0.0.1:7000:7000 -it karust/openserp serve -a 0.0.0.0 -p 7000
#Or build one and run using docker-compose.yaml
docker-compose up --build
Param | Description |
---|---|
text | Text to search |
lang | Search pages in selected language (EN ,DE ,RU ...) |
date | Date inYYYYMMDD..YYYYMMDD format (e.g. 20181010..20231010) |
file | File extension to search (e.g.PDF ,DOC ) |
site | Search within a specific website |
limit | Limit the number of results |
answers | Include google answers as negative rank indexes (e.g.true ,false ) |
Get 20Googleresults forhello world
,only in English:
GET http:/127.0.0.1:7000/google/search?lang=EN&limit=20&text=hello world
You can replacegoogle
toyandex
orbaidu
in query to change search engine.
|
[
{
"rank":1,
"url":"https://en.wikipedia.org/wiki/%22Hello,_World!%22_program",
"title":"\ "Hello, World!\ "program",
"description":"A\ "Hello, World!\ "program is generally a computer program that ignores any input, and outputs or displays a message similar to\ "Hello, World!\ ".",
"ad":false
},
]
Get 100Googleresults forgolden puppy
:
GET http://127.0.0.1:7000/google/image?text=golden puppy&limit=100
- Use
-h
flag to see commands. - You can use
serve
command to serve API:
openserp serve
- Or print results in CLI using
search
command:
openserp search google"how to get banned from google fast"#Change `google` to `yandex` or `baidu`
As a result you should get JSON output containting search results:
[
{
"rank":1,
"url":"https://www.cyberoptik.net/blog/6-sure-fire-ways-to-get-banned-from-google/",
"title":"11 Sure-Fire Ways to Get Banned From Google | CyberOptik",
"description":"How To Get Banned From Google · 1. Cloaking: The Art of Deception · 2. Plagiarism: Because Originality is Overrated · 3. Keyword Stuffing: More is Always Better · 4...",
"ad":false
},
]
This project is licensed under the MIT License - see theLICENSEfile for details
If you have some issues/bugs/questions, feel free to open an issue.