What is the difference between metadata API and tooling API? When I read the documentation, they both appear the same to me from the metadata perspective. I would like to know how I can use it for retrieving metadata. How is the tooling API specifically different from metadata API for retrieving metadata?


While there is overlap, the Tooling API is specifically designed to help developers build IDE apps for salesforce, while the metadata API is more general purpose configuration migration. For example, you can get a symbol table for a class, such as it's members and functions, without writing your own parser. The metadata API is suitable for simple migrations, but the Tooling API gives developers a platform for debugging, code coverage, auto complete, and more.

Consider the migration toolkit versus the Force.com IDE, and you'll see the difference. One lets you move configuration changes, the other lets you develop new code entirely (minus, if course, the fact that auto complete isn't present in current IDE builds). The Developer Console also shows the power of the Tooling API.

Technically, the Tooling API could completely replace the metadata API, since the metadata API, came first and is less powerful, but it will be supported for some time to come yet.

New projects should probably use the Tooling API as much as practical, but the metadata API is widely supported, in comparison, so it will be a while yet until it is completely replaced.

  • Thanks so much. I would like to vote up, but I don't have the reputation to vote up your answer :( – Kevin Bellati Dec 3 '14 at 18:35
  • At this point in time Tooling and Metadata complement one another, not replace. They do have some overlapping functionality, but presently it is a relatively small subset. Either one can be used for building developer tools, but in many cases you will find it beneficial to take advantage of both APIs. – gaiser Dec 4 '14 at 9:37
  • @sfdcfox Can we deploy code using tooling api in production? – Kiran Machhewar Jan 15 '16 at 9:21
  • 1
    @KiranMachhewar I wasn't thinking about that when I wrote this answer, but it appears that you cannot use the Tooling API as a general API for deploying code to production. This API is more geared for development, while the Metadata API is geared for deployment. There's some overlap, but as gaiser mentioned above, you generally use both APIs. – sfdcfox Jan 15 '16 at 15:29
  • @sfdcfox Thanks for reply. I think tooling api provides tools to develope IDE and metadata api does good job in deployment along with limited support for IDE development. – Kiran Machhewar Jan 15 '16 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.