# Event Logs API
> Query any EVM contract's emitted event logs live via the chain's public JSON-RPC, filtered by address, topics and block range, with every log decoded — block, transaction hash, indexed topics and data. A convenience endpoint decodes ERC-20 Transfer events straight into from / to / value. Unlike a single-transaction receipt lookup, this answers "what happened on this contract over this window" — the indexing primitive behind every block explorer, analytics dashboard and on-chain webhook. Pass raw topic hashes or a known event name like Transfer or Approval. Works on any contract, verified or not, across Ethereum, Base, Arbitrum, Optimism, BNB, Polygon and more. Reads straight from the chain; live, short cache only.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/eventlogs-api/..."
```

## Pricing
- **Free** (Free) — 5,400 calls/Mo, 3 req/s
- **Starter** ($14/Mo) — 118,000 calls/Mo, 8 req/s
- **Pro** ($46/Mo) — 720,000 calls/Mo, 20 req/s
- **Business** ($134/Mo) — 4,700,000 calls/Mo, 50 req/s

## Endpoints

### Logs

#### `GET /v1/logs` — Query event logs by address, topics and block range

**Parameters:**
- `address` (query, optional, string) — Contract address to filter (0x + 40 hex) Example: `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`
- `topic0` (query, optional, string) — Event topic0: known name (Transfer(address,address,uint256)) or 32-byte hash Example: `Transfer(address,address,uint256)`
- `chain` (query, optional, string) — Chain name or id Example: `ethereum`
- `limit` (query, optional, string) — Max results (1-1000) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/eventlogs-api/v1/logs?address=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&topic0=Transfer%28address%2Caddress%2Cuint256%29&chain=ethereum&limit=25"
```

**Response:**
```json
{
    "data": {
        "logs": [
            {
                "data": "0x0000000000000000000000000000000000000000000000000000000001312d00",
                "topic0": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "topics": [
                    "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                    "0x000000000000000000000000e07dd0f7be387d93626277294e45eb7d740d4f15",
                    "0x000000000000000000000000ceaae54c5df4872415be60899d719bcef9ac7dea"
                ],
                "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                "removed": false,
                "log_index": 16,
                "block_number": 25314410,
                "transaction_hash": "0xc0ffd3829585cc7a1e7fdb31dc01e55859eede3d6c78cdaceb3a515c8e1613b0"
            },
            {
                "data": "0x000000000000000000000000000000000000000000000000000000000478d464",
                "topic0": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "topics": [
                    "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                    "0x000000000000000000000000ee7ae85f2fe2239e27d9c1e23fffe168d63b4055",
                    "0x000000000000000000000000cb0996508ece1b8aef6a8fa73d446c12059a252d"
                ],
                "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                "removed": false,
                "
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/transfers` — ERC-20 Transfer events for a token, decoded into from/to/value

**Parameters:**
- `address` (query, required, string) — Token contract address (0x + 40 hex) Example: `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`
- `chain` (query, optional, string) — Chain name or id (ethereum, base, arbitrum, optimism, bsc, polygon...) Example: `ethereum`
- `limit` (query, optional, string) — Max results (1-1000) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/eventlogs-api/v1/transfers?address=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&chain=ethereum&limit=25"
```

**Response:**
```json
{
    "data": {
        "note": "ERC-20 Transfer events for the token, decoded into from/to/value (raw integer — divide by the token's decimals). Default range is the last 5 blocks.",
        "chain": "ethereum",
        "count": 25,
        "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "source": "public JSON-RPC (publicnode)",
        "to_block": 25314414,
        "transfers": [
            {
                "to": "0xceaae54c5df4872415be60899d719bcef9ac7dea",
                "from": "0xe07dd0f7be387d93626277294e45eb7d740d4f15",
                "value": "20000000",
                "log_index": 16,
                "block_number": 25314410,
                "transaction_hash": "0xc0ffd3829585cc7a1e7fdb31dc01e55859eede3d6c78cdaceb3a515c8e1613b0"
            },
            {
                "to": "0xcb0996508ece1b8aef6a8fa73d446c12059a252d",
                "from": "0xee7ae85f2fe2239e27d9c1e23fffe168d63b4055",
                "value": "75027556",
                "log_index": 17,
                "block_number": 25314410,
                "transaction_hash": "0x0d28185deb3abbf0e439c24f11fd86a0b18102f00cfebf2d7f605bd79abebd60"
            },
            {
                "to": "0xdd3d72c53ff982ff59853da71158bf1538b3ceee",
                "from": "0xc3fb00546e97ece80022c35c64ddac7c3d09c6a7",
                "value": "107100000",
                "log_index": 27,
                "block_number": 25314410,
                "transaction_hash": "0xcfbf75c9ffbca1505ac0e846a6
…(truncated, see openapi.json for full schema)
```

### Reference

#### `GET /v1/events` — Known event signatures and their topic0 hashes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/eventlogs-api/v1/events"
```

**Response:**
```json
{
    "data": {
        "note": "Known event signatures and their topic0 hashes. Pass a signature as topic0/event on /v1/logs, or supply any raw 32-byte topic hash.",
        "count": 10,
        "events": [
            {
                "topic0": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "signature": "Transfer(address,address,uint256)"
            },
            {
                "topic0": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                "signature": "Approval(address,address,uint256)"
            },
            {
                "topic0": "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62",
                "signature": "Transfer(address,address,uint256,uint256)"
            },
            {
                "topic0": "0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31",
                "signature": "ApprovalForAll(address,address,bool)"
            },
            {
                "topic0": "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62",
                "signature": "TransferSingle(address,address,address,uint256,uint256)"
            },
            {
                "topic0": "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822",
                "signature": "Swap(address,uint256,uint256,uint256,uint256,address)"
            },
            {
                "topic0": "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata, supported chains & live sample

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/eventlogs-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "chains": [
            "ethereum",
            "base",
            "arbitrum",
            "optimism",
            "bsc",
            "polygon",
            "avalanche",
            "gnosis",
            "fantom",
            "linea",
            "scroll",
            "blast"
        ],
        "limits": {
            "max_block_range": 200,
            "default_range_blocks": 5
        },
        "sample": {
            "chain": "ethereum",
            "blocks": "25314410..25314414",
            "transfers": 100
        },
        "source": "public JSON-RPC nodes (publicnode.com) via eth_getLogs; decoding computed locally",
        "service": "eventlogs-api",
        "endpoints": {
            "GET /v1/logs": "Query logs by address/topics/block-range, decoded (chain, address, topic0..topic3, fromBlock, toBlock, limit).",
            "GET /v1/meta": "This document.",
            "GET /v1/events": "Known event signatures and their topic0 hashes.",
            "GET /v1/transfers": "ERC-20 Transfer events for a token decoded into from/to/value (chain, address, fromBlock, toBlock, limit)."
        },
        "description": "Query any EVM contract's emitted event logs live via eth_getLogs, filtered by address, topics and block range, with each log decoded. A convenience endpoint decodes ERC-20 Transfer events into from/to/value. The indexing primitive behind explorers, analytics and webhooks. Works on any contract. Live, short cache only.",
        "upstre
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/eventlogs-api
OpenAPI spec: https://www.oanor.com/api/eventlogs-api/openapi.json
