online / endpoints 62 / categories 10 / rate 60/min/ip /

GET /infinite/json/products/{path}

GET /infinite/json/products/{path}

Deterministic well-formed product 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, sku, title, description, price, currency, in_stock.

expect: 200 OK with Content-Type: application/json. A JSON object with `_note`, `id`, `sku`, `title`, `description`, `price`, `currency`, `in_stock`.

bash
curl -s 'https://not.catastrophic.io/infinite/json/products/widget-1234' | jq .
import json, urllib.request
resp = urllib.request.urlopen("https://not.catastrophic.io/infinite/json/products/widget-1234")
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/products/widget-1234");
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/products/widget-1234")
    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/products/widget-1234")?;
    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/products/widget-1234")).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/products/widget-1234");
        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/products/widget-1234")
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))

What you get

Returns a JSON object representing a product. Default fields are id, sku, title, description, price, currency, in_stock.

Example URLs

  • /infinite/json/products/widget-1234
  • /infinite/json/products/category/tools/saw
  • /infinite/json/products/sku/ACME-9999

Caps and headers

  • Content-Type: application/json; charset=utf-8
  • Cache-Control: public, max-age=86400
  • X-Robots-Tag: noindex, nofollow
  • X-Not-Payload: infinite
  • X-Not-Infinite-Type: products
  • X-Not-Infinite-Format: json
  • Body capped at 20 KB. If truncated, X-Not-Infinite-Truncated: true is set.
  • Rate limit: 10 requests / 60s per IP (separate from the standard 60/60s limit).