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

# Get Entity

> Fetch an entity or raw piece of evidence by its id.

When a search result or entity listing carries a `urn` (`l1_…`, `l2_…`,
`l3_…`), pass it bare — the URN is the stable, self-describing identifier.
Example: `l2_01kvtxh78ky384gq9xvgsyakg7`.

Records without a URN use an assembled reference instead:

- Raw evidence — `evidence:{type}:{id}`, where `{type}` and `{id}` are the
  `evidence_type` and `id` of a result from `POST /knowledge/search`.
  Example: `evidence:email:19f04210caef6e91`. If you searched with
  `group_by=chunk`, drop the trailing `:{chunk_index}` suffix from the
  result id first.
- Extracted entity — `entity:{prefix}:{type}:{id}`, where `{prefix}` is
  `l1`, `l2`, or `l3` (matching the entity's `urn` prefix), and
  `{type}`/`{id}` come from `GET /knowledge/entities`.
  Example: `entity:l1:person:42`.

The `{id}` segment never contains a colon; some type names use dots (e.g.
`person.v2`).

<Snippet file="api/knowledge/get-entity.mdx" />


## OpenAPI

````yaml GET /v1/knowledge/entities/{entity_id}
openapi: 3.1.0
info:
  title: Adapter API
  description: Connect and sync data from any SaaS tool.
  version: 0.1.0
servers:
  - url: https://api.adapter.com
security:
  - ApiKeyAuth: []
tags:
  - name: connections
    description: Manage OAuth connections to data sources.
paths:
  /v1/knowledge/entities/{entity_id}:
    get:
      tags:
        - knowledge
      summary: Get Entity
      description: >-
        Fetch an entity or raw piece of evidence by its id.


        When a search result or entity listing carries a `urn` (`l1_…`, `l2_…`,

        `l3_…`), pass it bare — the URN is the stable, self-describing
        identifier.

        Example: `l2_01kvtxh78ky384gq9xvgsyakg7`.


        Records without a URN use an assembled reference instead:


        - Raw evidence — `evidence:{type}:{id}`, where `{type}` and `{id}` are
        the
          `evidence_type` and `id` of a result from `POST /knowledge/search`.
          Example: `evidence:email:19f04210caef6e91`. If you searched with
          `group_by=chunk`, drop the trailing `:{chunk_index}` suffix from the
          result id first.
        - Extracted entity — `entity:{prefix}:{type}:{id}`, where `{prefix}` is
          `l1`, `l2`, or `l3` (matching the entity's `urn` prefix), and
          `{type}`/`{id}` come from `GET /knowledge/entities`.
          Example: `entity:l1:person:42`.

        The `{id}` segment never contains a colon; some type names use dots
        (e.g.

        `person.v2`).
      operationId: get_entity
      parameters:
        - name: entity_id
          in: path
          required: true
          schema:
            type: string
            title: Entity Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolvedRef'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorModel'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationErrorModel'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionDeniedErrorModel'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorModel'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorModel'
          description: Internal Server Error
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableErrorModel'
components:
  schemas:
    ResolvedRef:
      anyOf:
        - $ref: '#/components/schemas/ResolvedHyperedge'
        - {}
      title: ResolvedRef
      description: >-
        The object a ref resolves to. The ref itself says what kind of record it

        names, so the response is the typed object with no envelope: raw
        evidence

        resolves to the generated `EvidenceData` union (`evidence_type` +
        `data`,

        identical to the `evidence` field on search results), extracted entities
        to

        the generated `EntityData` union (`entity_type` + `data`), and

        relationships to a [`ResolvedHyperedge`].
    BadRequestErrorModel:
      properties:
        error_code:
          type: string
          const: bad_request
          title: Error Code
          default: bad_request
        message:
          type: string
          title: Message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - message
      title: BadRequestErrorModel
    AuthenticationErrorModel:
      properties:
        error_code:
          type: string
          const: authentication_error
          title: Error Code
          default: authentication_error
        message:
          type: string
          title: Message
          default: Invalid or missing credentials.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: AuthenticationErrorModel
    PermissionDeniedErrorModel:
      properties:
        error_code:
          type: string
          const: permission_denied
          title: Error Code
          default: permission_denied
        message:
          type: string
          title: Message
          default: You do not have permission to perform this action.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: PermissionDeniedErrorModel
    NotFoundErrorModel:
      properties:
        error_code:
          type: string
          const: not_found
          title: Error Code
          default: not_found
        message:
          type: string
          title: Message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - message
      title: NotFoundErrorModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InternalServerErrorModel:
      properties:
        error_code:
          type: string
          const: internal_server_error
          title: Error Code
          default: internal_server_error
        message:
          type: string
          title: Message
          default: An unexpected error occurred.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: InternalServerErrorModel
    ServiceUnavailableErrorModel:
      properties:
        error_code:
          type: string
          const: service_unavailable
          title: Error Code
          default: service_unavailable
        message:
          type: string
          title: Message
          default: >-
            The service is currently experiencing issues. Please try again
            later.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: ServiceUnavailableErrorModel
    ResolvedHyperedge:
      properties:
        attrs:
          additionalProperties: true
          type: object
          title: Attrs
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        hyperedge_type:
          type: string
          title: Hyperedge Type
        incidences:
          items:
            $ref: '#/components/schemas/ResolvedIncidence'
          type: array
          title: Incidences
        weight:
          type: number
          title: Weight
      type: object
      required:
        - attrs
        - hyperedge_type
        - incidences
        - weight
      title: ResolvedHyperedge
      description: |-
        A typed relationship connecting other records. Each incidence names a
        member by a ref you can resolve with the same endpoint.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ResolvedIncidence:
      properties:
        attrs:
          additionalProperties: true
          type: object
          title: Attrs
        direction:
          anyOf:
            - type: string
            - type: 'null'
          title: Direction
        node:
          type: string
          title: Node
        weight:
          type: number
          title: Weight
      type: object
      required:
        - attrs
        - node
        - weight
      title: ResolvedIncidence
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Pass your `pk_live_...` API key as a Bearer token.

````