---
title: "Interpret sentiment"
section: "frontend/predictions"
platforms: ["angular", "javascript", "nextjs", "react", "react-native", "vue"]
gen: 2
last-updated: "2026-03-25T17:40:00.000Z"
url: "https://docs.amplify.aws/react/frontend/predictions/interpret-sentiment/"
---

export async function getStaticPaths() {
  return getCustomStaticPath(meta.platforms);
}

<Callout informational>

**Note:** Make sure to complete the [getting started](/[platform]/build-a-backend/add-aws-services/predictions/set-up-predictions/) section first, where you will set up the IAM roles with the right policy actions

</Callout>

## Working with the API

Analyze text to find key phrases, sentiment (positive, negative, neutral), or the syntax (pronouns, verbs, etc.). You can also find entities in the text such as names or places, or perform language detection.

```ts
import { Predictions } from '@aws-amplify/predictions';

const result = await Predictions.interpret({
  text: {
    source: {
      text: textToInterpret,
    },
    type: 'ALL'
  }
})
```
