API Key
Endpoints
/search [POST]
Parameters
q | Query body |
---|---|
sort | popularity | newest | relevance default: relevance |
hide_low | When 1 passed, api skips results which has lower payout value than 0.05 default: 0 |
since | Allows to search result newer than a date. Datetime in iso format (%Y-%m-%dT%H:%M:%S). e.g. 2019-09-19T13:11:00 default: null |
scroll_id | While a search request returns a single "page" of results, the scroll_id can be used to retrieve large number of results. You can use current result set's scroll_id for pagination. Scroll ids are alive for 5 minutes. |
Example Request
curl https://api.hivesearcher.com/search -d '{"q":"ecency", "sort": "newest"}' -H "Content-Type: application/json" -H "Authorization: YOUR_ACCESS_TOKEN" -X POST
Example Response
{ "took": 0.031, "hits": 16687, "scroll_id": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAd77cFmY4TUc4Mlc2VGlxcnBZaFRNZkRlMlEAAAAAAA_TrhZUZVFlbGpfbFJ6aXpxUFdKRkF4dDBnAAAAAAAP068WVGVRZWxqX2xSeml6cVBXSkZBeHQwZwAAAAAAd77dFmY4TUc4Mlc2VGlxcnBZaFRNZkRlMlEAAAAAAHe-2xZmOE1HODJXNlRpcXJwWWhUTWZEZTJR", "results": [ { "id": 64697517, "author": "ecency", "permlink": "ecency-the-best-and-fastest-app-on-hive-f19a641976f06est", "category": "ecency", "children": 29, "author_rep": 67.07, "title": "Ecency - The best and fastest app on Hive", "title_marked": "<mark>Marked</mark> title of the post or comment", "body": "Full body text", "body_marked": "<mark>Marked</mark> body of the post or comment", "img_url": "https://image.ibb.co/j1zzgL/header.png", "payout": 34.876, "total_votes": 419, "up_votes": 419, "created_at": "2018-10-22T06:47:15+00:00", "tags": [ "ecency", "hive", "hive-dev", "hivesearcher", "search-engine" ], "app": "ecency/3.0.10-vision", "depth": 0 }, ... ] }
/state [GET]
Returns usage statistics of the api key.
Example Request
curl https://api.hivesearcher.com/state -H "Authorization: YOUR_ACCESS_TOKEN"
Example Response
{ "request_count": 3, // request count that made in the day "request_limit": 3000 // daily total request limit }
Query body
A query body can contain tag, author and type filters and allows search combining, exact matching and term excluding.
Complex query body example
"desktop app" -"monthly digest" -giveaway author:good-karma tag:desktop,wallet type:post
The query above searches for posts from @good-karma with two tags together #desktop and #wallet having exact match of "desktop app" phrase there but excluding posts about monthly digests or giveaways.
Community search
Hivesearcher could also be used for custom search within communities.
Search within community
books category:hive-125125 type:post
The query above searches for posts with books keyword from hive-125125 (Ecency) community.
Custom feeds
Hivesearcher could also be used for creating custom feed, filter with certain dates, filter with certain keywords, etc.
Finding latest mentions of "good-karma" and creating feed out of it.
"q":"good-karma", "sort": "newest"
The query above searches for content with mention of "good-karma" and sorts with newest filter.