Skip to main content
GET
List contents
Use it to see which pages the account already has before fetching one again; get_contents reads one record whole. Every filter you send must match. The list does not move any record’s expires_at.

What it costs

The key needs contents:read. The call is free. The answer is 200 with ContentsPage.

Paging

page_size from 1, default 50, maximum 200; a value above the maximum is lowered with the notice page_size_lowered and never refused; a value below 1 is refused bound. page_token is opaque, bound to its query, alive 24 hours; next_page_token is absent on the last page, and a page that carries it holds at least one record. A changed filter between pages, page_size excepted, or an unknown, expired or another list’s token, is 400 page-token-invalid with change.field naming page_token: drop the token and start again. A record made while you page may make an item repeat; when you merge pages, keep one entry per id.

Refused before any work

A value outside its set or range, page_size above its maximum excepted, which is lowered: 400 invalid-request, not_allowed or bound, each with where it is. A run_id of the wrong form: 400 invalid-request, syntax; an unknown run: 400 invalid-request, not_allowed, since a run is a setting of the key and not a resource here. A token of another list: 400 page-token-invalid. An unknown query parameter: 400 invalid-request, unknown_field.

Notices this operation makes

page_size_lowered, version_retiring.

Problem types

  • 400 invalid-request, The request is invalid; page-token-invalid, The page token is invalid.
  • 401 unauthorized, The key is missing or rejected.
  • 403 insufficient-scope, The key lacks a scope this call needs.
  • 429 rate-limit-exceeded, The rate limit is exceeded; concurrency-limit-exceeded, Too many calls are in flight.
  • 500 internal-error, The service failed.
  • 503 overloaded, The service is overloaded.

Authorizations

Authorization
string
header
required

An API key from https://app.getclean.ai, or an access token issued by https://auth.getclean.ai/realms/getclean, sent as Authorization: Bearer <key> on every call. The scopes a key carries and what a 401 and a 403 say are on the keys and sign-in page.

Headers

traceparent
string

Your own trace id for the call, the W3C Trace Context traceparent header, optional on every operation. getclean logs it with the call, so a request in your traces can be matched to its Request-Id, and never forwards it to a site or a source, a stated departure from W3C Trace Context section 3.4, which asks a vendor to pass it on. A malformed value is ignored, never refused, as the same recommendation asks.

Query Parameters

url
string

Only records whose source.url equals it, or starts with it when it ends in *, the one place a * may stand; the scheme and the host are compared in lower case. At most 2,048 characters. Default none.

Required string length: 1 - 2048
Example:

"https://example.com/*"

carrier
string

Only records of this kind of source: web, a live page; archive, an archive's copy read under as_of_date; upload, bytes you sent. An open set. Default none.

Minimum string length: 1
Examples:

"web"

"archive"

"upload"

run_id
string

Only records of this run, an existing run of the key. Default none.

Pattern: ^run_(default|[A-Za-z0-9]{22})$
Example:

"run_default"

page_size
integer
default:50

At most this many records on the page, from 1; default 50; the maximum, 200, stands in Limits.bounds, and a larger value is lowered with the notice page_size_lowered.

Required range: x >= 1
page_token
string

The next page, as the last answer's next_page_token gave it; opaque, at most 1,024 characters, never built by the caller. Default none, the first page.

Required string length: 1 - 1024

Response

One page of the records the account keeps, newest first, each compact and without text; next_page_token while more remain.

One page of the records the account keeps, newest first, the answer of list_contents. Each record is compact: its id, outcome, source and dates, with no text, no map, no model work and no cost.

contents
object[]
required

The records of this page, each a ContentsCompact without cost; [] when none matches.

notices
object[]
required

This call's notices, page_size_lowered and version_retiring; [] when there is none.

request_id
string
required

This call's id, the same as the Request-Id header.

Pattern: ^req_[A-Za-z0-9]{22}$
Example:

"req_01Sof5z2SAa45Wc4HZYpfe"

next_page_token
string

The token for the next page; pass it as page_token. Present while more remains, and a page that carries it always has at least one record.

Maximum string length: 1024