Add download option, supporting JSON and CSV formats