Run your first Hacker News API call in ruby — copy, paste, done.
Free live snapshot — no key, no signup: GET /v1/snapshot?query=openai
require "net/http"
uri = URI("https://s-hn.pixharvest.com/v1/snapshot")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_KEY"
puts Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }.body