---
title: "Add a batch of entities to a dataset given a list of graph representations of the entities."
method: POST
path: "/entity/add_batch"
tags: ["entity"]
---

# Add a batch of entities to a dataset given a list of graph representations of the entities.

`POST /entity/add_batch`

## Request body

- AddBatchParams
  - `attempt_merge` boolean — If true, attempt to merge with existing entities in the dataset
  - `dataset` string, required
  - `entity_graphs` LLMKnowledgeGraph[], required
    - `entities` LLMEntity[], required
      - `id` integer, required
      - `properties` object, required
      - `type` string, required
    - `relationships` LLMRelationship[]
      - `properties` object
      - `source` integer, required
      - `target` integer, required
      - `type` string, required
  - `skip_malformed_entities` boolean
  - `source` union
    - 'None'
    - object
      - `Web` string, required
    - object
      - `DocumentPage` object[], required
    - object
      - `SecFiling` object[], required

## Response `200`

Added entity ids

- EntityId[]

---

[API](https://skmtc.dev/structifyai/apis/structify.md) · [All operations](https://skmtc.dev/structifyai/apis/structify/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/structifyai/structify/revisions/1364930b6980/schema)
