Skip to main content
POST
/
api
/
query
/
execute
Execute Query
curl --request POST \
  --url https://gdeltcloud.com/api/query/execute \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "sql": "SELECT day, actor1_name, actor2_name, event_code, num_mentions FROM gdelt_events WHERE day >= '2025-01-01' AND action_geo_country_code = 'USA' ORDER BY num_mentions DESC LIMIT 10"
}
EOF
{
  "success": true,
  "data": [
    "<unknown>"
  ],
  "rows": 123,
  "execution_time": 123,
  "query_hash": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
sql
string
default:SELECT day, actor1_name, actor2_name, event_code, num_mentions FROM gdelt_events WHERE day >= '2025-01-01' AND action_geo_country_code = 'USA' ORDER BY num_mentions DESC LIMIT 10
required

SQL query to execute

Response

Successful response

success
boolean
required
data
any[]
required

Query results

rows
number
required

Number of rows returned

execution_time
number
required

Execution time in milliseconds

query_hash
string | null

Query hash for caching