Node-RED flow to run an internet search using Startpage.com and parse its findings
This repository contains a simple flow which runs an internet search using Startpage.com and parses its results.
Just a small note: if you like this work and plan to use it, consider "starring" this repository (you will find the "Star" button on the top right of this page), so that I know which of my repositories to take most care of.
This flow relies on Axios for the communication with Startpage.com.
Simply import the contents of file Startpage-Flow.json into your Node-RED Flow Editor and Axios will be installed as well (if necessary)
Since the flow is implemented as a "reusable flow", the corresponding nodes should also be installed - afterwards, Startpage searches may be used anywhere in any workspace of your Node-RED server without having to copy the node which implements this function (this simplifies any updates)
The Startpage flow expects up to two parameters:
msg.payload
- initially contains the string to search for. Later on, it will be replaced either by an error message or the parsed search resultsmsg.language
- the language the search results should be written in
If successfull (success is indicated by msg.status === 200
), msg.payload
will return an array with up to 10 search results. Each result is an object with the following properties:
Date
- an optional date indicating when the found document was modifedURL
- the URL of the found documentTitle
- the title of the found documentDescription
- a short description of the found document
Nota bene: HTML entities (such as
) will not be resolved
If msg.status
has a different value than 200 or 204, msg.payload
will contain an error message describing the error that occurred
File Startpage-Example.json contains a simple example: just import its contents into your Node-RED flow editor and configure the injection node with the desired search text and language.
Shortly after pressing the injection button, the debug output should show up to 10 properly parsed search results.