Have a look at the following article: Workspace, application and page export in PL/SQL | APEXPLAINED. It basically explains you how to export the parts of an application via an (unsupported) APEX PL/SQL API. I don't know if the article completely covers your requirements, but it might give you some inspiration.
Thank you for your answer
I know this solution but I can export only pages or whole application. Sometimes I use share components. Is it possible to export share components using a sqlscript, or separately all parts of an application?