# Public Google Workspace Exporter: Sheets, Docs, Forms & Drive (`xyrelith-data/google-workspace-public-exporter`) Actor

Export public Google Sheets, Docs, Slides, Forms, Drive folders and Calendars without connecting a Google account. Reads typed sheet rows, document text and Markdown, slide notes, form questions, recursive folder metadata and calendar events from links shared with anyone.

- **URL**: https://apify.com/xyrelith-data/google-workspace-public-exporter.md
- **Developed by:** [Xyrelith Data](https://apify.com/xyrelith-data) (community)
- **Categories:** Automation, Developer tools, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Public Google Workspace Exporter

Turn links that are already shared with "anyone with the link" into a clean dataset — without
OAuth, a service account, an API key or a proxy setup.

Paste a mix of Google Sheets, Docs, Slides, Forms, Drive folder and Calendar links. The actor
detects each URL, fetches the public representation Google serves, and pushes one dataset with
record families for each product.

### What you get

| Link type | Records | Highlights |
|---|---|---|
| Google Sheets | `sheetRow` | Every tab or chosen tabs by name/gid, typed values, header detection, A1 range, GViz query, optional formulas and hyperlinks |
| Google Docs | `document` | Plain text, Markdown, word/character counts, paragraphs, headings, links and image metadata |
| Google Slides | `slide` | One record per slide with text, speaker notes, links and slide position |
| Google Forms | `form`, `formSection`, `formQuestion` | Title, description, sections, question type, options, required flag, entry IDs and grid rows (responses are never read) |
| Drive folders | `driveFolder`, `driveFile` | Recursive listing with name, ID, MIME type, size when Google exposes it, modified time, view/download URLs and folder path |
| Public Calendars | `calendar`, `calendarEvent` | Event title, start/end, location, description, recurrence, cancelled toggle and optional occurrence expansion |
| Bad or private links | `error` | A readable row instead of a silent empty run |

Every record carries `recordType`, `sourceUrl` and `scrapedAt` (UTC ISO). Empty fields are omitted,
so the dataset never contains `null`, `""`, `[]` or `{}`.

### Quick start

1. Share the Google file or folder with **Anyone with the link** (Viewer is enough).
2. Paste the link into **Public Google links**.
3. Run the actor. Mix as many links as you need.

Example input:

```json
{
  "mode": "auto",
  "startUrls": [
    "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit",
    "https://docs.google.com/document/d/1y5QhCZpn3XcaosbP3wAEtoNGluLHHLzvateNZNAI6Ek/edit",
    "https://drive.google.com/drive/folders/1LNkLh6Z10oFq2XsuKedRQaYjzc-CYj7C",
    "https://calendar.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics"
  ],
  "maxItems": 500
}
```

### Inputs

| Input | Default | Purpose |
|---|---|---|
| `mode` | `auto` | Auto-detect all links or force one product |
| `startUrls` | `["https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"]` | Required list of public Google links |
| `sheetTabs` | – | Tab names or numeric gids; empty means every tab |
| `sheetRange` | – | A1 range applied to each selected tab |
| `detectHeaders` | `true` | Turn a sheet row into field names |
| `headerRow` | `1` | Row used as the sheet header |
| `sheetQuery` | – | Google Visualization query such as `select A,B where C > 10` |
| `includeFormulas` | `false` | Add per-cell formulas to sheet rows |
| `includeHyperlinks` | `false` | Add per-cell links to sheet rows |
| `includeSlideNotes` | `true` | Keep or drop speaker notes |
| `folderMaxDepth` | `3` | How many subfolder levels to walk |
| `calendarFrom` | – | Inclusive lower date bound |
| `calendarTo` | – | Inclusive upper date bound |
| `calendarExpandRecurrences` | `false` | Turn RRULEs into individual occurrences |
| `calendarMaxOccurrences` | `100` | Occurrence cap per recurring event |
| `calendarIncludeCancelled` | `false` | Keep ICS events marked CANCELLED |
| `maxItems` | `1000` | Global record cap |
| `emitErrorRecords` | `true` | Keep or suppress error rows |
| `requestTimeoutSecs` | `30` | Per-request timeout |

### Output examples

A typed sheet row:

```json
{
  "recordType": "sheetRow",
  "spreadsheetId": "1Bxi…",
  "spreadsheetTitle": "Example Spreadsheet",
  "sheetTitle": "Class Data",
  "rowNumber": 2,
  "values": {
    "Student Name": "Alexandra",
    "Gender": "Female",
    "Class Level": "4. Senior",
    "Home State": "CA",
    "Major": "English",
    "Extracurricular Activity": "Drama Club"
  },
  "sourceUrl": "https://docs.google.com/spreadsheets/d/…/edit",
  "scrapedAt": "2026-11-17T02:00:00+00:00"
}
```

A folder entry:

```json
{
  "recordType": "driveFile",
  "driveId": "1ndpRegCxnAXJ8-3kr4DeVZynqUCWm7nT",
  "name": "attackers_prog-1.png",
  "mimeType": "image/png",
  "size": 224859,
  "modifiedTime": "2021-02-08T13:55:20+00:00",
  "isFolder": false,
  "parentFolderId": "1LNkLh6Z10oFq2XsuKedRQaYjzc-CYj7C",
  "folderPath": ["Villa Article"],
  "folderPathString": "Villa Article",
  "depth": 1,
  "viewUrl": "https://drive.google.com/file/d/1ndpRegCxnAXJ8-3kr4DeVZynqUCWm7nT/view",
  "downloadUrl": "https://drive.google.com/uc?export=download&id=1ndpRegCxnAXJ8-3kr4DeVZynqUCWm7nT"
}
```

### Notes on public links

Google serves different public endpoints per product, and this actor uses the widest one it can
reach anonymously:

- Sheets: XLSX export for all tabs with typed values; Google Visualization JSON for gid/query/range
  selections.
- Docs: TXT, Markdown and HTML exports; image payloads stay out of the dataset, but their MIME type,
  alt text and byte size are listed.
- Slides: PPTX export, with slide text and notes read from the presentation package.
- Forms: the public responder page's `FB_PUBLIC_LOAD_DATA_` definition. The actor never submits a
  response.
- Drive: the folder page's rich JSON for the first entries plus the public embedded listing for the
  full folder, merged by file ID.
- Calendars: the public `basic.ics` feed.

### Limitations

- Only content shared publicly or with "anyone with the link" is readable. A private file returns an
  `error` row; it is not bypassed.
- "Publish to web" links that use the `/d/e/…` form are view-only HTML pages and do not expose the
  export endpoints used here. Use the normal `/d/…/edit` share link instead.
- Google exposes byte sizes for the first entries of a Drive folder; later entries in a very large
  folder are listed without `size`.
- Docs images are embedded as data URIs in Google's export. The actor reports their metadata, not
  the bytes.
- Forms are read-only. Submitting answers is intentionally out of scope.
- Calendar times with a `TZID` are returned as the ICS local time plus `startTzid`; UTC (`Z`) values
  are normalised to an ISO timestamp with an offset.
- Recurrence expansion covers DAILY, WEEKLY, MONTHLY and YEARLY FREQ with INTERVAL, COUNT, UNTIL,
  BYDAY, BYMONTH and BYMONTHDAY. Complex rules such as `BYSETPOS` are returned as the original
  `recurrence` string without expansion.

### FAQ

**Do I need a Google account or API key?** No. Every request is an anonymous HTTPS GET.

**Does it use a proxy?** No proxy is needed. Requests go directly from the actor.

**Can I export several files at once?** Yes. Put every public link in `startUrls`; one bad link does
not stop the others.

**Can I choose only some tabs?** Yes. Use tab names (`Orders`, `Summary`) or numeric gids (`0`,
`123456789`) in `sheetTabs`.

**Does it download Drive files?** No. It exports metadata and view/download links. Downloading file
bytes is a separate job.

**Are my form responses read?** No. The actor reads the public question definition only.

# Actor input Schema

## `mode` (type: `string`):

Export every detected source, or restrict the run to one Google product.

## `startUrls` (type: `array`):

Links shared with 'Anyone with the link'. Sheets, Docs, Slides, Forms, Drive folders and public Calendar ICS feeds can be mixed.

## `sheetTabs` (type: `array`):

Leave empty to export every tab. Add tab names such as 'Orders' or numeric gids such as '0'. Only applies to Sheets URLs.

## `sheetRange` (type: `string`):

Optional cell range such as A1:F200, A1:F, or A:F applied to each selected sheet tab.

## `detectHeaders` (type: `boolean`):

When on, the chosen row becomes the field names. When off, columns are named columnA, columnB, and so on.

## `headerRow` (type: `integer`):

1-based row used as the header when header detection is on.

## `sheetQuery` (type: `string`):

Optional filter such as select A,B where C > 10 order by A. Uses the public Google Visualization query language for Sheets.

## `includeFormulas` (type: `boolean`):

Add a formulas object to sheet rows with the original formula for cells that contain one. XLSX path only.

## `includeHyperlinks` (type: `boolean`):

Add a hyperlinks object to sheet rows with the link target for cells that contain one. XLSX path only.

## `includeSlideNotes` (type: `boolean`):

Add the speaker notes text to each slide record.

## `folderMaxDepth` (type: `integer`):

How many subfolder levels to descend. 0 lists the root folder only; 3 lists root, children, grandchildren and great-grandchildren entries.

## `calendarFrom` (type: `string`):

Optional inclusive lower bound as YYYY-MM-DD or an ISO date-time. Events that end before this bound are skipped.

## `calendarTo` (type: `string`):

Optional inclusive upper bound as YYYY-MM-DD or an ISO date-time. Events that start after this bound are skipped.

## `calendarExpandRecurrences` (type: `boolean`):

When on, daily, weekly, monthly and yearly RRULE events become one record per occurrence inside the date window.

## `calendarMaxOccurrences` (type: `integer`):

Safety cap when recurrence expansion is on.

## `calendarIncludeCancelled` (type: `boolean`):

Keep events whose ICS status is CANCELLED.

## `maxItems` (type: `integer`):

Stop after this many records. One sheet row, one slide, one question, one file and one event each count as one record.

## `emitErrorRecords` (type: `boolean`):

Push a clear error record for links that are private, deleted, unsupported or temporarily unreachable.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout for Google endpoints.

## Actor input object example

```json
{
  "mode": "auto",
  "startUrls": [
    "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"
  ],
  "sheetTabs": [],
  "detectHeaders": true,
  "headerRow": 1,
  "includeFormulas": false,
  "includeHyperlinks": false,
  "includeSlideNotes": true,
  "folderMaxDepth": 3,
  "calendarExpandRecurrences": false,
  "calendarMaxOccurrences": 100,
  "calendarIncludeCancelled": false,
  "maxItems": 5,
  "emitErrorRecords": true,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset with every exported record.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "auto",
    "startUrls": [
        "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"
    ],
    "sheetTabs": [],
    "detectHeaders": true,
    "headerRow": 1,
    "includeFormulas": false,
    "includeHyperlinks": false,
    "includeSlideNotes": true,
    "folderMaxDepth": 3,
    "calendarExpandRecurrences": false,
    "calendarMaxOccurrences": 100,
    "calendarIncludeCancelled": false,
    "maxItems": 5,
    "emitErrorRecords": true,
    "requestTimeoutSecs": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("xyrelith-data/google-workspace-public-exporter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "auto",
    "startUrls": ["https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"],
    "sheetTabs": [],
    "detectHeaders": True,
    "headerRow": 1,
    "includeFormulas": False,
    "includeHyperlinks": False,
    "includeSlideNotes": True,
    "folderMaxDepth": 3,
    "calendarExpandRecurrences": False,
    "calendarMaxOccurrences": 100,
    "calendarIncludeCancelled": False,
    "maxItems": 5,
    "emitErrorRecords": True,
    "requestTimeoutSecs": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("xyrelith-data/google-workspace-public-exporter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "auto",
  "startUrls": [
    "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"
  ],
  "sheetTabs": [],
  "detectHeaders": true,
  "headerRow": 1,
  "includeFormulas": false,
  "includeHyperlinks": false,
  "includeSlideNotes": true,
  "folderMaxDepth": 3,
  "calendarExpandRecurrences": false,
  "calendarMaxOccurrences": 100,
  "calendarIncludeCancelled": false,
  "maxItems": 5,
  "emitErrorRecords": true,
  "requestTimeoutSecs": 30
}' |
apify call xyrelith-data/google-workspace-public-exporter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xyrelith-data/google-workspace-public-exporter"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/j6ydswobgsBMX3Fr8/builds/RIHNoFJM1jE7F1PhX/openapi.json
