Git Product home page Git Product logo

openserp's Introduction

OpenSERP (Search Engine Results Page)

OpenSERP

Go Report Card Go Reference release

API access for search engines results if available isn't free.

Using OpenSERP, you can get search results from Google, Yandex, Baidu via API or CLI!

See Docker and CLI usage examples below (search, images).

Docker usage 🐳

  • 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

Request 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 within a specific website
limit Limit the number of results

Search

Example request

Get 20 Google results for hello world, only in English:

GET http:/127.0.0.1:7000/google/search?lang=EN&limit=20&text=hello world

You can replace google to yandex or baidu in query to change search engine. |

Example response

[
    {
        "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!\"."
    },
]

Images

Example request

Get 100 Google results for golden puppy:

GET http://127.0.0.1:7000/google/image?text=golden puppy&limit=100

Example response

[
    {
        "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!\"."
    },
]

CLI ⌨️

  • 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 ..."
 },
]

License

This project is licensed under the MIT License - see the LICENSE file for details

Bugs + Questions 👾

If you have some issues/bugs/questions, feel free to open an issue.

openserp's People

Contributors

karust avatar greydgl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.