Analyze
Timeseries

Get a time-aggregated dataset

Get a time-aggregated dataset.

POST
https://api.textreveal.com/api/2.0/analyze/timeserie

Request

Parameters

  • output_formatstring (enum)

    The output format of the final timeseries.

    Default: "json"Values: "json", "csv"

Request Body

  • instanceuuid

    The identifier of an analysis. This identifier have to be used to get results.

    Example: "a62caf56-5961-4fff-ba2e-6d4dcf98960f"
  • operands(string (enum))[]

    Operands that will be used for aggregation.

    Default: ["min", "max", "mean", "median"]Values: "min", "max", "mean", "median"
  • pivots(string (enum))[]

    Additional pivots (groups) to the date.

    Default: ["extract_day", "entity"]Values: "extract_day", "language", "entity", "site", "site_type", "country"
  • time_granularitystring (enum)

    Aggregation granularity period. Available options are 'day', 'hour', 'minute'

    Default: "day"Values: "day", "hour", "minute"
  • volume_onlyboolean

    Aggregation mode. Set to true to display only volumes

    Default: falseExample: false
Request
{
  "instance": "a62caf56-5961-4fff-ba2e-6d4dcf98960f",
  "operands": [
    "min",
    "max",
    "mean",
    "median"
  ],
  "pivots": [
    "extract_day",
    "language",
    "entity"
  ],
  "time_granularity": "day",
  "volume_only": false
}

Response

Response - 200

A timestamped array with custom indicators

  • []array
Response
[
  {
    "concept_sentiment_polarity": 0.147529,
    "concepts_keywords_count": {
      "pollution": {
        "pollution": 1
      }
    },
    "country": "string",
    "entity": "apple",
    "entity_max_anger": 0.99718827,
    "entity_max_anticipation": 0.9982167,
    "entity_max_fear": 0.9811126,
    "entity_max_joy": 0.99861634,
    "entity_max_negative": 0.9998697,
    "entity_max_neutral": 0.9679948,
    "entity_max_polarity": 0.9998068,
    "entity_max_polarity_exp": 0.73058915,
    "entity_max_positive": 0.9977102,
    "entity_max_sadness": 0.77819663,
    "entity_max_surprise": 0.9127892,
    "entity_max_trust": 0.9883493,
    "entity_mean_anger": 0.09166308,
    "entity_mean_anticipation": 0.34042513,
    "entity_mean_fear": 0.07668448,
    "entity_mean_joy": 0.22198433,
    "entity_mean_negative": 0.28851792,
    "entity_mean_neutral": 0.32175303,
    "entity_mean_polarity": 0.19259128,
    "entity_mean_polarity_exp": 0.52477163,
    "entity_mean_positive": 0.38972905,
    "entity_mean_sadness": 0.038473394,
    "entity_mean_surprise": 0.15694292,
    "entity_mean_trust": 0.07382667,
    "entity_median_anger": 0.017700193,
    "entity_median_anticipation": 0.2553157,
    "entity_median_fear": 0.023895262,
    "entity_median_joy": 0.11430361,
    "entity_median_negative": 0.21405028,
    "entity_median_neutral": 0.2941478,
    "entity_median_polarity": 0.27354315,
    "entity_median_polarity_exp": 0.5348652,
    "entity_median_positive": 0.35080644,
    "entity_median_sadness": 0.0130615225,
    "entity_median_surprise": 0.10009765,
    "entity_median_trust": 0.016967772,
    "entity_min_anger": 0.0000018979609,
    "entity_min_anticipation": 0.000030458179,
    "entity_min_fear": 0.000003519718,
    "entity_min_joy": 1.0755519e-7,
    "entity_min_negative": 0.00009640515,
    "entity_min_neutral": 0.00007480668,
    "entity_min_polarity": -0.99988925,
    "entity_min_polarity_exp": 0.26897794,
    "entity_min_positive": 0.000055367167,
    "entity_min_sadness": 0.0000036597391,
    "entity_min_surprise": 0.00003247154,
    "entity_min_trust": 6.151172e-7,
    "entity_volume_sentence": 2,
    "extract_day": "2019-01-31",
    "extract_hour": 2,
    "extract_minute": 48,
    "language": "english",
    "max_anger": 0.9996117,
    "max_anticipation": 0.99981934,
    "max_fear": 0.99742836,
    "max_joy": 0.9997067,
    "max_negative": 0.9998697,
    "max_neutral": 0.97831124,
    "max_polarity": 0.9998563,
    "max_polarity_exp": 0.7309262,
    "max_positive": 0.9993987,
    "max_sadness": 0.95701885,
    "max_similarity": 0.9513672,
    "max_surprise": 0.9837325,
    "max_trust": 0.9990107,
    "mean_anger": 0.07473226,
    "mean_anticipation": 0.29243448,
    "mean_fear": 0.087884925,
    "mean_joy": 0.24787717,
    "mean_negative": 0.2914804,
    "mean_neutral": 0.22759011,
    "mean_polarity": 0.26147643,
    "mean_polarity_exp": 0.5457621,
    "mean_positive": 0.4809295,
    "mean_sadness": 0.056699693,
    "mean_similarity": 0.7764126,
    "mean_surprise": 0.147281,
    "mean_trust": 0.09309049,
    "median_anger": 0.019531248,
    "median_anticipation": 0.18749999,
    "median_fear": 0.035461422,
    "median_joy": 0.16007276,
    "median_negative": 0.23828124,
    "median_neutral": 0.19018553,
    "median_polarity": 0.3217773,
    "median_polarity_exp": 0.5518798,
    "median_positive": 0.45312497,
    "median_sadness": 0.021301268,
    "median_similarity": 0.78224176,
    "median_surprise": 0.10388183,
    "median_trust": 0.024902342,
    "min_anger": 8.517259e-7,
    "min_anticipation": 0.0000061337932,
    "min_fear": 3.5336805e-7,
    "min_joy": 1.0755519e-7,
    "min_negative": 0.000071823655,
    "min_neutral": 0.000014854676,
    "min_polarity": -0.99988925,
    "min_polarity_exp": 0.26897794,
    "min_positive": 0.000055367167,
    "min_sadness": 6.245654e-7,
    "min_similarity": 0,
    "min_surprise": 0.000024277217,
    "min_trust": 2.5375562e-7,
    "site": "string",
    "site_type": "string",
    "volume_document": 5261,
    "volume_document_{concept}": 2,
    "volume_sentence": 159624,
    "volume_sentence_{concept}": 7,
    "{concept}_entity_sentence_mean_polarity": 0.147529,
    "{concept}_entity_sentence_volume": 2
  }
]

Response - 202

The instance is still in progress. Retry later.

Response - 204

No content. The instance has been stopped or an error occured within the instance.

Error

Error - 400

Bad request

  • fieldstring[]

    The field where the error happened.

    Example: "string"
Response
{
  "field": [
    "string"
  ]
}

Error - 404

Not Found

  • valuestring
Response
{
  "value": "string"
}

Generic errors are not shown, see Errors for more details.