Hacker News API
Tech news, links, and discussions
Live Technical Metrics
Pre-calculated · updated every 20 min| Uptime Status | ⬜ Unknown — not yet probed |
|---|---|
| Server Latency | N/A |
| Hosting Server | Not disclosed |
| Content-Type | Not disclosed |
| Cache-Control | Not set |
| CORS Support | ✅ Enabled — safe for browser fetch() |
| Authentication | ✅ None required — call the API directly without a key |
| Category | News |
- Endpoint:
- https://github.com/HackerNews/API
Quick Integration Code
✅ No API key neededfetch("https://github.com/HackerNews/API")
.then(response => {
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return response.json();
})
.then(data => console.log(data))
.catch(error => console.error("Request failed:", error));
import requests
url = "https://github.com/HackerNews/API"
headers = {
"Accept": "application/json",
# "Authorization": "Bearer YOUR_TOKEN_HERE",
}
response = requests.get(url, headers=headers, timeout=10)
response.raise_for_status()
data = response.json()
print(data)
curl -X GET "https://github.com/HackerNews/API" \
-H "Accept: application/json" \
-H "User-Agent: MyApp/1.0" \
--max-time 10 \
--silent | python3 -m json.tool
Sample JSON Response — News
News{
"status": "ok",
"totalResults": 38420,
"articles": [
{
"source": {
"id": "bbc-news",
"name": "BBC News"
},
"author": "BBC News",
"title": "Tech giants announce new AI partnerships",
"description": "Leading technology companies have announced a series of strategic AI collaborations.",
"url": "https://bbc.co.uk/news/tech",
"publishedAt": "2025-01-15T16:30:00Z"
}
]
}