Eliminate recursion from read_api.

This will eliminate "RuntimeError: maximum recursion depth".