> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Add entries

> Adds values to a dataset. Duplicates are ignored.

Adds values to a dataset. Duplicates are ignored. Changes are reflected immediately in `beam.contains("DATASET_NAME", [input.field1, input.field2])` lookups inside JavaScript transforms — no redeploy needed. See the [Datasets overview](/beam/api-reference/datasets/overview) for the full usage pattern.

**Path parameters:**

| Parameter    | Description |
| :----------- | :---------- |
| `dataset_id` | Dataset ID  |

**Request body:**

```json theme={null}
{
  "values": ["0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "0xc2132d05d31c914a87c6611c10748aeb04b58e8f"]
}
```

| Field    | Required | Description                   |
| :------- | :------- | :---------------------------- |
| `values` | Yes      | Array of string values to add |

```bash theme={null}
curl -X POST https://api.allium.so/api/v1/beam/datasets/${DATASET_ID}/entries \
  -H "X-API-Key: ${ALLIUM_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{ "values": ["0x3c499c542cef5e3811e1192ce70d8cc03d5c3359"] }'
```

**Response:**

```json theme={null}
{ "count": 1 }
```

## Uploading large datasets

Each request supports up to **250,000 values**. For larger datasets, split into chunks and upload in parallel. We recommend a maximum of **5 concurrent requests** to avoid overloading the database:

```python theme={null}
import asyncio
import httpx

CHUNK_SIZE = 250_000

async def upload_dataset(dataset_id: str, values: list[str], api_key: str):
    chunks = [values[i:i + CHUNK_SIZE] for i in range(0, len(values), CHUNK_SIZE)]
    semaphore = asyncio.Semaphore(5)  # max 5 concurrent requests

    async def upload_chunk(chunk: list[str]):
        async with semaphore:
            await client.post(
                f"https://api.allium.so/api/v1/beam/datasets/{dataset_id}/entries",
                json={"values": chunk},
                headers={"X-API-Key": api_key},
            )

    async with httpx.AsyncClient() as client:
        await asyncio.gather(*[upload_chunk(chunk) for chunk in chunks])
```

<Warning>
  Use **lowercase** values when filtering by addresses — this is how values are normalized in the system.
</Warning>


## OpenAPI

````yaml _openapi/beam-api.json POST /api/v1/beam/datasets/{dataset_id}/entries
openapi: 3.1.0
info:
  title: Allium Beam API
  description: Allium Beam — managed streaming pipelines on top of Allium Datastreams.
  version: 1.0.0
servers:
  - url: https://api.allium.so
security: []
paths:
  /api/v1/beam/datasets/{dataset_id}/entries:
    post:
      tags:
        - BEAM
      summary: Add Entries Handler
      operationId: add_entries_handler_api_v1_beam_datasets__dataset_id__entries_post
      parameters:
        - name: dataset_id
          in: path
          required: true
          schema:
            type: string
            title: Dataset Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetEntriesAddRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetEntryCountResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyBearer: []
components:
  schemas:
    DatasetEntriesAddRequest:
      properties:
        values:
          items:
            type: string
          type: array
          maxItems: 250000
          title: Values
      type: object
      required:
        - values
      title: DatasetEntriesAddRequest
    DatasetEntryCountResponse:
      properties:
        count:
          type: integer
          title: Count
      type: object
      required:
        - count
      title: DatasetEntryCountResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyBearer:
      type: apiKey
      in: header
      name: X-API-KEY

````