Skip to main content
GET
/
v1
/
extractions
from datetime import datetime
from retab import Retab

client = Retab()

# List recent extractions
extractions = client.extractions.list(
    limit=10,
    order="desc"
)

# Filter by date range
extractions = client.extractions.list(
    from_date=datetime(2024, 1, 1),
    to_date=datetime(2024, 12, 31),
    limit=50
)

# Filter by metadata
extractions = client.extractions.list(
    metadata={"organization_id": "org_acme_corp"},
    human_review_status="review_required"
)
{
  "data": [
    {
      "id": "extr_01G34H8J2K",
      "created_at": "2024-03-15T10:30:00Z",
      "updated_at": "2024-03-15T10:30:00Z",
      "organization_id": "org_01ABC123",
      "origin": {
        "type": "project",
        "id": "proj_F0FE8DFqyouQdZXDTWRg0"
      },
      "file": {
        "id": "file_6dd6eb00688ad8d1",
        "filename": "invoice.pdf"
      },
      "predictions": {
        "invoice_number": "INV-2024-0042",
        "total_amount": 1234.56
      },
      "human_review_status": "success",
      "json_schema": {
        "type": "object",
        "properties": {
          "invoice_number": { "type": "string" },
          "total_amount": { "type": "number" }
        }
      },
      "metadata": {
        "organization_id": "org_acme_corp"
      }
    }
  ],
  "list_metadata": {
    "before": null,
    "after": "extr_01G34H8J2K",
    "total_count": 150
  }
}
from datetime import datetime
from retab import Retab

client = Retab()

# List recent extractions
extractions = client.extractions.list(
    limit=10,
    order="desc"
)

# Filter by date range
extractions = client.extractions.list(
    from_date=datetime(2024, 1, 1),
    to_date=datetime(2024, 12, 31),
    limit=50
)

# Filter by metadata
extractions = client.extractions.list(
    metadata={"organization_id": "org_acme_corp"},
    human_review_status="review_required"
)
{
  "data": [
    {
      "id": "extr_01G34H8J2K",
      "created_at": "2024-03-15T10:30:00Z",
      "updated_at": "2024-03-15T10:30:00Z",
      "organization_id": "org_01ABC123",
      "origin": {
        "type": "project",
        "id": "proj_F0FE8DFqyouQdZXDTWRg0"
      },
      "file": {
        "id": "file_6dd6eb00688ad8d1",
        "filename": "invoice.pdf"
      },
      "predictions": {
        "invoice_number": "INV-2024-0042",
        "total_amount": 1234.56
      },
      "human_review_status": "success",
      "json_schema": {
        "type": "object",
        "properties": {
          "invoice_number": { "type": "string" },
          "total_amount": { "type": "number" }
        }
      },
      "metadata": {
        "organization_id": "org_acme_corp"
      }
    }
  ],
  "list_metadata": {
    "before": null,
    "after": "extr_01G34H8J2K",
    "total_count": 150
  }
}

Authorizations

Api-Key
string
header
required

Query Parameters

before
string | null
after
string | null
limit
integer
default:10
order
enum<string>
default:desc
Available options:
asc,
desc
origin_dot_type
enum<string> | null
Available options:
api,
processors.extract,
projects.extract,
documents.extract,
documents.parse,
schemas.generate,
automation.mailbox,
automation.cron,
automation.outlook,
automation.endpoint,
documents.create_messages,
documents.create_inputs,
documents.correct_image_orientation,
projects.builder.extract,
projects.dataset.extract,
projects.iteration.extract
origin_dot_id
string | null
filename
string | null
from_date
string | null
to_date
string | null
human_review_status
enum<string> | null
Available options:
success,
review_required,
reviewed
metadata
string | null
access_token
string | null

Response

Successful Response

data
any[]
required
list_metadata
object
required