GET /v1/crawl/hackernews/profile

Hacker News user API: karma, about text and submissions by username

Send a Hacker News username in id and get the user's karma, account creation time, about text and the ids of their submissions. A username that does not exist returns no fields and is not billed.

Price
$0.0005 per call
Batch
Yes, through /v1/batch
Failed calls
Not charged

Example request

curl
curl 'https://api.virev.ai/v1/crawl/hackernews/profile?id=pg' \
  -H "Authorization: Bearer $VIREV_API_KEY"
python
import os
import requests

response = requests.request(
    "GET",
    "https://api.virev.ai/v1/crawl/hackernews/profile",
    params={
        "id": "pg",
    },
    headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
    timeout=60,
)
response.raise_for_status()
print(response.json())

Parameters

NameInTypeDescription
id requiredquerystringThe Hacker News username. Example pg.

Example response

The example response of the API reference.

json
{
  "data": {
    "final_url": "https://hacker-news.firebaseio.com/v0/user/pg.json",
    "status": 200,
    "content_type": "application/json; charset=utf-8",
    "payload_kind": "json",
    "response_headers": {
      "content-type": "application/json; charset=utf-8",
      "cache-control": "no-cache"
    },
    "body": {
      "about": "Bug fixer.",
      "created": 1160418092,
      "id": "pg",
      "karma": 157316,
      "submitted": [
        39667625,
        37278578
      ]
    },
    "extracted": {
      "values": {
        "username": "pg",
        "karma": 157316,
        "created": 1160418092,
        "about": "Bug fixer."
      },
      "errors": []
    }
  },
  "meta": {
    "cost": "$0.0005",
    "balance": "$3.0790",
    "request_id": "req_b10e639af72b9319ae3c66658c2cc6ab"
  }
}

How it works

A Hacker News user — karma, account age, about text, and their submissions. A username that does not exist returns no fields and is not billed.

Errors

StatusWhen
400The request parameters are invalid.
401Missing, malformed, or revoked API key.
402Balance is too low for this request.
404The page does not exist: its site answered 404 or 410 for this input. You are not charged.
429Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged.
502The upstream fetch failed. You are not charged.
503Billing could not be confirmed, so no upstream data was returned.
504The upstream request timed out. You are not charged.