Skip to main content
POST
/
api
/
hackernews
/
items
/
search
/hackernews/items/search
curl --request POST \
  --url https://api.anysite.io/api/hackernews/items/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "query": "<string>",
  "count": 2,
  "timeout": 300,
  "sort": "relevance",
  "min_points": 100,
  "min_comments": 50,
  "created_after": 1,
  "created_before": 1
}
'
[
  {
    "id": 123,
    "@type": "@hackernews_search_hit",
    "type": "<string>",
    "author": "<string>",
    "title": "<string>",
    "url": "<string>",
    "text": "<string>",
    "score": 123,
    "comment_count": 123,
    "created_at": 123,
    "parent_id": 123,
    "story_id": 123
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
query
string
required

Full-text search query

Minimum string length: 1
Example:

"postgres performance"

count
integer
required

Max result count

Required range: x >= 1
Example:

20

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
tag
enum<string> | null

Restrict results to a single item type

Available options:
story,
comment,
poll,
job,
show_hn,
ask_hn
sort
enum<string>
default:relevance

Result sorting

Available options:
relevance,
date
min_points
integer | null

Only items with at least this score

Required range: x >= 0
Example:

100

min_comments
integer | null

Only items with at least this many comments

Required range: x >= 0
Example:

50

created_after
integer | null

Only items created at or after this unix timestamp (seconds)

Required range: x >= 0
created_before
integer | null

Only items created at or before this unix timestamp (seconds)

Required range: x >= 0

Response

Successful Response

id
integer
required
@type
string
default:@hackernews_search_hit
type
string | null
author
string | null
title
string | null
url
string | null
text
string | null
score
integer | null
comment_count
integer | null
created_at
integer | null
parent_id
integer | null
story_id
integer | null