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

# List Ingested Data

> Retrieve metadata from documents ingested into Unstructured.

## Request Body

| Field                      | Type                | Description                                           |
|----------------------------|---------------------|-------------------------------------------------------|
| `data_connector_name`      | `str`               | Name of the data connector to query.                  |
| `group_by`                 | `str`               | Group results by `file` or `node`. Default: `file`.   |
| `metadata_keys`            | `List[str]`         | Specific metadata keys to retrieve.                   |
| `file_names`               | `List[str]`         | Filter by specific file names.                        |
| `point_ids`                | `List[str]`         | Filter by specific node/point IDs.                    |
| `metadata_key_filters`     | `List[str]`         | Filter by presence of metadata keys.                  |
| `metadata_value_filters`   | `Dict[str, List]`   | Filter by specific metadata values.                   |
| `full_text_filters`        | `List[str]`         | Full-text search filters.                             |
| `limit`                    | `int`               | Maximum number of results to return.                  |
| `with_vectors`             | `bool`              | Include vector embeddings. Default: `false`.          |

## Response

- **200**: Successfully retrieved metadata  
    - Returns: `{ "metadata": Dict }`
- **500**: Internal Server Error (e.g., error fetching metadata)

## Example

```json
{
  "data_connector_name": "my-documents",
  "group_by": "file",
  "metadata_keys": ["title", "author", "date"],
  "file_names": ["document1.pdf", "document2.pdf"],
  "limit": 100
}
```



## OpenAPI

````yaml /deasy-openapi-stainless.yml post /data/metadata/list
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: /rest/unstructured
security: []
paths:
  /data/metadata/list:
    post:
      tags:
        - Data Connectors
      summary: List Ingested Data
      description: >-
        Retrieve metadata from documents ingested into Unstructured.


        ## Request Body


        | Field                      | Type                |
        Description                                           |

        |----------------------------|---------------------|-------------------------------------------------------|

        | `data_connector_name`      | `str`               | Name of the data
        connector to query.                  |

        | `group_by`                 | `str`               | Group results by
        `file` or `node`. Default: `file`.   |

        | `metadata_keys`            | `List[str]`         | Specific metadata
        keys to retrieve.                   |

        | `file_names`               | `List[str]`         | Filter by specific
        file names.                        |

        | `point_ids`                | `List[str]`         | Filter by specific
        node/point IDs.                    |

        | `metadata_key_filters`     | `List[str]`         | Filter by presence
        of metadata keys.                  |

        | `metadata_value_filters`   | `Dict[str, List]`   | Filter by specific
        metadata values.                   |

        | `full_text_filters`        | `List[str]`         | Full-text search
        filters.                             |

        | `limit`                    | `int`               | Maximum number of
        results to return.                  |

        | `with_vectors`             | `bool`              | Include vector
        embeddings. Default: `false`.          |


        ## Response


        - **200**: Successfully retrieved metadata  
            - Returns: `{ "metadata": Dict }`
        - **500**: Internal Server Error (e.g., error fetching metadata)


        ## Example


        ```json

        {
          "data_connector_name": "my-documents",
          "group_by": "file",
          "metadata_keys": ["title", "author", "date"],
          "file_names": ["document1.pdf", "document2.pdf"],
          "limit": 100
        }

        ```
      operationId: list_ingested_data_route_data_metadata_list_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListSourceMetadataRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSourceMetadataResponse'
        '403':
          description: Missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '500':
          description: >-
            Internal Server Error. An unexpected error occurred while processing
            the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
      security:
        - BasicAuth: []
        - BearerAuth: []
          UserIdAuth: []
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from unstructured import UnstructuredClient

            client = UnstructuredClient(
                username=os.environ.get("UNSTRUCTURED_USERNAME"),  # This is the default and can be omitted
                password=os.environ.get("UNSTRUCTURED_PASSWORD"),  # This is the default and can be omitted
            )
            response = client.data_source.list_ingested_data(
                data_connector_name="data_connector_name",
            )
            print(response.metadata)
        - lang: JavaScript
          source: |-
            import UnstructuredClient from 'unstructured-sdk';

            const client = new UnstructuredClient({
              authMethod: 'My Auth Method',
              username: process.env['UNSTRUCTURED_USERNAME'], // This is the default and can be omitted
              password: process.env['UNSTRUCTURED_PASSWORD'], // This is the default and can be omitted
            });

            const response = await client.dataSource.listIngestedData({
              data_connector_name: 'data_connector_name',
            });

            console.log(response.metadata);
components:
  schemas:
    ListSourceMetadataRequest:
      properties:
        data_connector_name:
          type: string
          title: Data Connector Name
        group_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Group By
          default: file
        metadata_keys:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Metadata Keys
        file_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: File Names
        point_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Point Ids
        metadata_key_filters:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Metadata Key Filters
        metadata_value_filters:
          anyOf:
            - additionalProperties:
                items:
                  type: string
                type: array
              type: object
            - type: 'null'
          title: Metadata Value Filters
        full_text_filters:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Full Text Filters
        limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit
        with_vectors:
          anyOf:
            - type: boolean
            - type: 'null'
          title: With Vectors
          default: false
      type: object
      required:
        - data_connector_name
      title: ListSourceMetadataRequest
    ListSourceMetadataResponse:
      properties:
        metadata:
          additionalProperties:
            type: object
          type: object
          title: Metadata
      type: object
      required:
        - metadata
      title: ListSourceMetadataResponse
    HTTPError:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: HTTPError
    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:
    BasicAuth:
      type: http
      scheme: basic
    BearerAuth:
      type: http
      scheme: bearer
    UserIdAuth:
      type: apiKey
      in: header
      name: X-User-ID

````