---
title: "Sentiment histogram for a GDELT query"
method: GET
path: "/gdelt/tonechart"
tags: ["GDELT"]
---

# Sentiment histogram for a GDELT query

`GET /gdelt/tonechart`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/gdelt/tonechart`
- Auth: API key in header `x-api-key`

Returns a sentiment histogram for the required GDELT `query`: one bin per integer tone value, each with an article `count` and a short sample of top articles with title and URL. Filter with `country`, `language`, `domain`, and `timespan` or `from` and `to`. A tone value with no matching articles is absent rather than returned with a zero count.

## Query parameters

- `query` string, required
- `country` string
- `language` string
- `domain` string
- `timespan` string
- `from` string
- `to` string

## Headers

- `x-api-key` string, required

## Response `200`

OK

- GdeltToneChartResponseDoc
  - `code` integer
  - `data` GdeltToneChartResponse
    - `bins` GdeltToneChartBin[]
      - `bin` integer
      - `count` integer
      - `top_articles` GdeltToneChartArticle[]
        - `title` string
        - `url` string
    - `fetched_at` string
    - `query` string
    - `source_url` string
  - `msg` string

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/0497899e2016?raw)
