Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 2.16 KB

File metadata and controls

48 lines (30 loc) · 2.16 KB

Analysis

Overview

Available Operations

sentiment

Sentiment Analysis, 50 credits per call.

Example Usage

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)

Parameters

Parameter Type Required Description
text str ✔️ The text to analyze.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.SentimentAnalysisResponse

Errors

Error Type Status Code Content Type
errors.HTTPValidationError 422 application/json
errors.XapiScraperDefaultError 4XX, 5XX */*