Skip to content
TriedDocs
Knowledge bases

Get knowledge base source content

Download the extracted plain text of one knowledge base source.

GEThttps://api.tried.com.au/get-knowledge-base-source-content/{id}/{source_id}

Returns the text Tried extracted from a source, which is what gets chunked and embedded. Use it to check that a PDF, spreadsheet or web page was read correctly. Each source's content_url points here.

Request#

Path parameter Type Required Description
id string Yes The knowledge base ID, starting with knowledge_base_.
source_id string Yes The source ID, starting with source_.

Example request#

curl https://api.tried.com.au/get-knowledge-base-source-content/knowledge_base_9f060d81a4d8df9b04ca6d12/source_5da4e4744cb7ea63832e856c \
  -H "Authorization: Bearer $TRIED_API_KEY"
const res = await fetch(
  "https://api.tried.com.au/get-knowledge-base-source-content/knowledge_base_9f060d81a4d8df9b04ca6d12/source_5da4e4744cb7ea63832e856c",
  { headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` } },
);
const text = await res.text();
import os, requests

res = requests.get(
    "https://api.tried.com.au/get-knowledge-base-source-content/knowledge_base_9f060d81a4d8df9b04ca6d12/source_5da4e4744cb7ea63832e856c",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
text = res.text

Response#

200 OK

The body is plain text (Content-Type: text/plain; charset=utf-8), not JSON.

## Prices
Service,Price
Standard consultation,$80
Long consultation,$140

What you get depends on the source type:

Source Content
text The snippet text as sent.
document Text extracted from the file. See File types.
url The page text from the last successful fetch. Empty until the first fetch finishes.

Errors#

Status When
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the kb scope.
404 Knowledge base <id> not found or Source <source_id> not found.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.