Add basic lookup support to api.php