Having been using Drive’s OCR capabilities for years for an in-house Gmail add-on, it’s become less and less usable in the recent years (especially since 2023).
The add-on analyizes from 1 to 3 PDF files, with 2 calls per file to the Drive service (v2), over a 10-30s span. One for insert, one for trash.
Nowadays, even when limiting myself to only 1 file, I nearly always encounter a GoogleJsonResponseException, saying API call to drive.files.insert failed with the following error “User rate limit exceeded for OCR”.
I’ve created a dedicated project for that app/add-on, to ensure quota visibility, but the only detail I get is my 0.05% quota usage. I’ve tried adding a 120ms (then 230ms) pause prior to any API call, as some research suggested this might help (it doesn’t).
I’ve asked the Workspace Support AI, who also said to throttle my request (human suport said “we can’t help”, as usual).
The error says it’s a “user rate limit”, but I’ve found no information/details about such a limit. Also, the errror occurence rate seems to depend both on the day and time. Based on the general execution time, I get the impression this may depend on Google Cloud’s general load, and that I’m hitting some sort of background limit.
I’ve read about people encountering this over the years, but there was never a clear solution.
Shall I just assume Google wants people to stop using their OCR, and have just slowly made it more and more unusable with increasingly restrictive quotas ?
I’m having the same issue. I was able to get the script to work on a few PDFs today, but it keeps erroring with the same error “GoogleJsonResponseException: API call to drive.files.insert failed with error: User rate limit exceeded for OCR”. I’ve only used it on about 40 PDFs over the last 10 days.
I’ve been using this method (OCR) for 3 years. However, since this month (November 13th, 2025), I’m experiencing the same issue. I have already tried adding conditional delays based on the size, but I still get the error. I couldn’t find any better solution for this.
Additionally, there is no official announcement or documentation regarding the limitations.
”GoogleJsonResponseException: API call to drive.files.insert failed with error: User rate limit exceeded for OCR”
As Google is very opaque and unhelpful about this, it indeed is complicated to troubleshoot and find a solution.
I cannot say for certain that this is a solution or enhancement, but as I noticed App Scripts can now use v3 of the Drive API, I made the necessary changes. Haven’t had the error since.
This would however tend to support my guess that either rate limits or computing resources related to handling calls to the v2 API have been reduced to practically and silently make them unusable.
I was using v2 for ocr with increasing rate limit failures recently even with exponential backoff. As per DiesMan suggestion, switching to v3 fixed it for me. Changes I had to make:
using Drive.Files.create() rather than Drive.Files.insert()
no need for ocr: true option in v3
had to explicitly set the mimetype to google doc when doing the create call to ocr the pdf to a google doc (with v2, insert() seemed to do this automatically when ocr set to true)
change ‘title’ to ‘name’ in the file resource object