Rustem Kamalov d8b9bae18f typo
2023-06-23 04:25:11 +03:00
2023-06-23 04:16:45 +03:00
2023-06-23 04:16:45 +03:00
2023-06-23 04:08:00 +03:00
2023-06-23 04:16:45 +03:00
2023-06-23 04:16:45 +03:00
2023-06-23 04:08:00 +03:00
2023-06-23 04:08:00 +03:00
2023-06-23 04:08:00 +03:00
2023-06-23 04:08:00 +03:00
2023-06-23 04:16:45 +03:00
2023-06-23 04:08:00 +03:00
2023-06-23 03:03:09 +03:00
2023-06-23 04:16:45 +03:00
2023-06-23 04:25:11 +03:00

Open SERP (Search Engine Results Page)

Get Google, Yandex, Baidu search engine results via API or CLI.

Docker usage

  • Run:
# Use prebuilt image
docker run -p 127.0.0.1:7000:7000 -it karust/openserp serve -a 0.0.0.0 -p 7000

# Or use docker-compose.yaml instead
docker-compose up --build
  • Get 20 Google results for hello world, only in English - [serv_addr]/google/search?lang=EN&limit=20&text=hello world:
[
    {
        "rank": 0,
        "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!\"."
    },
]
  • You can replace google to yandex or baidu in API call to change search engine.

  • Available search parameters:

Param Description
text Text to search
lang Search pages in selected language (EN, DE, RU...)
date Date in YYYYMMDD..YYYYMMDD format (e.g. 20181010..20231010)
file File extension to search (e.g. PDF, DOC)
site Search only in selected site
limit Limit the number of results

CLI

  • Use -h flag to see commands.
  • You can use serve to serve API:
openserp serve 
  • Or print results in CLI using search command:
openserp search google "how to get banned in google fast" # You can change `google` to `yandex` or `baidu`

As a result you should get JSON output containting search results:

[
 {
  "rank": 0,
  "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 ..."
 },
]
Languages
Go 99.4%
JavaScript 0.4%
Dockerfile 0.2%