InsightSocial API
Hacker News

Hacker News Search API reference

Your first 10 calls are free, no card needed. Pricing and FAQ

Get a free API key
Example request
curl "https://api.insightsocial.app/v1/hackernews/search" \
  -H "x-api-key: $INSIGHTSOCIAL_API_KEY"
GET
/v1/hackernews/search

Search Hacker News by keyword.

Beta. The source's own structure under our naming rules (snake_case keys, string ids, ISO times where the source gives a timestamp), not one of the schema-2 entities. Fields may change. See Beta endpoints.

20 credits per call.

Paginates by cursor: see Pagination.

x-api-key<token>

Your key from the dashboard. It starts with isk_.

In: header

Query Parameters

query?string

Full-text search query. Required unless front_page_only, author, domain, or url is set.

type?string

Restrict search results to a Hacker News content type. ask_hn: Ask HN posts (questions to the community). show_hn: Show HN posts (projects/work being shared). launch_hn: Launch HN posts (YC-affiliated company launches). Default: all.

Value in

  • "all"
  • "story"
  • "comment"
  • "ask_hn"
  • "show_hn"
  • "launch_hn"
  • "job"
  • "poll"
sort?string

Ranking mode. Default: popularity.

Value in

  • "popularity"
  • "date"
date_range?string

Creation-time window. Default: all.

Value in

  • "24h"
  • "week"
  • "month"
  • "year"
  • "all"
limit?string

Hits per page. Must be one of 10, 20, 30, 50. Default: 20.

front_page_only?boolean

When true, restrict results to current front-page items. Allows omitting query.

search_story_text?boolean

Include story/comment text in searchable fields. Default: true. Set false to search title/URL only.

search_author?boolean

When true, include author username in the searchable fields.

prefix?boolean

When true, enable prefix matching for query tokens.

typo_tolerance?boolean

Enable typo tolerance. Default: true.

author?string

Restrict results to items by this Hacker News username.

domain?string

Restrict search to story URLs matching this domain (e.g. example.com). Can omit query.

url?string

Restrict search to story URLs matching this URL substring. Can omit query.

min_points?integer

Minimum points/score filter.

Range0 <= value <= 1000000
cursor?string

Pass pagination.next_cursor from the previous response to get the next page. Keep the other parameters the same.

dry_run?"1"

Set to 1 to get the price of this call without making it: data.dry_run carries credits_min and credits_max. Nothing is charged.

Value in

  • "1"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.insightsocial.app/v1/hackernews/search"
{  "success": true,  "platform": "string",  "endpoint": "string",  "schema_version": "2",  "pagination": {    "next_cursor": "string",    "has_more": true,    "page_size": 0,    "stopped_at": "since"  },  "unavailable": [    "string"  ],  "credits_used": 0,  "credits_remaining": 0,  "request_id": "string",  "cached": true,  "idempotent_replay": true,  "charge_reason": "string",  "free_call": true,  "data": {    "property1": null,    "property2": null  }}