Add API support for sorting, page count, etc

Related to #64, #58