Well there are reasons to use the DB instead of the API. For reading it's way faster ;-)
For writing I'll always choose the API, as everything else would fuck it up.
But you've got to search yourself through the DB.
I got the following answer from the Support once:
[...] so I'm afraid its down to your own reverse engineering.