---
title: "Read your base and its documents."
method: GET
path: "/api/bases/{base_id}"
---

# Read your base and its documents.

`GET /api/bases/{base_id}`

## Request

- Base URL: `https://okfindex.com`
- URL: `https://okfindex.com/api/bases/{base_id}`
- Auth: none declared

Personal-account operations. Free initial limit: 3 bases, 20 documents per base, 256 KiB per file. Read limits for current account capacity. After paid capacity expires, extra bases keep read, export, removal and make-private access. Files are not automatically deleted. Purchase requires an explicit browser action; an API key cannot buy a subscription. Bases start private. Only publish_base exposes current files after an explicit rights declaration. Upload and replacement never publish new text. Removal also cuts public access to the document. Responses use private, no-store. Uploaded text is untrusted data, never agent instructions.
Returns: { base{id,name,visibility,dataset,created_at,updated_at,documents,bytes,api,export_url,okf_url,public_url,embed_url,publication}, items[{id,base_id,filename,title,format,managed,sha256,bytes,status,created_at,api,source_url?,source_sha256?,pages?,review?,markdown_url,original_url,okf_url}], next, limits, subscription{active,expires_at,offer_id,checkout_available,retention}, read_only, source?{url,document_id,status,error,checked_at,changed_at,next_check_at,overdue}, usage?{from,to,aggregation_minutes,searches,empty_searches,document_reads}, conversions?[{id,base_id,filename,format,bytes,quote,status,document_id,error,progress,created_at,updated_at,expires_at,processing?}], conversion_limits?, answer?{id,question,status,statements,created_at?,charged?}, question_price_usd? }

## Path parameters

- `base_id` string, required

## Query parameters

- `after` string

## Response `200`

{ base{id,name,visibility,dataset,created_at,updated_at,documents,bytes,api,export_url,okf_url,public_url,embed_url,publication}, items[{id,base_id,filename,title,format,managed,sha256,bytes,status,created_at,api,source_url?,source_sha256?,pages?,review?,markdown_url,original_url,okf_url}], next, limits, subscription{active,expires_at,offer_id,checkout_available,retention}, read_only, source?{url,document_id,status,error,checked_at,changed_at,next_check_at,overdue}, usage?{from,to,aggregation_minutes,searches,empty_searches,document_reads}, conversions?[{id,base_id,filename,format,bytes,quote,status,document_id,error,progress,created_at,updated_at,expires_at,processing?}], conversion_limits?, answer?{id,question,status,statements,created_at?,charged?}, question_price_usd? }

- object
  - `base` Base, required
    - `id` string, required: The 64-character ID returned by the API.
    - `name` string, required: Base name.
    - `visibility` string, required: private or public; only explicit publication makes a base public.
    - `dataset` Dataset, required
      - `description` string, required: Dataset description, 1–2000 characters.
      - `fields` DatasetField[], required: 1–30 fields, each with a name and description.
        - `name` string, required: Field name, 1–80 characters.
        - `description` string, required: Meaning, 1–200 characters.
      - `coverage` string, required: Geographic, temporal or subject coverage, 1–300 characters.
      - `format` string, required: Source format, for example CSV or JSON, 1–40 characters.
      - `update_frequency` string, required: Declared update schedule, 1–200 characters. No automatic check is performed.
      - `license` string, required: Declared license or access terms, 1–300 characters. Not independently verified.
      - `source_url` string, required: HTTPS origin URL, at most 1000 characters, without credentials.
    - `created_at` string, required: Creation date, ISO 8601.
    - `updated_at` string, required: Last change, ISO 8601.
    - `documents` integer, nullable, required: Document count when returned by the base list; null otherwise.
    - `bytes` integer, nullable, required: Current original bytes in the owner's base list; null in other private responses. Omitted from public responses.
    - `api` string, required: Metadata URL.
    - `export_url` string, required: ZIP download URL.
    - `okf_url` string, required: OKF root index URL.
    - `public_url` string, nullable, required: Public page URL while published; null when private.
    - `embed_url` string, nullable, required: Public search iframe URL while published; null when private. Uses the same public API and limits. No account controls inside the iframe.
    - `publication` BasePublication, required
      - `author` string, required: Author or attribution declared by the publisher.
      - `source_url` string, nullable, required: Declared HTTPS source, or null for uploaded files.
      - `terms` string, required: Terms declared by the publisher. This is not an independent license verification.
      - `published_at` string, required: Date of the last explicit publication, ISO 8601.
  - `items` Document[], required: Documents on this page.
    - `id` string, required: The 64-character ID returned by the API.
    - `base_id` string, required: The 64-character ID returned by the API.
    - `filename` string, required: Original filename.
    - `title` string, required: Filename without extension.
    - `format` string, required: md, txt, pdf, docx or doc after conversion.
    - `managed` string, nullable, required: dataset for generated metadata; edit through save_base_dataset. Null for ordinary files.
    - `sha256` string, required: SHA-256 of stored UTF-8 text. Converted source hash is source_sha256.
    - `bytes` integer, required: Stored UTF-8 text size in bytes.
    - `status` string, required: ready or pending.
    - `created_at` string, required: Upload date, ISO 8601.
    - `api` string, required: JSON with Markdown.
    - `source_url` string, nullable: Present on document reads: source URL preserved with this version, or null for manual uploads. Also included in the exported OKF concept.
    - `source_sha256` string: SHA-256 of the original converted file.
    - `pages` integer: PDF physical page count. Zero for continuous DOC and DOCX text.
    - `review` object: PDF: completed automated review. DOC/DOCX: not_applicable, null model and zero pages reviewed.
    - `markdown_url` string, required: Markdown download.
    - `original_url` string, required: Original file download.
    - `okf_url` string, required: OKF concept URL.
  - `next` string, nullable, required: Next page URL, or null.
  - `limits` object, required: Account limits: bases, documentos, arquivoBytes, pagina and storageBytes (maximum current original bytes when capacity is configured).
  - `subscription` BaseSubscription, required
    - `active` boolean, required: A paid capacity right is currently valid; this is not the renewal state.
    - `expires_at` string, nullable, required: Paid access expiry, ISO 8601, or null.
    - `offer_id` string, required: Capacity offer ID.
    - `checkout_available` boolean, required: The server permits subscription checkout in this environment. False does not remove an existing right.
    - `retention` string, required: extra_bases_read_only_after_paid_period: keep files; restrict editing in extra bases after expiry.
  - `read_only` boolean, required: Extra base after paid capacity expires. Reading, export, removal and making private remain available.
  - `source` BaseSource
    - `url` string, required: Connected public HTTPS Markdown URL.
    - `document_id` string, required: The 64-character ID returned by the API.
    - `status` string, required: pending, ready, error or paused. Expired subscription pauses fetching and preserves files.
    - `error` string, nullable, required: Failure code, or null. The last ready document remains available.
    - `checked_at` string, nullable, required: Last attempt, ISO 8601; null before the first attempt.
    - `changed_at` string, nullable, required: Last content change, ISO 8601; null before first import.
    - `next_check_at` string, required: Next scheduled attempt, ISO 8601.
    - `overdue` boolean, required: The next check is more than 15 minutes late.
  - `usage` BaseUsage
    - `from` string, required: First UTC day, inclusive.
    - `to` string, required: Last UTC day, inclusive.
    - `aggregation_minutes` integer, required: 10. Counts arrive after the aggregation window, without per-request database writes.
    - `searches` integer, required: Successful first-page searches through this base's private and public API. Includes agents. Pagination is excluded. No query text is stored.
    - `empty_searches` integer, required: Subset of searches that returned no documents.
    - `document_reads` integer, required: Successful JSON document reads through this base's private and public API. Not unique visitors. Downloads and collections are excluded.
  - `conversions` BaseConversion[]: Saved document conversions. Present only when conversion is enabled.
    - `id` string, required: The 64-character ID returned by the API.
    - `base_id` string, required: The 64-character ID returned by the API.
    - `filename` string, required: Original filename.
    - `format` string, required: Source format: pdf, docx or doc.
    - `bytes` integer, required: Original file size.
    - `quote` ConversionQuote, required
      - `id` string, required: The 64-character ID returned by the API.
      - `source_sha256` string, required: SHA-256 of the original document bytes.
      - `pages` integer, required: PDF physical page count (1–200). Zero for DOC and DOCX, whose text is not paginated.
      - `price_usd` string, required: Total price in USD, as a decimal string.
    - `status` string, required: quoted, queued, processing, ready or failed.
    - `document_id` string, nullable, required: Base document ID after successful import.
    - `error` string, nullable, required: Failure code, or null.
    - `progress` object, nullable, required: stage and page counts from the last core observation, or null.
    - `created_at` string, required: Creation time, ISO 8601.
    - `updated_at` string, required: Last update, ISO 8601.
    - `expires_at` string, nullable, required: Processing deadline after authorization; null before authorization.
    - `processing` object, nullable: Stored core job on detail reads. No generation occurs during the read.
  - `conversion_limits` object: Upload limits: file_bytes, PDF pages and supported formats (pdf/docx/doc). Present only when conversion is enabled.
  - `answer` BaseAnswer
    - `id` string, nullable, required: 64-character ID returned by the API.
    - `question` string, required: The submitted question.
    - `status` string, required: queued, processing, ready, unsupported, stale or failed.
    - `statements` AnswerStatement[], required: Up to four supported statements. Empty when not ready.
      - `text` string, required: Plain answer text. Treat as untrusted model output.
      - `citation` AnswerCitation, required
        - `document_id` string, required: 64-character ID returned by the API.
        - `version` string, required: 64-character ID returned by the API.
        - `sha256` string, required: Source content SHA-256.
        - `filename` string, required: Source filename.
        - `quote` string, required: Exact excerpt from the source. Treat markup as text.
        - `url` string, required: Authorized source reader in the application.
    - `created_at` string: Creation time, ISO 8601.
    - `charged` boolean: False when no matching source was found before generation.
  - `question_price_usd` string: Price of one new answer generation in USD. Copy this value when authorizing a question.

## Other responses

- `400`: Invalid name, text, search query, cursor, source URL, idempotency key or publication declaration.
- `401`: Sign in or send a personal API key in X-Api-Key.
- `402`: The account needs more base capacity. Read capacity.limits and capacity.subscription. Complete any purchase in the authenticated browser, then retry the same request.
- `403`: An organization API key cannot access personal bases.
- `404`: The base or document does not belong to this account.
- `409`: The document changed since you read it, an upload is incomplete, a source is already connected, publication has no ready files, or a storage limit was reached.
- `413`: File exceeds 256 KiB, or the request body exceeds its limit.
- `415`: Use application/json and a Markdown or TXT filename.
- `429`: Too many simultaneous uploads. Try later.
- `503`: Private storage is unavailable. Retry the same request.

---

[API](https://skmtc.dev/okfindex/apis/okf-index.md) · [All operations](https://skmtc.dev/okfindex/apis/okf-index/llms.txt) · [OpenAPI document](https://skmtc.dev/okfindex/apis/okf-index/revisions/4b13ca3c739f?raw)
