Chunkr AI allows you to export task results in multiple formats. You can get the content directly and save it to a file.

Available Export Formats

HTML Export

This will collate the html from every segment in all chunks, and create a single HTML file.

# Get HTML content as string
html = task.html()

# Or save directly to file
html = task.html(output_file="output/result.html")

Markdown Export

This will collate the markdown from every segment in all chunks, and create a single markdown file.

# Get markdown content as string
md = task.markdown()

# Or save directly to file
md = task.markdown(output_file="output/result.md")

Text Export

This will collate the content from every segment in all chunks, and create a single text file.

# Get plain text content as string
text = task.content()

# Or save directly to file
text = task.content(output_file="output/result.txt")

JSON Export

This will return the complete task data.

# Get complete task data as dictionary
json = task.json()

# Or save directly to file
json = task.json(output_file="output/result.json")

File Output

When using the output_file parameter:

  • Directories in the path will be created automatically if they don’t exist
  • Files are written with UTF-8 encoding
  • Existing files will be overwritten

Example with custom path:

# Create nested directory structure and save file
task.html(output_file="exports/2024/january/result.html")