Adds pages API and changes example to reflect this