GET /infinite/json/comments/{path}
Deterministic well-formed comment JSON for any path tail.
path
Arbitrary path of any depth; seeds the deterministic content generator. Same path tail under different types yields different content.
fields
Optional comma-separated field names. Open-ended. Default: id, body, author_id, post_id, created_at.
expect: 200 OK with Content-Type: application/json. A JSON object with `_note`, `id`, `body`, `author_id`, `post_id`, `created_at`.
curl -s 'https://not.catastrophic.io/infinite/json/comments/c-1' | jq .
import json, urllib.request
resp = urllib.request.urlopen("https://not.catastrophic.io/infinite/json/comments/c-1")
print("Content-Type:", resp.headers.get("Content-Type"))
print("X-Not-Infinite-Type:", resp.headers.get("X-Not-Infinite-Type"))
data = json.loads(resp.read())
print(json.dumps(data, indent=2))
const res = await fetch("https://not.catastrophic.io/infinite/json/comments/c-1");
const data = await res.json();
console.log("Content-Type:", res.headers.get("content-type"));
console.log("X-Not-Infinite-Type:", res.headers.get("x-not-infinite-type"));
console.log(JSON.stringify(data, null, 2));
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
resp, _ := http.Get("https://not.catastrophic.io/infinite/json/comments/c-1")
defer resp.Body.Close()
fmt.Println("Content-Type:", resp.Header.Get("Content-Type"))
fmt.Println("X-Not-Infinite-Type:", resp.Header.Get("X-Not-Infinite-Type"))
body, _ := io.ReadAll(resp.Body)
var data map[string]interface{}
_ = json.Unmarshal(body, &data)
out, _ := json.MarshalIndent(data, "", " ")
fmt.Println(string(out))
}
// [dependencies] reqwest = { version = "0.11", features = ["blocking", "json"] }
use reqwest::blocking::get;
use serde_json::Value;
fn main() -> Result<(), Box> {
let resp = get("https://not.catastrophic.io/infinite/json/comments/c-1")?;
println!("Content-Type: {:?}", resp.headers().get("content-type"));
println!("X-Not-Infinite-Type: {:?}", resp.headers().get("x-not-infinite-type"));
let data: Value = resp.json()?;
println!("{}", serde_json::to_string_pretty(&data)?);
Ok(())
}
import java.net.URI;
import java.net.http.*;
public class Demo {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder(URI.create("https://not.catastrophic.io/infinite/json/comments/c-1")).build();
HttpResponse res = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("Content-Type: " + res.headers().firstValue("content-type").orElse(""));
System.out.println("X-Not-Infinite-Type: " + res.headers().firstValue("x-not-infinite-type").orElse(""));
System.out.println(res.body());
}
}
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Demo {
static async Task Main() {
using var client = new HttpClient();
var res = await client.GetAsync("https://not.catastrophic.io/infinite/json/comments/c-1");
Console.WriteLine("Content-Type: " + res.Content.Headers.ContentType);
if (res.Headers.TryGetValues("X-Not-Infinite-Type", out var v))
Console.WriteLine("X-Not-Infinite-Type: " + string.Join(",", v));
Console.WriteLine(await res.Content.ReadAsStringAsync());
}
}
require 'net/http'
require 'json'
uri = URI("https://not.catastrophic.io/infinite/json/comments/c-1")
res = Net::HTTP.get_response(uri)
puts "Content-Type: #{res['content-type']}"
puts "X-Not-Infinite-Type: #{res['x-not-infinite-type']}"
puts JSON.pretty_generate(JSON.parse(res.body))
headers
body
What you get
Returns a JSON object representing a comment. Default fields are id, body, author_id, post_id, created_at.
Example URLs
/infinite/json/comments/c-1/infinite/json/comments/post/welcome/c-1/infinite/json/comments/thread/abc/reply/42
Caps and headers
Content-Type: application/json; charset=utf-8Cache-Control: public, max-age=86400X-Robots-Tag: noindex, nofollowX-Not-Payload: infiniteX-Not-Infinite-Type: commentsX-Not-Infinite-Format: json- Body capped at 20 KB. If truncated,
X-Not-Infinite-Truncated: trueis set. - Rate limit: 10 requests / 60s per IP (separate from the standard 60/60s limit).