This documentation is almost identical to what we have on RapidAPI.
The base URL: https://oopspam.p.rapidapi.com/
If you are using OOPSpam through RapidAPI, make sure to include
x-rapidapi-key as a request header with your API key as a value. You can get an API key by subscribing to one of the plans.
Check out our RapidAPI page for example requests in different programming languages.
Also make sure check out Tips section.
/v1/spamdetection endpoint analyses given parameters and returns overall
spam score including detailed detection results in structured JSON.
senderIP: is the IP of the original content sender. This field value will be looked up in multiple blacklisted IPs lists that previously detected sending spam. Although
senderIPis an optional field, we recommend sending it. Don't send 127.0.0.1, it is by default blocked.
Important: This field should include spammer's IP, in other words, whoever submitted regarding content to you, not your IP.
content: is a content you would like to be analyzed.
contentLang: (optional) In what language(s) you expect the content to be?
Pass two-letter language(s) code to the parameter as an array. Check out an example request & support languages.
checkForLength: (optional) Is a boolean value. Whenever you send content to the API, it checks if it is more than 20 characters long. In case the content is shorter than 20 characters than it is considered as spam (Spam Score: 5) and returns
checkForLength: falseto disable this feature. This is recommended only for live chat systems or where you fill like no need for a length check.
contentLang: If you know that you may receive content in a few languages (or single language), say English,
Vietnamese, Turkish then your
contentLang parameter should have JSON array
Following languages are supported:
|Language||ISO 639-1 code||Language||ISO 639-1 code|
In case of successful request, following structured JSON will be responded:
Score: An number between 0-6 representing an overall spam score based on passed parameters. The higher this value, the more likely to be spam. A value 3 or above can be considered spam.
Details: A dictionary containing the result of different analyses.
isIPBlocked: A boolean value representing whether the value of parameter
senderIPIP is blacklisted.
langMatch: A boolean value representing whether the value of parameter
contentLangmatches with the detected language by Language Detection algorithm.
isContentSpam: A string containing the result of a Machine Learning algorithm on whether the content is a
numberOfSpamWords: A number representing a number of spam words within the content.
isContentTooShort: A boolean value representing whether the value of
contentis too short to consider a meaningful sentence. Any content that is too short will be considered as spam.
isContentAdult: A boolean value representing whether the value of
contentis an adult content. Any content that is detected as adult content will be considered as spam. The maximum spam score 6 will be returned.
A successful request will return HTTP status code
200. In case you
didn't include necessary headers in your requests such as an API key which you will
get status code
401 (Unauthorized) with an explanatory
as the part of response's body. Other possible errors can be :
- An invalid JSON format
- Generic error message
With all (error) cases, you will get a JSON object with an error
message which looks like this:
- To check against blacklisted IPs (
senderIP) only IPv4 is supported. IPv6 will be ignored.
Scoreparameter value ranges from 0 to 6. A value 3 or above can be considered spam.
- Make async HTTP request instead of sync since the system check
senderIPagainst multiple blacklisted IPs lists until it finds it.
- Don't send 127.0.0.1, ::1, 188.8.131.52 as a value of
senderIP, they are by default blocked.