API function to download all files and directories/folders/team folders

API function to download all files and directories/folders/team folders

I need to move a folder from each Team folder to a new team folder via API.

Current structure:
Team Folder 1A
   Sub Folder 1A
....
Team Folder 3000A
  Sub folder 3000A

---------------------
Future structure:
Team Folder 1B
   Sub Folder 1A
....
 Team Folder 3000B
    Sub folder 3000A

I have approximately 6000 team folders, 3000 in  the current structure and 3000 already setup in the future structure. I mention this to explain why an API is necessary.

I've read the API documentation and was wondering:
 1 - Is there an API that will return all existing team folders and their associated sub folders? (For example this would return over 6000 team folders and 3000 sub folders.)
 2 - For searching I'm confused as to how the API is to be written. I've tried: 
/api/v1/teams/<id>/records/search%5Ball%5D=<search_query> but this is wrong.
 3 - Will the search function return all the IDs and parent IDs if I search for "Sub Folder"