Currently we are unable to find metadata dependency using API's like metadata API.
We are working on a product which consumes Salesforce API's. We are able to retrieve metadata using metadata API like CustomObject.ApexPage,Layout,workflow etc.
When we try to deploy this metadata into destination org it throwing dependency errors which is expected.
For ex: We are retrieving an ApexPage which refers to Controllers and controllers again referring to CustomObject. When we are trying to deploy ApexPage it is throwing dependency error like Controller and CustomObject are missing. We are able to find dependencies in ChangeSets using Add/Find Dependencies
option from change sets.
My idea is it could be helpful for users who are consuming Salesforce API's if we have service to get dependencies when we pass metadata member like ApexPage,CustomObject etc. And we can easier the deployments.