- sentiment - Sentiment Analysis
Sentiment Analysis, 50 credits per call.
import os
from x_api_scraper import XapiScraper
with XapiScraper(
bearer_auth=os.getenv("X_API_SCRAPER_BEARER_AUTH", ""),
) as xapi_scraper:
res = xapi_scraper.analysis.sentiment(text="<value>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
text |
str | ✔️ | The text to analyze. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.SentimentAnalysisResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.XapiScraperDefaultError | 4XX, 5XX | */* |