Perspective API shutdown: a migration checklist for 31 December 2026
Last updated:
⏳ 87 days left — the old API shuts down December 31, 2026.
Google says Perspective API access continues only until December 31, 2026, and it stopped accepting new usage and quota requests in February 2026. Inventory the attributes and thresholds you rely on, compare replacements on your own comments in shadow mode, and cut over well before the deadline (perspectiveapi.com).
Facts on this page were checked against perspectiveapi.com and the Perspective drop-in's README on October 4, 2026.
Google says it "will not be offering direct migration support", and it names no replacement. Treat the quota you have today as the most you will ever get.
The timeline
| Date | What happens |
|---|---|
| February 2026 | Google stops handling new usage and quota-increase requests |
| Now to mid-December 2026 | Your window to inventory, choose, test and cut over |
| December 31, 2026 | Last day of service ("The service will remain active until December 31, 2026") |
| January 1, 2027 | Expect calls to commentanalyzer.googleapis.com to fail (Google has not said how) |
Checklist
1. Find every caller
- Search your code for
commentanalyzer.googleapis.com,comments:analyze,perspective-api-client,peRspective,discourse-perspective-apiandGOOGLE_API_DOMAIN. - Check plugins and bots you did not write: Discourse, Discord moderation bots, CMS comment plugins.
- Check offline uses: research scripts, dashboards and stored scores that assume Perspective's 0–1 TOXICITY scale.
2. Write down what each caller depends on
- Which attributes (TOXICITY, SEVERE_TOXICITY, INSULT, THREAT, IDENTITY_ATTACK, PROFANITY, SEXUALLY_EXPLICIT, or the experimental ones).
- Which languages.
- Which thresholds trigger an action (hide, queue for review, block).
- Whether anything parses
spanScores,languagesorclientToken.
3. Choose a replacement
| If you need… | Choose |
|---|---|
| No code changes; same request and JSON | A wire-compatible drop-in such as the Perspective drop-in on Apify ($1 per 1,000 comments; 7 attributes, 7 languages, PROBABILITY scores only) |
| Free, and you can rewrite the call and re-tune | OpenAI's moderation endpoint (omni-moderation-latest, free) |
| You already run on Azure | Azure AI Content Safety (free F0 tier of 5,000 text records a month (a text record is up to 1,000 characters); see what changes from Content Moderator) |
| Full control, no third party | Self-host the open Detoxify models |
Only the first option keeps the Perspective request and response. The others use different categories and score scales, so thresholds and stored data need re-mapping.
4. Re-tune on your own comments
- Export a sample of a few hundred real comments, including borderline ones.
- Score them with both Perspective, while it still works, and the replacement.
- Compare decisions at your current thresholds, not just raw scores. Adjust thresholds until the hide/review/allow decisions match what you want.
5. Cut over safely
- Put the endpoint and credentials in configuration, not code.
- Run both side by side (shadow mode) for a week if you can.
- Switch before mid-December, not on December 31: holiday change freezes and the final-day rush are real risks.
- Keep the old code path behind a flag until January, then delete it.
- Write down a rollback: which flag flips back, who decides, and which metric triggers it (for example, the hide rate moving more than you accept).
- Keep the shadow-test results (sample, thresholds, agreement rate, date) with the change, so the decision can be audited later.
6. After January 1, 2027
- Confirm nothing still calls
commentanalyzer.googleapis.com. Watch your logs for its errors. - Update documentation and runbooks that mention Perspective.
Minimal change with the drop-in
With the drop-in, step 5 is a two-line diff: the host and the credential.
- POST https://commentanalyzer.googleapis.com/v1alpha1/comments:analyze?key=$GOOGLE_API_KEY
+ POST https://dropin-apis--perspective-compat.apify.actor/v1alpha1/comments:analyze
+ Authorization: Bearer $APIFY_TOKENFull curl, Python and Node.js examples are on the Perspective API replacement page.
FAQ
When exactly does the Perspective API stop working?
Google says "The service will remain active until December 31, 2026." Plan for requests to fail from January 1, 2027.
Can I still request a Perspective API key or more quota?
No. Google says usage and increased-quota requests were addressed only until February 2026, and it no longer accepts new requests.
Do I have to change my code to replace Perspective?
Only if you switch to a different API, such as OpenAI moderation or Azure AI Content Safety. With a wire-compatible drop-in, you change the host and the credential, and the request and response stay the same.
Will scores be identical after the migration?
No replacement reproduces Google's private models exactly. Open Detoxify models agree on clear cases but can differ on borderline comments. Re-tune your thresholds on a sample of real comments before you cut over.
What happens if I do nothing?
From January 1, 2027, calls to the Perspective API fail. Depending on your error handling, comments may then be published without screening or not published at all.
Related
- Up: all retiring-API guides
- Next: Azure Content Moderator to Content Safety
- Keep the Perspective request on Apify ($1 per 1,000 comments)