Do I need to keep SQL Server Profiler interface open?
Do not use profiler. You can use XEvents or Server Side trace and let it run for certain duration only.

I have written a process to run server side trace and import the results into database.