# Discourse Google Perspective API

**URL:** https://meta.discourse.org/t/discourse-google-perspective-api/98733
**Category:** Plugin
**Tags:** perspective-api
**Created:** [October 5, 2018, 6:34am UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733 "2018-10-05T06:34:51Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [October 5, 2018, 6:34am UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733/1 "2018-10-05T06:34:51Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Google Perspective API** is the official Google Perspective API plugin for Discourse |
| 🛠 | **Repository Link** | [https://github.com/discourse/discourse-perspective-api](https://github.com/discourse/discourse-perspective-api) |
| 📖 | **Install Guide** | [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) |

> [@](#):
>
> :discourse2: As this is an #official plugin maintained by the Discourse team, #Support, #Contribute > Bug, #Contribute > UX, and #Contribute > Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate plugin tag. Click on a link below to get one started. 👍
> 
> [❓&nbsp; **Support**](https://meta.discourse.org/new-topic?category_id=6&body=%3E%20Before%20asking,%20did%20you%20search%20first%3F%20Press%20%F0%9F%94%8D%20at%20the%20upper%20right%20to%20search.&tags=perspective-api "Ask for support on configuring and using Discourse Google Perspective API") [🐛&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=perspective-api "A bug report means something is broken, preventing normal/typical use of the plugin") [👀&nbsp; **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=perspective-api "Discussion about the user interface of Discourse Google Perspective API, and how features are presented (including language and UI elements)") [💡&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=perspective-api "Discussion about how existing Discourse Google Perspective API features can be improved or enhanced, and how proposed new features could work")

### Features

#### What is the Perspective API?

> **[Perspective API](https://www.perspectiveapi.com/)**
>
> Perspective API is a free developer tool that helps platforms host conversations that flourish - on their own terms.

From [the official site](https://www.perspectiveapi.com/), “Perspective is an API that makes it easier to host better conversations.The API uses machine learning models to score the perceived impact a comment might have on a conversation. This model was trained by asking people to rate internet comments on a scale from _very toxic_ to _very healthy_ contribution. Toxic is defined as… a rude, disrespectful, or unreasonable comment that is likely to make you leave a discussion.”

#### What can the discourse-perspective-api plugin do?

- Prompt users if they are sure about submitting a potentially toxic post, before submit.
- Automatically flag toxic posts for moderators and admins to review.
- Optionally scan private categories and PM’s for toxic content

### Configuration

#### Where do I get a Perspective API key?

Follow these instructions to create a Google Cloud account and gain access to an API key.

> **[Perspective | Developers](https://developers.perspectiveapi.com/s/docs-get-started?language=en_US)**

The API can be used free of cost, here are the [API Reference docs.](https://developers.perspectiveapi.com/s/about-the-api)

#### Site Settings Walkthrough

_(Admin → Type ‘perspective’ in the Filter text field)_

The API is currently only available for the English language.  
The default thresholds are set to be reasonably high but these settings offer some customizability for fine-tuning how this plugin works. Play around with the live demo on the official docs linked above to get a sense of how the thresholds will behave.

- **perspective\_enabled:**  
Enable the plugin for filtering potentially toxic posts.

- **perspective\_toxicity\_model:**  
Choose toxicity model for Google’s Perspective API. Read more about how these models are developed by reading the [API Reference docs.](https://developers.perspectiveapi.com/s/about-the-api-methods)

- **perspective\_notify\_posting\_min\_toxicity\_enable:**  
Enable the checking of potentially toxic content while a user is trying to submit a post and push a notification in the composer when a user writes something toxic.

- **perspective\_flag\_post\_min\_toxicity\_enable:**  
Flag possible toxic posts that have already been submitted and send messages to notify moderators for posts that have been submitted. Admins/Moderators are notified about the flagged posts.

- **perspective\_google\_api\_key:**  
API key for the Perspective API that you have received after completing the registration process mentioned above.

- **perspective\_check\_private\_message:**  
Check and flag private messages if toxic.  
**Note:** The content of the PM will be sent to moderators/admins.  
Also applies to backfill mode.

- **perspective\_check\_secured\_categories:**  
Additionally check private categories for toxic content by enabling this setting.

- **perspective\_backfill\_posts:**  
Query toxicity for existing posts and record the results in post custom fields.  
Enabling this mode disables online checking for posts.

- **perspective\_historical\_inspection\_period:**  
The period in days to start a new query iteration after finishing last iteration. Used only if `perspective_backfill_posts` is enabled.

#### Screenshots

##### What a user sees when trying to submit a toxic post:

 ![1](https://global.discourse-cdn.com/meta/original/3X/0/8/08956bd12a587976c12bca135bb87f510028b3a2.png)

##### What admins/moderators see when a toxic post is submitted:

 ![2](https://global.discourse-cdn.com/meta/original/3X/f/c/fcbc793f31aeeed5b4ab287f8c92e3fab785a77c.png)

### CHANGELOG

### TODO

* * *

Big thanks to @fantasticfears for creating this plugin!

> Last edited by @rishabh 2026-03-06T10:41:05Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![gru](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gru/32/374964_2.png) [@gru](https://meta.discourse.org/u/gru)
#### Post date: [June 6, 2024, 1:42am UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733/46 "2024-06-06T01:42:50Z")

</div>

> [@Discourse](#):
>
> The API is currently only available for the English language.

Looks like API has been updated and now supports more languages, like Russian. When will be update for extending support in plugin?

---

<div class="post-metadata">

### Author: ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)
#### Post date: [August 10, 2024, 1:53pm UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733/47 "2024-08-10T13:53:05Z")

</div>

same question. Can it works for the portuguese language, as it’s supported by the API currently?

EDIT: I tested it and it works perfectly in Portuguese language.

I’m loving it.

---

<div class="post-metadata">

### Author: ![eisammy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eisammy/32/528804_2.png) [@eisammy](https://meta.discourse.org/u/eisammy)
#### Post date: [January 3, 2026, 10:25pm UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733/48 "2026-01-03T22:25:41Z")

</div>

Something new about this API? Sincerely I wish to know if someone else are still using and if have something to say

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 4, 2026, 1:34am UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733/49 "2026-01-04T01:34:18Z")

</div>

Our customers are using the “Triage by Persona” feature on the Discourse AI plugin, that can do everything this does but allows for flexibility for the specificities of each community.

---

<div class="post-metadata">

### Author: ![eisammy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eisammy/32/528804_2.png) [@eisammy](https://meta.discourse.org/u/eisammy)
#### Post date: [January 4, 2026, 7:24pm UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733/50 "2026-01-04T19:24:05Z")

</div>

Gemini Flash 2.0 it’s not more enough for my community, basically I do not have a toxicity tool except this API but it’s okay I’ll think about it later.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 4, 2026, 7:26pm UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733/51 "2026-01-04T19:26:05Z")

</div>

> [@eisammy](#):
>
> Gemini Flash 2.0

Gemini Flash 2.0 is now several versions behind, try using the current version of Gemini Flash.

---

<div class="post-metadata">

### Author: ![AquaL1te](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aqual1te/32/201966_2.png) [@AquaL1te](https://meta.discourse.org/u/AquaL1te)
#### Post date: [January 12, 2026, 6:34pm UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733/52 "2026-01-12T18:34:46Z")

</div>

> **Important Notice:** Perspective API is sunsetting and service is officially ending after 2026.

> **[Perspective API](https://www.perspectiveapi.com/)**
>
> Perspective API is a free developer tool that helps platforms host conversations that flourish - on their own terms.

I suppose we can switch to general LLM solutions? Just like with the spam filtering? Is there a roadmap I can subscribe to?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 12, 2026, 6:50pm UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733/53 "2026-01-12T18:50:42Z")

</div>

> [@AquaL1te](#):
>
> I suppose we can switch to general LLM solutions?

Yes, use AI + Automation as said above

> [@Falco](#):
>
> Our customers are using the “Triage by Persona” feature on the Discourse AI plugin, that can do everything this does but allows for flexibility for the specificities of each community.

---

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [September 10, 2026, 5:24pm UTC](https://meta.discourse.org/t/discourse-google-perspective-api/98733/55 "2026-09-10T17:24:17Z")

</div>

I was just disabling this plugin on my forum, and I noticed that the Perspective API is being shut down this year: [https://www.perspectiveapi.com/](https://www.perspectiveapi.com/)
