Is there any API form in the google drive API that enables us to retrieve any word that a user has edited in a specific google doc file or any word that they had deleted in a specific doc? This is due to that I would like to create a software that makes it possible to check user contributions by number of words.
3 Answers
First of all welcome to the community.
You can detect your file changes based on user.
Please refer below google drive api documentation for better idea hoe to do it.

- 1,252
- 1
- 14
- 22
This is currently not directly supported by Google Apps Scripts nor any of Google's APIs. You'll have to resort to your own implementation

- 17,219
- 5
- 37
- 56
A solution would be to make use of Drive API's Revisions:list.
The request will look like this:
GET https://www.googleapis.com/drive/v3/files/fileId/revisions
Where fileId
is the id of the file you want to monitor.
As you want to retrieve the changes made to the document, you will have to make use of the exportLink
parameter and retrieve the text. A solution for this according to this answer here is to make use of Apps Script's UrlFetch
.
As for the number of words, you can simply do some string manipulation from the resulted text in order to get the number of words.
Reference

- 5,679
- 3
- 10
- 25