Formatting the output with the API