Record each input and output using actions

I would like record each and every input and the corresponding rasa output in a custom database. Any idea how can I do that, is there some default action that runs each and every time a user queries the rasa api model?

This information is kept in the tracker store by default. No extra effort is required.