It would be best to use the API because there are too many scenarios that could cause the wrong information to be retrieved. For instance, if you are using workflow, is the document in workflow? Or if you're using versioning, you want to make sure you get the latest version, of course that is published. There are about 4 or 5 tables to look in (for newer versions anyways).