Skip to content
Davide Santangelo edited this page Jan 15, 2024 · 11 revisions

Welcome to the SearQ documentation. Here you'll find everything you need to learn and create with our lightning fast search engine.

Searq is a REST API that allows users to search and retrieve information from RSS (Really Simple Syndication) feeds. Rather than relying on a traditional web crawling method, it uses the information contained in RSS feeds to present the most relevant and up-to-date results to the user. The engine works by aggregating information from multiple RSS feeds, indexing the content and allowing users to search using keywords or phrases.

By using RSS feeds, search results are often more targeted and accurate, making it easier for users to find the information they are looking for. In addition, because the information is drawn from a variety of sources, users may also be exposed to a wider range of perspectives and opinions on a given topic.

REST

When you make a request to the REST API, you will specify an HTTP method and a path. Additionally, you might also specify request headers and path, query, or body parameters. The API will return the response status code, response headers, and potentially a response body.

The REST API reference documentation describes the HTTP method, path, and parameters for every operation. It also displays example requests and responses for each operation.

To make a request, first find the HTTP method and the path for the operation that you want to use. For example, the "Get feeds" operation uses the GET method and the /feeds path. For the full reference documentation for this operation, see

Prepend the base URL for the GitHub REST API, https://api.github.com, to the path to get the full URL: https:///api/feeds.

HTTP calls

Install curl if it isn't already installed on your machine. To check if curl is installed, execute curl --version in the command line. If the output is information about the version of curl, it is installed. If you get a message similar to command not found: curl, you need to download and install curl. For more information, see the curl project download page.

Use the curl command to make your request. Pass your token in an Authorization header. Replace YOUR-TOKEN with your token.

curl --request GET \
--url "https://<URL>/api/feeds.json" \
--header "Accept: application/json" \
--header "Authorization: Token YOUR-TOKEN"

Pagination

Requests that return multiple items will be paginated to 20 items by default. You can specify further pages with the ?page parameter. Pagination information is available inside headers. Example:

Per-Page: 20
Link <https://<URL>/api/search?q={q}&page=1>; rel="first", <https://<URL>/api/search?q={q}&page=24>; rel="last"
Total: 464
Clone this wiki locally