# Get an event

Fetch the latest revision of one event by id.

> Source: https://tokenearly.com/en/developers/rest/get-event · Docs index: https://tokenearly.com/en/developers/llms.txt · OpenAPI: https://api.tokenearly.com/v1/openapi.json

`GET https://api.tokenearly.com/v1/events/{id}`

Always returns the event's current revision. Events outside your topics return 404 (we do not distinguish missing from not permitted).

**Requires an API key**

## Parameters

| Parameter | In | Type | required | Description |
|---|---|---|---|---|
| `id` | path | string | ✓ | Event id, as returned by the list endpoint. |

## Example request

**cURL**

```bash
curl "https://api.tokenearly.com/v1/events/6b0ff643d0e4e92d84810499" \
  -H "Authorization: Bearer $TOKENEARLY_API_KEY"
```

**Python**

```python
import os, requests

resp = requests.get(
    "https://api.tokenearly.com/v1/events/6b0ff643d0e4e92d84810499",
    headers={"Authorization": f"Bearer {os.environ['TOKENEARLY_API_KEY']}"},
    timeout=10,
)
resp.raise_for_status()
print(resp.json())
```

**Node.js**

```javascript
// Node 18+ (built-in fetch)
async function main() {
  const resp = await fetch("https://api.tokenearly.com/v1/events/6b0ff643d0e4e92d84810499", {
    headers: { Authorization: `Bearer ${process.env.TOKENEARLY_API_KEY}` },
  });
  const body = await resp.json();
  if (!resp.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
  console.log(body);
}

main().catch((err) => {
  console.error(err);
  process.exit(1);
});
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.tokenearly.com/v1/events/6b0ff643d0e4e92d84810499", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("TOKENEARLY_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(body))
}
```

## Example response

```json
{
  "spec_version": "1.0",
  "id": "6b0ff643d0e4e92d84810499",
  "revision": 3,
  "action": "updated",
  "topic": "announcement.gate",
  "type": "announcement",
  "source": {
    "id": "gate",
    "name": "Gate.io"
  },
  "published_at": 1796208195,
  "published_at_ms": 1796208195000,
  "detected_at_ms": 1796208195896,
  "data": {
    "titles": {
      "zh": "Gate 已上线 RITUAL 合约交易、杠杆借贷交易、交易机器人、跟单、闪兑、定投功能",
      "en": "Gate Now Supports RITUAL for Futures Trading, Margin Loans, Bots, Copy, Convert, and Auto-Invest",
      "ko": "Gate는 RITUAL 계약 거래, 레버리지 대출 거래, 트레이딩 봇, 팔로우 트레이딩, 스왑, 정기 투자 기능을 출시했습니다."
    },
    "original_lang": "zh",
    "translated_langs": [
      "ko"
    ],
    "url": "https://www.gate.io/article/103112",
    "exchange_category": "listing",
    "listing": {
      "is_listing": true,
      "market": "futures"
    },
    "symbols": []
  }
}
```

## Errors

| Code | HTTP | Description |
|---|---|---|
| `missing_api_key` | 401 | No key sent. Use `Authorization: Bearer <key>`. |
| `invalid_api_key` | 401 | The key does not exist, or it was reset or revoked. |
| `key_expired` | 401 | The trial key has expired. Apply for a new trial key, or subscribe and create a regular key. |
| `plan_required` | 403 | Your plan does not include the developer API, or this part of it. |
| `ip_not_allowed` | 403 | The key has an IP allowlist and the request came from an address outside it. |
| `not_found` | 404 | No event with this id in your topics (GET /v1/events/{id}), or the requested path does not exist (e.g. a mistyped endpoint). |
| `rate_limited` | 429 | Over this key's request rate (REST and MCP combined; the interval is `limits.rest_interval_seconds` in `/v1/me`); wait `Retry-After` seconds and retry. |
