Thread:Extension talk:Scribunto/Retrieving N latest category members

I could only find mw.title thingie and a Lua thingie to retrieve number of pages in a category. Is there a way to, either with existing Lua functionality or by expanding it, to retrieve fresh category members using Lua? I'm thinking of doing it by fetching data from api URLs even. (In my understanding, if such Lua module is invoked from a template, its content is not refreshed until a contributor clicks 'purge'; so, while expensive, such function would be called rarely.)