Pages API

Pick up where #211 left off