Perspective API Alternative: Toxicity Score API avatar

Perspective API Alternative: Toxicity Score API

Pricing

$0.50 / 1,000 text scoreds

Go to Apify Store
Perspective API Alternative: Toxicity Score API

Perspective API Alternative: Toxicity Score API

Google Perspective API alternative for comments, reviews and chat, before the 31 Dec 2026 shutdown. Seven scores (0-1) in a compatible format: toxicity, severe toxicity, insult, threat, profanity, identity attack, sexually explicit. Multilingual (EN, ES, FR, IT, PT, RU, TR). $0.50 per 1,000 texts.

Pricing

$0.50 / 1,000 text scoreds

Rating

0.0

(0)

Developer

Ferrolark

Ferrolark

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Features

Limited permissions

Share

Toxicity Score API: Perspective API Replacement (Multilingual)

Google's Perspective API shuts down on 31 December 2026. This Actor gives you the same kind of answer — a probability from 0 to 1 for each toxicity attribute — so your moderation queue, comment filter or research pipeline keeps working with a one-line change.

  • The 7 Perspective attributes: toxicity, severe_toxicity, insult, threat, profanity, identity_attack and sexual_explicit for every text.
  • Compatible format: send Perspective AnalyzeComment request bodies as they are ({"comment": {"text": ...}, "languages": [...], "requestedAttributes": {...}}) and turn on perspectiveFormat to get attributeScores.TOXICITY.summaryScore.value back.
  • A decision, not just numbers: flagged, flaggedAttributes and topLabel from thresholds you set (globally or per attribute).
  • Multilingual: trained on English, Spanish, French, Italian, Portuguese, Russian and Turkish; other languages work zero-shot.
  • No API key, no data sent to a third party: an open model (Detoxify multilingual, built on XLM-RoBERTa and trained on the Jigsaw datasets that Perspective itself came from) runs inside the Actor.
  • Bulk friendly: up to 20,000 texts per run, from a list or straight from an Apify dataset (for example a comments or reviews scraper).

Example

{
"texts": [
{"id": "en-2", "text": "You are a complete idiot and nobody wants you here."},
{"id": "en-3", "text": "If I ever see you again I will kill you."},
{"id": "es-2", "text": "Eres un imbécil, cállate ya."}
],
"threshold": "0.7"
}

Output (one row per text):

{"id": "en-2", "text": "You are a complete idiot and nobody wants you here.",
"toxicity": 0.9966, "severe_toxicity": 0.0016, "insult": 0.9858, "threat": 0.0015, "profanity": 0.055, "identity_attack": 0.0011, "sexual_explicit": 0.0025,
"flagged": true, "flaggedAttributes": ["toxicity", "insult"], "topLabel": "insult", "topScore": 0.9858,
"language": "auto", "languageSupport": "auto", "tokens": 14, "truncated": false}
TexttoxicityinsultthreattopLabel
Thanks for the quick reply, this fixed my problem!0.000.000.00none
You are a complete idiot and nobody wants you here.1.000.990.00insult
If I ever see you again I will kill you.0.990.080.94threat
Muchas gracias por la ayuda, me ha servido mucho.0.000.030.00none
Eres un imbécil, cállate ya.0.990.330.00toxicity
Como te vuelva a ver te mato.0.970.020.75threat

With no input at all the Actor scores these six sample texts, so you can see the output before sending your own.

Migrating from Perspective

PerspectiveThis Actor
POST comments:analyze with {"comment": {"text": ...}}Put the same objects in texts (one or thousands per call).
attributeScores.TOXICITY.summaryScore.valueSame path with perspectiveFormat: true, or flat toxicity.
SEVERE_TOXICITY, INSULT, THREAT, PROFANITY, IDENTITY_ATTACK, SEXUALLY_EXPLICITAll returned; requestedAttributes limits the Perspective-format block.
languagesOptional and informational; the model is multilingual and needs no hint.
API key + QPS quotaYour Apify token; batch up to 20,000 texts per run.

Scores come from a different model, so they are similar in meaning but not identical to Perspective's. Re-check your thresholds on a sample of your own data (start at 0.7, as with Perspective).

Price

  • $0.0005 per text scored (1,000 texts = $0.50; 100,000 = $50).
  • Not charged: empty texts, texts over 20,480 characters, and runs that fail before scoring.
  • Set Max total charge on the run to cap your spend; the Actor stops cleanly at that limit.

Input

FieldDefaultWhat it does
texts6 samplesStrings, {"id", "text"} objects or Perspective requests. Up to 20,000 per run (1,000 on the Apify free plan).
datasetIdnoneScore the items of an Apify dataset.
textField / idFieldautoWhich fields hold the text and the id (defaults: text, comment, content, body, message, review, title; id).
languageautoInformational; per-item languages also accepted.
threshold0.7Score at which an attribute is flagged.
thresholdsnonePer-attribute overrides, e.g. {"threat": 0.5}.
perspectiveFormatfalseAdds attributeScores and languages like Perspective's response.
requestedAttributesallLimits the Perspective-format block.
includeTexttrueTurn off to return only ids and scores.

The run's key-value store also gets an OUTPUT summary: texts scored, flags per attribute, top labels and timing.

Call it from code, n8n or an AI agent

curl -X POST "https://api.apify.com/v2/acts/ferrolark~toxicity-score-api/run-sync-get-dataset-items?maxTotalChargeUsd=0.05" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
-d '{"texts": ["You are a moron.", "Gracias por todo"], "perspectiveFormat": true}'

An importable n8n workflow (trigger → Actor → IF flagged) is in examples/n8n-workflow.json. In Make or Zapier, use the Apify "Run Actor" module and branch on flagged or topLabel.

Good to know

  • Speed: about 80 ms per short comment at the default 2 GB memory (1,000 comments in roughly 1.5 minutes); more memory adds CPU threads.
  • Each text is scored on its first 512 tokens (roughly 1,500–2,000 characters); longer texts are marked truncated: true.
  • Sub-attribute scores (insult, threat, profanity) are best calibrated in English. In other languages toxicity is the most reliable signal, which is why topLabel falls back to toxicity when no sub-attribute passes its threshold.
  • Implicit threats and sarcasm without offensive words can score low, as with any classifier of this kind. Use it to prioritise human review, not as the only judge.
  • Your texts are processed only inside the run and stored only in your own run's dataset.

FAQ

Do I need a Google, OpenAI or other API key?

No. The model is inside the Actor and its cost is included in the per-text price.

Is it really free of external calls?

Yes. Texts never leave the Apify run.

Can I use it commercially?

Yes. The model (Detoxify, by Unitary) is released under the Apache 2.0 licence.

More Ferrolark tools


Built by Ferrolark. Not affiliated with Google, Jigsaw or Unitary. "Perspective API" is mentioned only to describe compatibility.