Contents
Download the data behind a search result
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.
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
Body
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.
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.
"https://tako.com/card/abc123"
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).
url, inline Response
Downloadable content for a result: a presigned URL plus format and cost metadata.