BlogCore API

Google Drive Video Import API: Get the File or Transcript From a Share Link

What the Drive API covers for public files, and one Importly call that turns a Drive share link into an MP4 in your bucket or a timestamped transcript.

On this page6 sections

Course platforms, video editors, transcription apps and client portals all ask users to "paste a Google Drive link". A share link like drive.google.com/file/d/<id>/view opens a preview page, not the file, so your backend still has to turn it into an MP4 it can store or a transcript it can use.

What Google's own Drive API covers

Start here, because for Drive-only apps it may be all you need:

  • Drive API files.get with alt=media downloads a file's content by its ID. You need a Google Cloud project and credentials, and the request is refused when the owner has turned off downloads (check capabilities.canDownload).
  • Google Picker plus OAuth lets a signed-in user choose files from their own Drive, including private ones. That's the right route when users import their own files rather than paste links.
  • Google Docs, Sheets and Slides aren't video files; they go through files.export instead.

What the Drive API doesn't give you is the rest of the job: a transcript of the video, delivery to your own bucket, and the same code path for the YouTube, Loom and Vimeo links your users paste into the same field.

The file in one call

Send the share link to Importly as an import:

bash
curl https://api.importly.io/import \
  -H "Authorization: Bearer $IMPORTLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://drive.google.com/file/d/<id>/view",
    "webhookUrl": "https://example.com/webhooks/import"
  }'

When the job finishes, the webhook (or GET /import/status?id=<jobId>) gives you a link to the file plus its title and duration. Set "store": true to have it copied straight into your own S3, R2 or B2 bucket instead.

A few things worth knowing:

  • "Anyone with the link" files only. A file shared with specific people needs a login, so it fails and you can ask the user to change its sharing. Failed imports aren't charged.
  • Audio only: set "includeVideo": false if you only need the soundtrack, for example to transcribe it in your own pipeline.
  • Check before you pay: POST /metadata/basic returns the title and duration for $0.003, so you can confirm the link is shared publicly and see how long the video is first.

The transcript in one call

Drive videos rarely come with captions, so use "mode": "auto": it uses captions when there are some and speech-to-text when there aren't. "wait": true returns the finished transcript in the response:

bash
curl -X POST https://api.importly.io/transcribe \
  -H "Authorization: Bearer $IMPORTLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://drive.google.com/file/d/<id>/view",
    "mode": "auto",
    "wait": true,
    "maxCostDollars": 0.5
  }'

You get timestamped segments ({ start, end, text }) ready to summarize, index or show next to the video. A longer recording may still be running when wait runs out; then you collect it by polling or webhook. See transcripts for the full response.

What it costs

  • File: $0.002 per MB, with a $0.01 minimum per import. A 10-minute 720p video (about 77 MB) is about $0.15.
  • Transcript: speech-to-text is $0.01 per minute, so a 10-minute recording costs $0.10. Videos with captions cost $0.003.

maxCostDollars caps what a request may cost, so an unexpectedly long upload fails instead of running over. It's free to try, no card required. See pricing.

Have your AI agent build it in

Connect https://mcp.importly.io/mcp to Claude Code, Cursor or another coding agent and ask it to add "import from a Drive link" to your app. It gets working code for your stack, writes the integration and tests real calls with your API key, and your backend uses the same key. The steps are in Have your agent build Importly into your app.

FAQ

Can I download a Google Drive video with the Drive API?

Yes, with files.get and alt=media, a Google Cloud project and credentials, as long as the owner hasn't disabled downloads. If your app only ever takes Drive files and you don't need transcripts, that's the simplest route.

Does it work with private Drive files?

No. Only files shared as "anyone with the link". For files users keep private, use Google Picker with OAuth.

Can I get a transcript of a Drive video without downloading it?

Yes. POST /transcribe takes the share link and returns the transcript. You don't download or store the video yourself.

What about Google Docs or Slides links?

Those aren't video or audio files, so Importly can't import them. Only video and audio files stored in Drive work.

Related: Loom video download API, Video downloader API, Supported sites.

Keep reading

Put video and audio links to work in your app

One API for files, transcripts and metadata. Free to try, no card required.

Try free →