{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Photos to Drive Backup",
    "description": "Download photos from public or shared Google Photos album links and upload them directly to your Google Drive. Automatically transfer images in bulk with no manual saving required.",
    "version": "1.0",
    "x-build-id": "TdiKenyRBkK9qp4K5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nec~photos-to-drive-backup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nec-photos-to-drive-backup",
        "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/nec~photos-to-drive-backup/runs": {
      "post": {
        "operationId": "runs-sync-nec-photos-to-drive-backup",
        "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/nec~photos-to-drive-backup/run-sync": {
      "post": {
        "operationId": "run-sync-nec-photos-to-drive-backup",
        "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",
        "required": [
          "googlePhotosShareLink",
          "destinationFolderId"
        ],
        "properties": {
          "googlePhotosShareLink": {
            "title": "📸 Google Photos Share Link",
            "type": "string",
            "description": "Public share link from Google Photos. Supports short form (https://photos.app.goo.gl/...), long form (https://photos.google.com/share/...), and user-scoped (https://photos.google.com/u/N/share/...) URLs."
          },
          "sharePassword": {
            "title": "🔒 Share Password (Optional)",
            "type": "string",
            "description": "Password if the Google Photos share is password-protected. Leave empty for public shares."
          },
          "destinationFolderId": {
            "title": "📁 Google Drive Destination Folder ID",
            "type": "string",
            "description": "The ID of the Google Drive folder where photos will be uploaded. Find it in the folder URL: https://drive.google.com/drive/folders/{FOLDER_ID}"
          },
          "googleClientId": {
            "title": "Google OAuth Client ID",
            "type": "string",
            "description": "Your Google Cloud OAuth 2.0 Client ID. Takes priority over the GOOGLE_CLIENT_ID environment variable. Required when using your own Google Cloud project."
          },
          "googleClientSecret": {
            "title": "Google OAuth Client Secret",
            "type": "string",
            "description": "Your Google Cloud OAuth 2.0 Client Secret. Takes priority over the GOOGLE_CLIENT_SECRET environment variable."
          },
          "googleRedirectUri": {
            "title": "Google OAuth Redirect URI",
            "type": "string",
            "description": "OAuth 2.0 redirect URI registered in your Google Cloud project. Defaults to http://localhost if not provided."
          },
          "oauthRefreshToken": {
            "title": "OAuth Refresh Token",
            "type": "string",
            "description": "Google OAuth2 refresh token. If provided, skips the interactive authorization flow entirely. Obtain one from the Google OAuth Playground (https://developers.google.com/oauthplayground) using your Client ID and Secret."
          },
          "createMonthlySubfolders": {
            "title": "🗂️ Create Monthly Subfolders",
            "type": "boolean",
            "description": "Organize photos into monthly subfolders (2024-01, 2024-02, etc.) based on the date the photo was taken. Photos without date metadata go into an 'undated' folder.",
            "default": true
          },
          "maxPhotosToDownload": {
            "title": "Max Photos to Download",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety limit: stop after downloading this many photos. Useful for testing with large albums. Set to a small number (e.g. 10) on your first run to verify everything works.",
            "default": 100000
          },
          "concurrentDownloads": {
            "title": "⚡ Concurrent Downloads",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Number of parallel photo downloads. Higher values are faster but increase the risk of rate limiting. Recommended: 2-4 for most use cases.",
            "default": 4
          },
          "includeMetadataFiles": {
            "title": "🏷️ Include Metadata Files",
            "type": "boolean",
            "description": "Save a .metadata.json sidecar file alongside each uploaded photo containing the original URL, date taken, file size, and MIME type.",
            "default": true
          },
          "skipIfDuplicateExists": {
            "title": "Skip Duplicate Files",
            "type": "boolean",
            "description": "If a file with the same name already exists in the destination folder, skip it instead of uploading a renamed copy. Useful when re-running the Actor on the same album.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}