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"}
)
{
  "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
      },
      "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"}
)
{
  "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
      },
      "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,
documents.edit,
documents.split,
documents.classify,
schemas.generate,
automation.outlook,
documents.create_messages,
documents.create_inputs,
documents.correct_image_orientation,
projects.builder.extract,
projects.dataset.extract,
projects.iteration.extract,
projects.reconcile.prediction,
projects.reconcile.ground_truth,
projects.experiment.extract,
projects.experiment_iteration.extract,
projects.sandbox.extract,
projects.sandbox_iteration.extract,
standalone_collection.extract
origin_dot_id
string | null
filename
string | null
filename_regex
string | null

Regex or plain text pattern applied to filename for filtering.

filename_contains
string | null

Plain text substring applied to filename for filtering.

document_type
string[] | null

Filter by document type. Can be repeated. Accepted values: bmp, csv, doc, docm, docx, dotm, dotx, eml, gif, heic, heif, htm, html, jpeg, jpg, json, md, mhtml, msg, odp, ods, odt, ots, ott, pdf, png, ppt, pptx, rtf, svg, tif, tiff, tsv, txt, webp, xlam, xls, xlsb, xlsm, xlsx, xltm, xltx, xml, yaml, yml.

from_date
string | null
to_date
string | null
metadata
string | null
access_token
string | null

Response

Successful Response

data
any[]
required
list_metadata
ListMetadata · object
required