Example how to use the api

I want to import data from an external source and create pages from that data.
Of course i could just generate the markdown files and put them into the expected folders but that seems hackish.

I’d like to use the API instead but I am not sure how to start. The “documentation” is nothing more than a code documentation. It is missing some real life examples.

To clarify: I have a file in a custom folder (_cron) inside grav’s root folder. This should be my point of entry to create new pages programmatically.

Any idea?