POST/sentiment
Analyze Sentiment Post
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"text": "string"
}
REQUEST
curl -X POST "https://api.textapi.com/sentiment" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "string"
}'
import requests
r = requests.post("https://api.textapi.com/sentiment", headers={"X-API-Key": "YOUR_KEY"}, json={
"text": "string"
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.textapi.com/sentiment", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"text": "string"
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE