---
title: "Hacker News API: Search | Perceptlayer"
description: "Search from Hacker News as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/hacker-news/search
---

[APIs](https://perceptlayer.com/apis) / [Hacker News](https://perceptlayer.com/apis/hacker-news) / Search

# Hacker News: Search

Search from Hacker News as JSON. 1 credit per successful call.

GET `/v1/hacker-news/search` Needs terms

Note 

This endpoint needs the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints), which you can accept in your dashboard.

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `query` | string | Required | Up to 100 characters |
| `type` | string | Optional | story, comment |
| `sort` | string | Optional | relevance, date |
| `page` | integer | Optional | Any |
| `per_page` | integer | Optional | Any |
| `date_from` | integer | Optional | Any |
| `date_to` | integer | Optional | Any |

## Example request

cURL shell 

```
curl "https://api.perceptlayer.com/v1/hacker-news/search?query=dishwasher&type=story" \
  -H "X-API-Key: $API_KEY"
```

[Run this endpoint in the playground](https://perceptlayer.com/apis/hacker-news?try=search#playground) with your own parameters. 1 credit per successful call; failed calls are free.
