The Scam Minder REST API provides a comprehensive suite of tools for website analysis and scam detection. Using this API, you can retrieve detailed information about websites, including scam scores, WHOIS data, content analysis, and more. This guide will cover how to interact with the API and include code examples for different sections.
Base URL
All API requests should be made to the following base URL:
https://scamminder.com/rest-api
Authentication
All API requests require an authorization token. You must include this token in the request header using the Authorization: Bearer YOUR_ACCESS_TOKEN
format. Ensure that each request uses the proper token.
Example Authentication Header:
{
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
Replace YOUR_ACCESS_TOKEN
with your actual API key.
Endpoints
1. Full Data
Endpoint: /full_data
Method: POST
Description: Retrieves comprehensive information about a specified website.
Parameters:
website
(required): The URL of the website to analyze.callback
(optional): The callback URL for asynchronous response.
Code Example (Python):
import requests
import json
url = "https://scamminder.com/rest-api"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"endpoint": "full_data",
"website": "https://example.com"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
2. IP Data
Endpoint: /ip_data
Method: POST
Description: Provides data related to the IP address of the website.
Parameters:
website
(required): The website URL.callback
(optional): Callback URL for asynchronous response.
Code Example (Python):
import requests
import json
url = "https://scamminder.com/rest-api"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"endpoint": "ip_data",
"website": "https://example.com"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
3. AI Grammar
Endpoint: /ai_grammar
Method: POST
Description: Analyzes the grammar and readability of website content.
Parameters:
website
(required): The URL of the website to analyze.callback
(optional): The callback URL for asynchronous response.
Code Example (Python):
import requests
import json
url = "https://scamminder.com/rest-api"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"endpoint": "ai_grammar",
"website": "https://example.com"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
4. Scam Score
Endpoint: /scam_score
Method: POST
Description: Returns a scam score indicating the likelihood of the website being fraudulent.
Parameters:
website
(required): The URL of the website to analyze.callback
(optional): The callback URL for asynchronous response.
Code Example (Python):
import requests
import json
url = "https://scamminder.com/rest-api"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"endpoint": "scam_score",
"website": "https://example.com"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
5. Scam Status
Endpoint: /scam_status
Method: POST
Description: Provides a status report on whether a site is marked as a scam.
Parameters:
website
(required): The URL of the website to analyze.callback
(optional): The callback URL for asynchronous response.
Code Example (Python):
import requests
import json
url = "https://scamminder.com/rest-api"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"endpoint": "scam_status",
"website": "https://example.com"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
6. WHOIS Data
Endpoint: /whois_data
Method: POST
Description: Retrieves WHOIS information of the specified website.
Parameters:
website
(required): The URL of the website to analyze.callback
(optional): The callback URL for asynchronous response.
Code Example (Python):
import requests
import json
url = "https://scamminder.com/rest-api"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"endpoint": "whois_data",
"website": "https://example.com"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Response Format
All responses from the Scam Minder API are returned in JSON format. The typical structure of a response includes:
status
: Indicates the status of the request (e.g., success, error, queue).body
: Contains the requested data or an error message.
Example Response (JSON):
{
"status": "success",
"body": {
"website": "https://example.com",
"scam_score": 25,
"whois_data": { ... },
"ip_data": { ... }
}
}
Error Handling
In case of an error, the API returns a JSON object containing:
status
: Indicates an error occurred.body
: A descriptive error message.
Example Error Response:
{
"status": "error",
"body": "Invalid API key or malformed request."
}
Making a Request
To make a request to the Scam Minder API, you need to send a POST
request with the appropriate headers and body.
Sample Code (Python):
import requests
import json
url = "https://scamminder.com/rest-api"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"endpoint": "scam_score",
"website": "https://example.com"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Sample Code (PHP):
<?php
$url = "https://scamminder.com/rest-api";
$access_token = "YOUR_ACCESS_TOKEN";
$headers = array(
"Authorization: Bearer $access_token",
"Content-Type: application/json"
);
$data = json_encode(array(
"endpoint" => "scam_score",
"website" => "https://example.com"
));
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
This documentation provides all the necessary details to use the Scam Minder API for website analysis and scam detection. Replace placeholders like YOUR_ACCESS_TOKEN
and https://example.com
with actual values during use.