Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

642
Views
how to set api request to google drive api using axios

I working on a google drive project but I am not able to send search parameters with Axios to google API from frontend react

can any explain to me how to write queries like in google drive api url

  1. Search all files and folders by date
  2. Find a file by size
  3. Find all empty folders
  4. Find a file by type such as ppt, image, etc

Axios request look like that

 axios.get('https://www.googleapis.com/drive/v3/files?access_token='+accessToken+'&q=mimeType%3D%22application%2Fvnd.google-apps.folder%22').then(res=>{
    console.log(res)
    setFolders(res.data.files)
}).then(err=>{
    console.log(err)
})

Thanks in advance :)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Axios is not your problem the API does not support what you are trying to do for the most part.

Search all files and folders by date

You cant really. Download them all and search locally

Find a file by size

You cant. Download them all and search locally

Find all empty folders

Its not easy and will be a lot of requests but. You could use q to only get folders and then make separate requests using parents and then see if there are any files returned.

Find a file by type such as ppt, image, etc

Us the q parameter and search by mime type you will just need to google the correct mime type for the file you are looking for.

mimeType='application/vnd.ms-powerpoint'

You should have a look at the Search terms refrence documentation it will show you wnat you can search on.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!