Thank you for your forum post.
Sadly there is not an API available for MySQL Compare.
If this is something you would like to become available in the future, please submit a feature request in the User Voice Forum for our MySQL products HERE.
The User Voice Forum is actively monitored by the Product managers and development teams. The more votes a topic receives will increase the chances that the feature will be added in a future version of the product.