{
  "openapi": "3.1.0",
  "info": {
    "title": "Profanity Filter API",
    "version": "1.0.0",
    "description": "Detect and censor profanity in English and Spanish with three severity tiers, so you filter only what you mean to.\n\nDetect and censor profanity in user-generated text, in English and Spanish. 550+ curated words across three severity tiers — mild (hell, crap), strong (ordinary profanity and sexual vulgarity) and slur (identity-based slurs) — so you choose what to filter with min_severity instead of over-censoring: at min_severity=strong, \"jerk chicken\" and \"door knob\" pass clean. Whole-word, case-insensitive matching with leetspeak normalization (sh!t, @ss, d1ck), censor-evasion handling (f*ck, f.u.c.k, fuk, fuuuck) and accent folding for Spanish (cabrón matches cabron). No false positives on clean words like \"classic\" or \"Scunthorpe\". Returns matched words with per-word severity, an overall max_severity, a count, and a censored version of the text.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/profanity-filter.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/profanity-filter"
  },
  "servers": [
    {
      "url": "https://api-profanity-filter.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Utilities",
      "description": "Profanity Filter API belongs to the Utilities category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/check": {
      "get": {
        "operationId": "checkText",
        "summary": "Check Text",
        "description": "Check Text endpoint of the Profanity Filter API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/profanity-filter/check-text"
        },
        "parameters": [
          {
            "name": "censor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "*"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "en"
          },
          {
            "name": "min_severity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "strong"
          },
          {
            "name": "text",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Oh damn, this is crap"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "text": "Oh damn, this is bullsh1t",
                  "is_profane": true,
                  "profanity_count": 2,
                  "max_severity": "strong",
                  "matches": [
                    "damn",
                    "bullshit"
                  ],
                  "match_details": [
                    {
                      "word": "damn",
                      "severity": "mild"
                    },
                    {
                      "word": "bullshit",
                      "severity": "strong"
                    }
                  ],
                  "censored": "Oh ****, this is ********"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      },
      "post": {
        "operationId": "checkTextPost",
        "summary": "Check Text (POST)",
        "description": "Check Text (POST) endpoint of the Profanity Filter API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/profanity-filter/check-text-post"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "text": "Oh damn, this is crap",
                "censor": "*"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "text": "eres un gilipollas",
                  "is_profane": true,
                  "profanity_count": 1,
                  "max_severity": "strong",
                  "matches": [
                    "gilipollas"
                  ],
                  "match_details": [
                    {
                      "word": "gilipollas",
                      "severity": "strong"
                    }
                  ],
                  "censored": "eres un ##########"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}