api: handle case where there are no links in requested page