---
title: "Get Instruction Entity Extraction Logs"
method: GET
path: "/instructions/{instruction_id}/entity-extraction-logs"
tags: ["entities"]
---

# Get Instruction Entity Extraction Logs

`GET /instructions/{instruction_id}/entity-extraction-logs`

List entity extraction logs for an instruction. Results are attempt-level and include both successful and unsuccessful extraction outcomes. Results are sorted by created_at in descending order and paginated. Historical extraction attempts before 2026-03-06 are unavailable in this endpoint.

## Path parameters

- `instruction_id` string, uuid, required — The ID of the instruction.

## Query parameters

- `cursor` string, nullable — An opaque cursor for pagination
- `page_size` integer — The number of items per page (must be greater than 0 and less than or equal to 100)
- `document_ids` string[], nullable — Optional document IDs to filter extraction logs to.
- `status` 'extracted' | 'not_found' | 'error', nullable — Optional extraction status filter. Supported values are `extracted`, `not_found`, and `error`.
- `created_after` string, date-time, nullable — Optional ISO 8601 timestamp. Includes only logs with `created_at >= created_after`.
- `created_before` string, date-time, nullable — Optional ISO 8601 timestamp. Includes only logs with `created_at < created_before`.

## Headers

- `partition` string, nullable — An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.

## Response `200`

Successful Response

- InstructionEntityExtractionLogList
  - `pagination` Pagination, required
    - `next_cursor` string, nullable
    - `total_count` integer, required
  - `logs` InstructionEntityExtractionLog[], required
    - `id` string, uuid, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `instruction_id` string, uuid, required — The ID of the instruction which generated the entity.
    - `document_id` string, uuid, required — The ID of the document which the entity was produced from.
    - `scope` 'document' | 'chunk', required — Whether extraction was attempted at document scope or chunk scope.
    - `chunk_index` integer, nullable — Chunk index when scope is `chunk`; null when scope is `document`.
    - `status` 'extracted' | 'not_found' | 'error', required — Extraction status for this attempt.
    - `reason_code` 'NO_MATCH' | 'AMBIGUOUS' | 'OUT_OF_SCOPE' | 'SCHEMA_INVALID' | 'MODEL_ERROR', nullable — Machine-readable reason code when available. Values: `NO_MATCH`, `AMBIGUOUS`, `OUT_OF_SCOPE`, `SCHEMA_INVALID`, `MODEL_ERROR`.
    - `reason` string, nullable — Optional debug text for this attempt. Usually model-provided; may be system-generated when normalization/parsing fails.
    - `errors` string[] — Machine-readable extraction error identifiers. Public responses map internal entity-shape validation failures to `unexpected_error`. Common values include `unexpected_error`, `invalid_instruction_schema`, and `empty_completion_content`. Raw provider/runtime error strings may also appear.
    - `page_count` number, required — Input pages for this extraction attempt.

## Other responses

- `401` — Unauthorized
- `402` — Payment Required
- `422` — Validation Error
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/ragie/apis/ragie-api.md) · [All operations](https://skmtc.dev/ragie/apis/ragie-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ragie/ragie-api/revisions/ffdf960539ca/schema)
