{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Sheets Import: Read Sheet Rows to JSON/CSV",
    "description": "Read rows from a Google Sheet into an Apify dataset (JSON/CSV): public link or your service account, tab/range, headers, number/boolean/date types. Empty input = free demo. $0.05 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "8LkwSakj4vBTZ9P6Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~google-sheets-import/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-google-sheets-import",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/ucchiii~google-sheets-import/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-google-sheets-import",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/ucchiii~google-sheets-import/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-google-sheets-import",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "spreadsheet": {
            "title": "Spreadsheet URL or ID",
            "type": "string",
            "description": "The Google Sheet to read: paste its URL or the ID. Without a service account key the sheet must be shared as 'Anyone with the link' (Viewer). Leave empty for a free demo on a Google sample sheet (not charged)."
          },
          "serviceAccountKey": {
            "title": "Service account key (JSON, optional)",
            "type": "string",
            "description": "Only for private sheets: paste the full JSON key of your own Google service account and share the sheet (Viewer) with its client_email. It is used only in memory during the run and is never logged or stored. Leave empty to read a public sheet."
          },
          "sheetName": {
            "title": "Sheet (tab) name",
            "type": "string",
            "description": "Name of the tab to read, for example 'Leads'. If empty, the gid below or the #gid= in the URL is used, otherwise the first tab. With a public sheet and no key, prefer sheetGid for exact values."
          },
          "sheetGid": {
            "title": "Sheet (tab) gid",
            "minimum": 0,
            "type": "integer",
            "description": "Numeric tab id: the number after #gid= in the browser URL (the first tab is usually 0). Used when the tab name is empty."
          },
          "range": {
            "title": "Range (optional)",
            "type": "string",
            "description": "Cells to read in A1 notation, for example A1:F500, A:F or 2:100. Empty = the whole tab. The first row of the range is the header row."
          },
          "headerMode": {
            "title": "Header row",
            "enum": [
              "first",
              "none"
            ],
            "type": "string",
            "description": "How to name the columns. Empty or duplicate headers are fixed automatically (column_3, name_2).",
            "default": "first"
          },
          "skipTopRows": {
            "title": "Rows to skip above the header",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Ignore this many rows at the top (titles, notes) before the header row. Default 0.",
            "default": 0
          },
          "coerceTypes": {
            "title": "Convert value types",
            "type": "boolean",
            "description": "Master switch. On: cells that look like numbers, booleans (TRUE/FALSE) or dates become real JSON numbers, booleans and ISO dates; everything else stays text. Off: all values stay text. Empty cells are always null. Values with leading zeros (ZIP codes) stay text.",
            "default": true
          },
          "coerceNumbers": {
            "title": "Convert numbers",
            "type": "boolean",
            "description": "Cells like 42, -3.5, 1e6 or 1,234.50 become numbers. Needs 'Convert value types' on.",
            "default": true
          },
          "coerceBooleans": {
            "title": "Convert booleans",
            "type": "boolean",
            "description": "TRUE / FALSE (any case) become true / false. Needs 'Convert value types' on.",
            "default": true
          },
          "coerceDates": {
            "title": "Convert dates",
            "type": "boolean",
            "description": "Cells like 2026-03-31, 2026/03/31 or 2026-03-31 14:30 become ISO text (2026-03-31, 2026-03-31T14:30:00). Needs 'Convert value types' on.",
            "default": true
          },
          "dateFormat": {
            "title": "Day/month order for 03/31/2026-style dates",
            "enum": [
              "ymd",
              "mdy",
              "dmy"
            ],
            "type": "string",
            "description": "Slash and dot dates such as 03/31/2026 are ambiguous, so they are converted only if you choose the order here. Unconvertible values stay as text.",
            "default": "ymd"
          },
          "skipEmptyRows": {
            "title": "Skip empty rows",
            "type": "boolean",
            "description": "Leave out rows where every cell is blank. Skipped rows are not charged.",
            "default": true
          },
          "maxRows": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many data rows (header excluded). Rows beyond it are not saved or charged. Default 10,000.",
            "default": 10000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}