Fake Review Detection API

Protect your platform from spam, fake reviews, and irrelevant comments using our lightweight filtering API.

Features

Spam Detection

Detect promotional spam like telegram links, crypto scams, and marketing messages.

Product Relevance

Ensure reviews actually relate to the product category using keyword datasets.

Fake Review Score

Every review is assigned a fake score and automatically approved, flagged, or rejected.

API Integration

Simple JSON API that can be connected with any website or mobile application.

API Documentation

The ReviewShield API allows any website or application to automatically detect fake, spam, or irrelevant product reviews before publishing them.

Your system sends a review to our API, and the API analyzes the content using multiple filtering rules such as spam detection, keyword relevance, and pattern analysis. The API then returns a decision indicating whether the review should be approved, flagged for moderation, or rejected.


1. API Endpoint

POST /api/check_review.php

This endpoint receives review data in JSON format and returns a filtering decision.


2. Authentication

Every request must include an API Key. The API key uniquely identifies your application or website.

After registering an account, you will receive your API key inside your dashboard. This key must be included in every request.

"api_key":"YOUR_API_KEY"

3. Request Format

The API accepts requests in JSON format. The request body must include information about the review and the product category.

JSON Structure

{ "api_key":"YOUR_API_KEY", "category":"laptop", "review":"Great battery life and fast processor", "rating":5 }

4. Request Parameters

Parameter Type Required Description
api_key string Yes Unique API key issued to your account.
category string Yes Product category such as laptop, phone, shoes.
review text Yes The user review content to be analyzed.
rating integer Optional Product rating between 1–5.

5. Response Format

The API returns a JSON response containing the filtering decision and the calculated fake review score.

{ "status":"approved", "fake_score":0 }

6. Status Values

Status Meaning
approved The review appears legitimate and can be published automatically.
flagged The review may be suspicious and should be manually reviewed by a moderator.
rejected The review is considered spam, fake, or unrelated to the product.

7. Fake Score System

The API assigns a fake score to each review based on different filters. Higher scores indicate a higher probability of spam or fake content.

0 – 30 → Approved 31 – 60 → Flagged 61+ → Rejected

The score is calculated based on multiple rules such as:


8. Example Request Using JavaScript

fetch("https://yourdomain.com/api/check_review.php",{ method:"POST", headers:{ "Content-Type":"application/json" }, body:JSON.stringify({ api_key:"YOUR_API_KEY", category:"laptop", review:"Amazing performance and fast processor", rating:5 }) }) .then(res=>res.json()) .then(data=>console.log(data));

9. Example Request Using PHP

$data = [ "api_key" => "YOUR_API_KEY", "category" => "laptop", "review" => "Great battery life and performance", "rating" => 5 ]; $options = [ "http" => [ "method" => "POST", "header" => "Content-Type: application/json", "content" => json_encode($data) ] ]; $response = file_get_contents( "https://yourdomain.com/api/check_review.php", false, stream_context_create($options) ); echo $response;

10. Error Response

If the API key is invalid or missing, the API will return an error response.

{ "status":"error", "message":"Invalid API key" }

11. Integration Workflow

  1. User submits a review on your website.
  2. Your server sends the review to the ReviewShield API.
  3. The API analyzes the review content.
  4. The API returns a decision (approved / flagged / rejected).
  5. Your system decides whether to publish the review.

12. Best Practices