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

# /get/graph/entities

```
URL: http://<db.host>:<db.port>/get/graph/entities
```

Retrieves node or edge entities from an existing graph, with pagination support
via offset and limit. Use [/show/graph](/content/api/rest/show_graph_rest) to
obtain the total number of nodes and edges.

## Input Parameter Description

<ParamField body="graph_name" type="string">
  Name of the graph from which to retrieve entities.
</ParamField>

<ParamField body="offset" type="long">
  Starting index of the entities to retrieve (0-based).

  The default value is 0.
</ParamField>

<ParamField body="limit" type="long">
  Number of entities to retrieve starting from input parameter *offset*. A value of -1 returns all entities from the offset to the end. Note: the output parameter *entities\_int* or output parameter *entities\_string* array size will be 2x this value for nodes (stride 2) or 4x for edges (stride 4).

  The default value is 10000.
</ParamField>

<ParamField body="options" type="map of string to strings">
  Optional parameters.

  The default value is an empty map ( \{} ).

  <Expandable title="options">
    <ParamField body="entity_type">
      The type of entity to retrieve.

      The default value is `edge`.

      * **edge**: Retrieve edge entities (default).
      * **node**: Retrieve node entities.
    </ParamField>

    <ParamField body="server_id">
      Indicates which graph server to send the request to. Required when the graph is distributed across multiple servers.

      The default value is `0`.
    </ParamField>

    <ParamField body="concise_edge_connectivity">
      When true, edges are emitted in a compact connectivity form regardless of the graph's identifier type: Output parameter *entities\_int* contains stride-4 records \[edge\_id, node1\_index, node2\_index, edge\_label\_index] where node1\_index/node2\_index are 0-based positions into the node array (obtained from a node-entity call on the same graph). When requesting nodes with this option, the response includes tombstoned (deleted) slots in order to keep position indices stable so edge indices resolve correctly; deleted slots carry id=0 for integer graphs or an empty identifier for string/WKT graphs. For paginated node calls, subtract input parameter *offset* from an edge endpoint index to locate it within the returned page.

      The default value is `false`.

      * **true**: Compact integer connectivity for edges; deleted node slots included in node output.
      * **false**: Default: edges emit node identifiers (int/string/WKT) matching the graph; deleted nodes are skipped.
    </ParamField>

    <ParamField body="include_weights">
      When true and input parameter *options entity\_type* is 'edge', the response output parameter *entities\_weight* array is populated with one float weight per emitted edge (aligned 1:1 with the edge records in output parameter *entities\_int* or output parameter *entities\_string*). Empty when the graph has no weights component or when requesting nodes.

      The default value is `false`.

      * **true**: Populate output parameter *entities\_weight* with per-edge weights (edge requests only).
      * **false**: Default: Output parameter *entities\_weight* is empty.
    </ParamField>
  </Expandable>
</ParamField>

## Output Parameter Description

The Kinetica server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query.  Here is a description of the various fields of the wrapper:

<ResponseField name="status" type="String">
  'OK' or 'ERROR'
</ResponseField>

<ResponseField name="message" type="String">
  Empty if success or an error message
</ResponseField>

<ResponseField name="data_type" type="String">
  'get\_graph\_entities\_response' or 'none' in case of an error
</ResponseField>

<ResponseField name="data" type="String">
  Empty string
</ResponseField>

<ResponseField name="data_str" type="JSON or String">
  This embedded JSON represents the result of the /get/graph/entities endpoint:

  <Expandable title="data_str">
    <ResponseField name="result" type="boolean">
      Indicates a successful retrieval.
    </ResponseField>

    <ResponseField name="entities_int" type="array of longs">
      Flat array of entity data for integer-identifier graphs with a repeating stride. For node entities (stride 2): \[node\_id, label\_index, ...]. For edge entities (stride 4): \[edge\_id, node1\_id, node2\_id, label\_index, ...]. Populated when the graph uses integer identifiers; empty otherwise. The label\_index is a 1-based index into the output parameter *labels* array; 0 indicates no label. When the request option 'concise\_edge\_connectivity' is 'true', this array is also used (regardless of graph identifier type) for edge entities and carries \[edge\_id, node1\_index, node2\_index, edge\_label\_index] where node1\_index/node2\_index are 0-based positions into the node array returned from a paired node call on the same graph.
    </ResponseField>

    <ResponseField name="entities_string" type="array of strings">
      Flat array of entity data for name-identifier (string) graphs only. For node entities (stride 2): \[node\_name, label\_index, ...]. For edge entities (stride 4): \[edge\_id, node1\_name, node2\_name, label\_index, ...]. Populated only when the graph uses string identifiers. Empty for integer-identifier graphs (data goes to output parameter *entities\_int*) and for WKT/geo-XY graphs (data always goes to output parameter *entities\_double* — 'POINT(x y)' strings are never emitted). The label\_index is a string representation of a 1-based index into the output parameter *labels* array; '0' indicates no label.
    </ResponseField>

    <ResponseField name="entities_double" type="array of doubles">
      Compact double-packed payload for WKT (geo/XY) graphs. WKT graphs ALWAYS use this array — 'POINT(x y)' strings are never emitted anywhere. Stride 3 for nodes: \[x, y, label\_index, ...]. Stride 6 for edges (non-concise): \[edge\_id, x0, y0, x1, y1, label\_index, ...]. Empty for non-WKT graphs and when concise mode emits edges into output parameter *entities\_int* instead. label\_index/edge\_id occupy double slots (representable exactly up to 2^53). When 'concise\_edge\_connectivity' is 'true' and entity\_type is 'node', tombstoned (deleted) WKT slots emit \[0.0, 0.0, 0.0] to keep position indices stable. Roughly 4x smaller on the wire than 'POINT(x y)' strings and avoids any client-side regex parse.
    </ResponseField>

    <ResponseField name="entities_weight" type="array of floats">
      Per-edge weight values, populated only when the request option 'include\_weights' is 'true' and input parameter *options entity\_type* is 'edge'. Stride 1, aligned 1:1 with the edge records emitted in output parameter *entities\_int* or output parameter *entities\_string* (i.e. the i-th weight corresponds to the i-th edge record). Empty when the graph has no weights component, when requesting nodes, or when the option is not set. Single-precision float matches the graph server's native weight storage.
    </ResponseField>

    <ResponseField name="labels" type="array of strings">
      Array of distinct label strings. The label\_index values in output parameter *entities\_int*, output parameter *entities\_string*, or output parameter *entities\_double* are 1-based indexes into this array; index 0 means no label.
    </ResponseField>

    <ResponseField name="info" type="map of string to strings">
      Additional information map. Contains the following keys: 'identifier\_type' — describes the graph's native node identifier type: 'int', 'string', or 'wkt' (geo/XY graph). 'payload\_type' — describes which array actually holds this response payload: 'int' (output parameter *entities\_int*), 'string' (output parameter *entities\_string*), or 'double' (output parameter *entities\_double*). WKT graphs ALWAYS use 'double' for both nodes and edges — 'POINT(x y)' strings are never emitted. In concise edge mode payload\_type is 'int' regardless of graph type. Clients should dispatch on 'payload\_type', not 'identifier\_type', to parse the response. 'total\_count' — total number of entities available in the graph for the requested entity\_type, used for pagination; this is the live (non-deleted) count by default, or the raw count (including deleted slots) when 'concise\_edge\_connectivity' is true for a node request. 'status\_message' — set to 'Cancelled' if the request was cancelled mid-iteration (with output parameter *result* set to false). 'concise\_edge\_connectivity' — set to 'true' when the response was produced with the concise option (edges emitted as \[edge\_id, v0\_index, v1\_index, label\_idx] in output parameter *entities\_int*; WKT-graph nodes emitted as \[x, y, label\_idx] in output parameter *entities\_double*; non-WKT nodes still in their native array; node output includes deleted slots to keep indices stable). 'include\_weights' — set to 'true' when output parameter *entities\_weight* is populated.
    </ResponseField>
  </Expandable>

  Empty string in case of an error.
</ResponseField>
