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

GET /schema-org

GET /schema-org alias: /schema-org

Returns a well-formed Schema.org / JSON-LD document: @context is https://schema.org, @type is in the vocabulary, all required properties for the type are present, no context-array shadowing. Served as application/ld+json. Counterpart to /schema-org, which ships one of four violations.

expect: 200 OK with Content-Type: application/ld+json. Body is spec-compliant JSON-LD with a real schema.org @context and a vocabulary-valid @type. Build structured-data extractors against this, then flip hostname to chaos.catastrophic.io to test adversity.

bash
curl -si 'https://not.catastrophic.io/schema-org' | grep -E '^(HTTP|content-type|x-chaos)'
import urllib.request, json
resp = urllib.request.urlopen("https://not.catastrophic.io/schema-org")
print("Content-Type:", resp.headers.get("Content-Type"))
print("X-Chaos-Schema-Org-Mode:", resp.headers.get("X-Chaos-Schema-Org-Mode"))
body = json.loads(resp.read())
ctx = body.get("@context")
print("@context:", ctx)
print("@type:", body.get("@type"))
print("note:", body.get("note"))
const res = await fetch("https://not.catastrophic.io/schema-org");
const body = await res.json();
console.log("Content-Type:", res.headers.get("content-type"));
console.log("X-Chaos-Schema-Org-Mode:", res.headers.get("x-chaos-schema-org-mode"));
console.log("@context:", body["@context"]);
console.log("@type:", body["@type"]);
console.log("note:", body.note);
package main

import (
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

func main() {
    resp, _ := http.Get("https://not.catastrophic.io/schema-org")
    defer resp.Body.Close()
    raw, _ := io.ReadAll(resp.Body)
    var body map[string]any
    json.Unmarshal(raw, &body)
    fmt.Println("Content-Type:", resp.Header.Get("Content-Type"))
    fmt.Println("X-Chaos-Schema-Org-Mode:", resp.Header.Get("X-Chaos-Schema-Org-Mode"))
    fmt.Printf("@context: %v\n", body["@context"])
    fmt.Printf("@type: %v\n", body["@type"])
}
// Cargo.toml: reqwest = { version = "0.12", features = ["blocking", "json"] }
fn main() -> Result<(), Box> {
    let resp = reqwest::blocking::get("https://not.catastrophic.io/schema-org")?;
    println!("Content-Type: {:?}", resp.headers().get("content-type"));
    println!("X-Chaos-Schema-Org-Mode: {:?}", resp.headers().get("x-chaos-schema-org-mode"));
    let body: serde_json::Value = resp.json()?;
    println!("@context: {:?}", body.get("@context"));
    println!("@type: {:?}", body.get("@type"));
    Ok(())
}
import java.net.URI;
import java.net.http.*;

public class SchemaOrgChaos {
    public static void main(String[] args) throws Exception {
        var client = HttpClient.newHttpClient();
        var req = HttpRequest.newBuilder(URI.create("https://not.catastrophic.io/schema-org")).build();
        var resp = client.send(req, HttpResponse.BodyHandlers.ofString());
        System.out.println("Content-Type: " +
            resp.headers().firstValue("Content-Type").orElse(""));
        System.out.println("X-Chaos-Schema-Org-Mode: " +
            resp.headers().firstValue("X-Chaos-Schema-Org-Mode").orElse(""));
        System.out.println("Body: " + resp.body());
    }
}
using var client = new HttpClient();
var resp = await client.GetAsync("https://not.catastrophic.io/schema-org");
Console.WriteLine($"Content-Type: {resp.Content.Headers.ContentType}");
Console.WriteLine($"X-Chaos-Schema-Org-Mode: " +
    $"{resp.Headers.GetValues("X-Chaos-Schema-Org-Mode").FirstOrDefault()}");
var body = await resp.Content.ReadAsStringAsync();
Console.WriteLine($"Body: {body}");
require "net/http"
require "json"
uri = URI("https://not.catastrophic.io/schema-org")
Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
    res = http.get(uri.request_uri)
    puts "Content-Type: #{res['Content-Type']}"
    puts "X-Chaos-Schema-Org-Mode: #{res['X-Chaos-Schema-Org-Mode']}"
    body = JSON.parse(res.body)
    puts "@context: #{body['@context']}"
    puts "@type: #{body['@type']}"
end
$r = Invoke-RestMethod -Uri 'https://not.catastrophic.io/schema-org' -ResponseHeadersVariable h
"Content-Type: $($h['Content-Type'])"
"X-Chaos-Schema-Org-Mode: $($h['X-Chaos-Schema-Org-Mode'])"
"@context: $($r.'@context')"
"@type: $($r.'@type')"