2
votes

Per https://developers.google.com/docs/api/reference/rest/v1/documents/get I can retrieve a document

The result is structured as described at https://developers.google.com/docs/api/reference/rest/v1/documents#Document

but I am missing the bookmarks and comments of a doc. They are neither in that description or in the real world retrieved object.

Is it possible to retrieve comments and/or bookmarks from a google-doc?

1
About bookmarks, unfortunately, in the current stage, the bookmarks cannot be retrieved by Google Docs API. Because the source bookmark ID cannot be retrieved by Docs API while the bookmark ID can be retrieved from the text linked to the bookmark. About comments, the comments can be retrieved by the method of Comments in Drive API. The comments cannot be retrieved by Docs API. Ref If I misunderstood your question, I apologize.Tanaike
@Tanaike, thanks your response is appreciated and I think is correct (feel free to add it as an answer and I'd mark as accepted)tru7
Thank you for replying. I posted it as an answer. Could you please confirm it?Tanaike

1 Answers

2
votes

About bookmarks:

Unfortunately, in the current stage, the bookmarks cannot be retrieved by Google Docs API. Because the source bookmark ID cannot be retrieved by Docs API while the bookmark ID can be retrieved from the text linked to the bookmark. - Docs API is growing now. So I think that the methods for managing the bookmarks will be added in the future update.

As a current workaround, I think that Web Apps created with Google Apps Script might be able to be used as an API for achieving above situation. Document service of Google Apps Script can retrieve the bookmark ID. Ref

About comments:

The comments can be retrieved by the method of Comments in Drive API. The comments cannot be retrieved by Docs API.

References: