fix p for debugging, allow per instead of per_page, allow disabling type in query