I have not tried to do this through an API. However, if you have the capability to enable read-only access to Tableau Server's PostgreSQL internal metadata Workgroup database, you can query for comments, etc:
I hope this helps.
In our environment Tableau Server is used by many teams and we are not allowed to access the database directly. Is there a way to get the comments programmatically?
Look forward to your feedback.
I am not sure whether you can retrieve comments via the REST API. Searching the documentation, I did not see an attribute listed for comments.
We at least have obtained this information from the PostgreSQL metadata Workgroup database. We enabled a readonly account and only allow access to a select few people. Perhaps your team that administers the server can write a query to pull this data for you programmatically from the database. In addition to Tableau's documentation, below is a great viz on Tableau Public: