GET
/
scoring
/
profanity
Profanity Detection
curl --request GET \
  --url https://greipapi.com/scoring/profanity \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "isML": true,
    "text": "This is just a normal text",
    "totalBadWords": null,
    "riskScore": 0,
    "isSafe": true,
    "status": "success",
    "executionTime": 120
  }
}

Query Parameters

text
string
required
The text you want to filterSample value: This is a sample text without profanity!
scoreOnly
string
default:"no"
Returns only the score of the text and whether it’s safe or not.Expected values: yes, or no.
listBadWords
string
default:"no"
Used to list the bad words in an array.Expected values: yes, or no.
format
string
default:"JSON"
The format command is used to get a response in a specific format.Expected values: JSON, XML, or CSVFor more information please refer to Response Format.
mode
string
default:"live"
The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.Expected values: live, or test.For more information please refer to Development Environment.
callback
string
The callback command can help you make the response as a JSONP format.Expected values: any name that can be used as a function name in Javascript, e.g: myFunctionName.For more information please refer to JSONP Callback.
{
  "data": {
    "isML": true,
    "text": "This is just a normal text",
    "totalBadWords": null,
    "riskScore": 0,
    "isSafe": true,
    "status": "success",
    "executionTime": 120
  }
}

Response properties

data
object
required
status
string
required
The response status.Expected values: success, or error.
executionTime
integer
required
Time spent in milliseconds to process the data.
This method returns a score for the text you pass.We classify profanity into 4 different level. The first level contains the most risky words and phrases (risky). The second level contains the medium-risk words and phrases. Whereas, the third level contains the low-risk words.When you use the API, the response will the determine the score of the text you passed as follows:
  • riskScore = 0 means that this text is completely safe.
  • riskScode = 1 means that this is a high-risk text.
  • riskScode = 2 means that this is a medium-risk text.
  • riskScode = 3 means that this is a low-risk text.