Create a Data Table
Generate a spreadsheet-ready data table with outputType datatable, poll /content/Status/{id}, and download the file from the /data-tables endpoints.
Generate spreadsheet-ready data tables by calling /content/Create with outputType: "datatable". Data table jobs are asynchronous: submit the job, poll /content/Status/{id}, then download the completed spreadsheet from /data-tables/{id}/download.
Step 1: Create the Data Table Request
curl -X POST "https://api.autocontentapi.com/content/Create" \
-H "accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"outputType": "datatable",
"resources": [
{
"type": "website",
"content": "https://example.com/market-report"
}
],
"text": "Extract the named companies, market segment, funding stage, region, and one-sentence positioning into a clean comparison table.",
"language": "English"
}'Example response:
{
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": 0
}Save the request_id. It is also the data table ID used by the /data-tables endpoints.
Step 2: Poll for Status
While processing, treat any status from 1 to 99 as still running.
Step 3: Read the Completed Status Payload
When status reaches 100, the status response exposes the generated file URL in both datatable_url and share_url.
Use datatable_url when you only need the hosted file URL. Use the authenticated download endpoint below when you want the API to verify ownership and stream the file with download headers.
Step 4: Use the Data Tables API
List Data Tables
Example response:
The list includes in-progress data table requests. In-progress rows have status below 100 and url: null.
Download a Data Table
The API streams the generated spreadsheet as an attachment. The file extension is inferred from the stored asset and content type, usually .xlsx.
Supported Source Types
Data tables use the same source model as the general content endpoint:
website
Public web page URL
"https://example.com/report"
youtube
YouTube video URL
"https://www.youtube.com/watch?v=VIDEO_ID"
text
Direct text source material
"Company A raised $10M..."
pdf
Base64-encoded PDF payload
"BASE64_ENCODED_PDF"
file
File ID returned by /files
"YOUR_FILE_ID"
You can also use topic, feedSelections, researches, podcastEpisodeIds, and projects when those sources are available in your account.
Prompting Tips
Name the columns you want in
text.Ask for normalized values when the source has inconsistent labels.
Use a source with enough structured facts; data table generation works best when the input contains comparable entities, dates, metrics, categories, or rankings.
Poll
/content/Status/{id}before downloading./data-tables/{id}/downloadreturns404until the asset is ready.
Error Handling
If generation fails, /content/Status/{id} returns the same error metadata used by other asynchronous content jobs:
What's Next?
📋 Browse the Data Table Scenario Examples
🧭 Review Track Requests & Status Codes
📁 Upload private source files with Upload Private Files
Last updated