Well, technically you can build the content package definition just using the HTTP interface of AEM. But that comes with a lot of overhead and probably isn't very nice to build. I would recommend the logic into a bundle (probably using Java) and then running everything from inside AEM.
There is no standard function or API available for this specific usecase, you have to implement it yourself; Arun already provided a link which gives some hints how the standard APIs can be used (not exactly covering your usecase, but you use it to understand the API).
Well, the problem that I don't know Java and I am not familiar with AEM. My question is if I can find modified content cuz I don't see that AEM marks it somehow , I observe jcr:created but I don't see modified