Has Tor an API to get information about the latest version? I want to use Tor with my software for getting access to blocked sites, and I want update Tor automatically. Have tor any solutions of this task for third-party developers?
For Tor Browser there are various ways to check what the latest Tor Browser version is:
The Firefox updater uses this XML file to determine if there is an update available (note that the URL is specific to the architecture).
All currently downloads and a version are also available in JSON using the gettor API.
There is also RecommendedTBBVersions, but this has caused issues in the past with being parsed programmatically.
For more information see Ticket #16551.
As for the Tor version itself, on Debian (and some of it's derivatives), and Redhat (and some of it's derivatives) the Tor Project maintains repositories so your package manager should keep you up to date. Many other Linux distributions should have package maintainers who are keeping you up to date.
I am not aware of an equivalent for stand-alone
tor.exe on Windows, but if you are the package maintainer, then you should probably be taking the time to ensure it is up to date by reading the Tor Project blog and looking for release announcements so your users can benefit. Also consider just making your software interoperable with other instances of Tor (e.g. the one run by Tor Browser), rather than insisting on launching and maintaining it's own.