{
  "openapi": "3.1.0"
 ,"info": {
    "title": "Chit Internet Content Rating API"
   ,"version": "1.0.0"
   ,"description": "API for obtaining the Internet Content Rating (ICR) of a Fully Qualified Domain Name (FQDN). Ratings apply to the hostname/FQDN, not to individual URLs."
   ,"x-icr-rating-schema": {
      "url": "https://icr.chit.eu/ChitICRSchema.json"
     ,"description": "Canonical machine-readable definitions of ICR Levels, Ratings and Targets."
    }
   ,"x-llms": {
    "url": "https://icr.chit.eu/llms.txt"
   ,"description": "LLM integration information for ICR."
   }
  }
 ,"servers": [
    {
      "url": "https://icr.chit.eu"
    }
  ]
 ,"paths": {
    "/check/{fqdn}": {
      "get": {
        "summary": "Get the ICR record for a domain"
       ,"description": "Returns the verified Internet Content Rating information for the supplied Fully Qualified Domain Name. An unverified domain is reported as Level 9 (Unknown)."
       ,"operationId": "getICR"
       ,"parameters": [
          {
            "name": "fqdn"
           ,"in": "path"
           ,"required": true
           ,"description": "Fully Qualified Domain Name, for example www.charitywater.org"
           ,"schema": {
              "type": "string"
            }
           ,"example": "www.charitywater.org"
          }
        ]
       ,"responses": {
          "200": {
            "description": "ICR record"
           ,"content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ICRRecord"
                }
               ,"example": {
                  "VerifyURL": "https://icr.chit.eu/check/www.charitywater.org"
                 ,"Host": "www.charitywater.org"
                 ,"Level": 4
                 ,"Rating": "Clean"
                }
              }
             ,"text/html": {
                "schema": {
                  "type": "string"
                }
               ,"description": "Human-readable representation when requested with Accept: text/html"
              }
            }
          }
        }
      }
    }
   ,"/level/{fqdn}": {
      "get": {
        "summary": "Get only the numeric ICR Level"
       ,"description": "Returns the verified ICR Level as plain text. Consumers should cache this result for at least 24 hours and should not request the same FQDN more than once per 24 hours."
       ,"operationId": "getICRLevel"
       ,"parameters": [
          {
            "name": "fqdn"
           ,"in": "path"
           ,"required": true
           ,"description": "Fully Qualified Domain Name"
           ,"schema": {
              "type": "string"
            }
           ,"example": "www.charitywater.org"
          }
        ]
       ,"responses": {
          "200": {
            "description": "Numeric ICR Level"
           ,"headers": {
              "Content-Type": {
                "schema": {
                  "type": "string"
                 ,"example": "text/plain"
                }
              }
            }
           ,"content": {
              "text/plain": {
                "schema": {
                  "type": "integer"
                 ,"minimum": 1
                 ,"maximum": 125
                }
               ,"example": 4
              }
            }
          }
        }
      }
    }
  }
 ,"components": {
    "schemas": {
      "ICRRecord": {
        "type": "object"
       ,"required": [
          "Host"
         ,"Level"
         ,"Rating"
        ]
       ,"properties": {
          "VerifyURL": {
            "type": "string"
           ,"format": "uri"
           ,"description": "Canonical ICR verification URL for this FQDN."
          }
         ,"Host": {
            "type": "string"
           ,"description": "Fully Qualified Domain Name to which the rating applies."
          }
         ,"Level": {
            "type": "integer"
           ,"minimum": 1
           ,"maximum": 125
           ,"description": "Numeric Internet Content Rating Level. Level 9 means Unknown/not yet verified. Canonical Level definitions are published at https://icr.chit.eu/ChitICRSchema.json"
          }
         ,"Rating": {
            "type": "string"
           ,"description": "Stable textual name corresponding to the Level. Canonical Rating definitions are published at https://icr.chit.eu/ChitICRSchema.json"
           ,"examples": [
              "SafeForAll"
             ,"Under7"
             ,"Under13"
             ,"Clean"
             ,"ParentDiscretion"
             ,"MayContainProfanities"
             ,"AdultTopics"
             ,"ObsceneToSome"
             ,"Unknown"
            ]
          }
        }
      }
    }
  }
 ,"externalDocs": {
    "description": "ICR specification and documentation"
   ,"url": "https://icr.chit.eu/"
  }
}
