> ## Documentation Index
> Fetch the complete documentation index at: https://support.i.moneyforward.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Google Drive Files Using the API

> How to run the API to export Google Drive file lists to a CSV file.

<Info>
  You can export file lists (including Google Drive) directly from the UI. Refer to this guide only when you want to export using the API.
</Info>

### **API**

We provide a public API so you can use the retrieved data however you like.

For details on the available API endpoints, see the [API documentation](/en/api-reference/it-management).

You can also access it from **Settings** > **API Keys** > "API Documentation".

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6yb06ewr4f/1756856722171-2025-09-03-8-38-12.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=cdaddac573efd5b121d271b62ee55b89" alt="API documentation screen" width="2574" height="478" data-path="images/it-management/6yb06ewr4f/1756856722171-2025-09-03-8-38-12.png" />

#### **API for File Export**

[Get files for a service in an organization](/en/api-reference/it-management#tag/Services/operation/publicGetServicesFiles) is the API endpoint for exporting file data.

**GET** [https://api.itmc.i.moneyforward.com/api/v1/organizations/\`\{organizationId}\`/services/\`\{serviceId}\`/files](https://api.itmc.i.moneyforward.com/api/v1/organizations/`\{organizationId}`/services/`\{serviceId}`/files)

This returns a list of files for the specified `ServiceID`.

`organizationId` is the ID assigned to each individual tenant.

#### **Preparing Your Execution Environment**

* Web API execution environment
  Prepare an environment to call the Web API. Options include Python and CLI (curl). This guide uses the following Chrome extension:
  [Talend API Tester - Free Edition](https://chrome.google.com/webstore/detail/talend-api-tester-free-ed/aejoelaoggembcahagimdiliamlcdmfm)
* File conversion tool
  Convert the JSON output from the API to CSV or Excel format. A service like the following works well:
  [JSON to CSV Converter](https://data.page/json/csv)

#### **Steps (Exporting the Google Drive Public File List)**

#### **Finding Your OrganizationID**

The **Organization ID** shown under **Settings** > **API Keys** is your OrganizationID. Copy it for later use.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6yb06ewr4f/1756856842750-2025-09-03-8-46-13.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=bf250bb874805c4e1d2fbee6550821ab" alt="Organization ID screen" width="1298" height="312" data-path="images/it-management/6yb06ewr4f/1756856842750-2025-09-03-8-46-13.png" />

#### **Generating an API Key**

1. Go to **Settings** > **API Keys** and click **Generate API Key**.

2. On the "Generate API Key" screen, enter a name for the key and click **Generate**.

   <img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6yb06ewr4f/1756857293579-2025-09-03-8-52-59.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=247f572acba8d78d7acecca31cf83536" alt="API key generation screen" width="732" height="454" data-path="images/it-management/6yb06ewr4f/1756857293579-2025-09-03-8-52-59.png" />

3. Your API key will be issued. Copy and save it.
   Note: This key is required to call the API. It is displayed only once, so save it before closing the dialog.

   <img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6yb06ewr4f/1756857104566-2025-09-03-8-48-51.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=73c307e61adcc89c34597eefe81d6770" alt="API key display screen" width="2554" height="812" data-path="images/it-management/6yb06ewr4f/1756857104566-2025-09-03-8-48-51.png" />

#### **Finding the Service ID**

Find the ServiceID for the service whose file data you want to retrieve. Click on the relevant service and check the URL to see its ServiceID.

<img src="https://mintcdn.com/moneyforwardi/abaHWZT0tTzI_Qae/images/it-management/6yb06ewr4f/1783672352481-2026-07-10-17-31-51.png?fit=max&auto=format&n=abaHWZT0tTzI_Qae&q=85&s=0d9707ec0bb6a02104933d37a3f4306a" alt="ServiceID confirmation screen" width="1920" height="740" data-path="images/it-management/6yb06ewr4f/1783672352481-2026-07-10-17-31-51.png" />

For Google Drive, the ServiceID is `384`.

#### **Running the API**

Start your Web API execution environment and call the API.

<Accordion title="Example using the curl command">
  ```bash theme={null}
  curl -i -X GET -H "Authorization:Bearer <API key>" https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationID}/services/384/files'
  ```

  This outputs Google Drive files (up to 200 items).
</Accordion>

Below is a sample execution using [Talend API Tester - Free Edition](https://chrome.google.com/webstore/detail/talend-api-tester-free-ed/aejoelaoggembcahagimdiliamlcdmfm).

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6yb06ewr4f/1689917158737-image.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=3a9d9c66e47296226b4c4a37f85812ea" alt="Talend API Tester execution example" width="2710" height="1114" data-path="images/it-management/6yb06ewr4f/1689917158737-image.png" />

#### **Setting Authentication Credentials**

Set the authentication credentials to access the service as follows:

`Authorization:Bearer <API key>`

#### **Specifying Query Parameters**

You can filter the output by specifying query parameters. For example, you can limit results to files owned by admins or files shared publicly.

The available query parameters are listed below.

<Accordion title="Query parameters to output 10 public files">
  ```
  limit=10
  sharingStatus=pubilc
  https://api.itmc.i.moneyforward.com/api/v1/organizations/99579724/services/384/files?limit=10&sharingStatus=pubilc
  ```
</Accordion>

| Parameter         | Description                                                                                                                                                                                                                                                                      |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **keyword**       | Filter by a keyword in the file name.                                                                                                                                                                                                                                            |
| **workspaceId**   | Filter by workspace ID to retrieve files from a specific workspace.                                                                                                                                                                                                              |
| **sharingStatus** | Filter by sharing status.<br />`"public"`: Files shared with everyone<br />`"shared"`: Files shared externally                                                                                                                                                                   |
| **limit**         | Set the number of results. Maximum is 200. Defaults to 50 if not specified.<br />Example: `limit=50`                                                                                                                                                                             |
| **sortBy**        | Sort results by the specified field. Available sort fields:<br />`"fileName"`: File name<br />`"source"`: Source SaaS<br />`"sharingStatus"`: Sharing status<br />`"creationDate"`: File creation date<br />`"workspaceId"`: Workspace ID<br />`"workspaceName"`: Workspace name |
| **FileType**      | Filter by type.<br />`"file"`: Retrieve files only<br />`"folder"`: Retrieve folders only                                                                                                                                                                                        |
| **owners**        | Filter by file owner (email address).                                                                                                                                                                                                                                            |
| **sortOrder**     | Set the sort direction.<br />`"DESC"`: Descending<br />`"ASC"`: Ascending                                                                                                                                                                                                        |

#### **Checking the Results**

When the API call succeeds, results appear in the Body section.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6yb06ewr4f/1689918479133-image.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=350f708134c6374d8ec64fd83427af55" alt="Execution results screen" width="1584" height="1598" data-path="images/it-management/6yb06ewr4f/1689918479133-image.png" />

* Meta > nextCursor
  When more than 200 results are returned, use this cursor to retrieve items 201 and beyond. Pass the `nextCursor` value as a query parameter to retrieve the next page of results.
* Item: Details for each individual file.

#### **Exporting JSON and Converting to CSV**

Download the results to save them as a JSON file.

Then convert the downloaded JSON file to CSV format.

Visit a service such as [JSON to CSV Converter](https://data.page/json/csv), upload the JSON file, and download the resulting CSV.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6yb06ewr4f/1689921955819-image.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=9dbffe6c025ee34b8ceacc5d5424b040" alt="JSON to CSV Converter screen" width="1921" height="909" data-path="images/it-management/6yb06ewr4f/1689921955819-image.png" />
