Mbedtls - how to extract public key from DER formatted certificate

We wanted to read the public key from the DER formatted certificate. Is there any API to extract the public key from the certificate. Also need to know the length of the public key.