Backend data retrieve for analytics

We have a requirement to analyze user comments and their links uploaded.Does it get stored in the backend database,if so how can it be retrieved for analytics purpose in self hosting as well as business hosting? Does discourse have the capability to perform data retrievals and extract the links,data files stored in backend database?If so, what is the type of DB used for this to retrieve and its process?
This info. helps us decide if to go with self or business hosting in terms of time,effort,code development ,complexity .

In both self-hosted and business hosting scenarios you can extract the user generated content from posts using REST API calls, listening to Webhooks, querying the database via the web interface using the Data Explorer plugin and export it to JSON/CSV, or even download a full copy of the PostgreSQL database that contains all the data.

Which option you should choose depends on your preferred ETL workflow, data size and frequency needs.


Run Data Explorer queries with the Discourse API might be of help for self or business hosting.