ESG
Entities

Entities ESG Events Statistics

Get number of active events by period for one entity.

GET
https://api.textreveal.com/v3/entities/{entity_id}/esg/events/stats

If an event lasts for several days, it will be counted separately for each day.
This explains the differences in count between month and day aggregations.
A single event that lasts from the first day of the month to the last will be counted as 1 for that month, but will return ~30 results in a aggregation by day.

Request

Parameters

  • entity_id*uuid

    Unique identifier of the entity

  • sizeinteger

    Number of records per page

    Default: 10Range: [1, 1000]
  • search_afterstring

    search_after field value from the previous page

  • datedate (operator)

    Filters events whose last_activity is after the minimum bound and whose start_date is before the maximum bound.

    Example: "between:2022-01-01;2022-01-02"
  • periodstring (enum)

    Group results by period.

    Example: with period=week, the result will contain a value per week. If no event occurred during the week, the value will be 0.

    Default: "all"Values: "all", "day", "week", "month", "quarter", "year"
  • return_emptyboolean

    If true, the result will contain a period entry even if no event occurred during the period (with score=0).

    Default: true
  • categorystring (enum)

    Filter by category.

    Values: "E", "S", "G"
  • sub_category(string (enum))[]

    Filter by one or many sub_categories.

    Values: "Animal Welfare", "Atmospheric Pollution", "Biodiversity And Ecosystems", "Climate Change", "Energy & Natural Resources Management", "Environmental Misreporting", "Food Waste", "Industrial Accidents & Physical Risk", "Land And Soil Pollution", "Other Pollutions", "Waste Management", "Water Consumption", "Water Pollution", "Child Labor", "Community Health And Safety", "Customer Relations", "Diversity & Inclusion (Beyond The Workplace)", "Forced Labor", "Freedom Of Association And Collective Bargaining", "Fundamental Human Rights", "Occupational Health & Safety", "Rights Of Indigenous Communities", "Right To Property", "Social Misreporting", "Violation Of Human Rights In Conflict Or High Risk Zones", "Working Conditions", "Workplace Diversity & Inclusion", "Accounting And Securities Fraud", "Anti-Competitive Practices", "Board Of Directors & Senior Management", "Corruption And Bribery", "Csr Misreporting", "Data Privacy & Cyber Security", "Embezzlement", "Executive Pay", "Fraud", "Legal And Investigative Exposure", "Marketing & Communication", "Money Laundering", "Price Fixing", "Supply Chain", "Tax Strategy", "Terrorism Financing"

Response

Response - 200

Number of active events by period.

  • data*object[]

    Number of active events by period in the given range.

  • size*integer

    Number of records per page requested.

    Example: 1
  • has_next*boolean

    True if there are more records available.

    Example: true
  • count*integer

    Number of records returned in the current page.

    Example: 1
  • search_after*string | null

    Cursor for next page.

Response
{
  "data": [
    {
      "period_start_date": "2025-05-06",
      "period_end_date": "2025-05-13",
      "count": 27,
      "score": {
        "1": 10,
        "2": 4,
        "3": 7,
        "4": 0,
        "5": 6
      }
    }
  ],
  "size": 1,
  "has_next": true,
  "count": 1,
  "search_after": "string"
}