Skip to main content
POST
/
v1
/
contents
Download content
curl --request POST \
  --url https://tako.com/api/v1/contents \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "url": "<string>",
  "mode": "url"
}
'
{
  "request_id": "<string>",
  "contents": [
    {
      "source_url": "<string>",
      "cost": 0,
      "data": "<string>",
      "total_rows": 123,
      "truncated": false,
      "url": "<string>",
      "expires_at": "<string>"
    }
  ]
}

Notes

  • To authenticate, you’ll need a Tako API key. It’s best practice to store it as an environment variable to avoid hardcoding sensitive credentials in your code.
  • Contents downloads the data behind a result returned by Search or Answer. Pass the result’s URL and Tako returns a short-lived download URL — a CSV of a Tako card’s data, or the extracted text of any other web page.
  • You don’t pass a format; Tako detects the right content from the URL and the response reports what it produced.
A result is downloadable when it carries a content descriptor in the Search or Answer response. Use that result’s URL here — a card’s webpage_url or a web result’s url.

Authorizations

X-API-Key
string
header
required

Body

application/json

Request body for POST /api/v1/contents.

The caller passes the result URL it wants downloadable content for; the endpoint detects the right content from the URL itself. A Tako card URL resolves to a CSV of the card's underlying data; any other URL resolves to the page's extracted full text. mode controls delivery: url (default) returns a presigned download link; inline returns the content in the response.

url
string
required

The result URL to fetch downloadable content for (a TakoCard.webpage_url or a WebResult.url). A Tako card URL yields a CSV of the card's data; any other URL yields the page's extracted text.

Example:

"https://tako.com/card/abc123"

mode
enum<string>
default:url

Delivery mode: 'url' (default) returns a presigned download link; 'inline' returns the content in the response body (CSV capped at 1000 rows, with total_rows; or web text).

Available options:
url,
inline

Response

Downloadable content for a result: a presigned URL plus format and cost metadata.

Response for POST /api/v1/contents.

contents is a list so the contract stays stable if a single result ever yields multiple artifacts; today it always carries exactly one item.

request_id
string
required
contents
ContentItem · object[]