{
  "openapi": "3.0.1",
  "info": {
    "title": "Zalo Exporter - Group Members, Contacts and Chats",
    "description": "Connect your Zalo account by QR and export joined groups, visible members, contacts, profiles, or bounded chat history to CSV/JSON. Choose a guided preset, reuse the encrypted session, and track conversation completeness and run limits.",
    "version": "0.1",
    "x-build-id": "m3aP08j51kjkYb3ph"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kazkn~zalo-member-profile-exporter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kazkn-zalo-member-profile-exporter",
        "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/kazkn~zalo-member-profile-exporter/runs": {
      "post": {
        "operationId": "runs-sync-kazkn-zalo-member-profile-exporter",
        "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/kazkn~zalo-member-profile-exporter/run-sync": {
      "post": {
        "operationId": "run-sync-kazkn-zalo-member-profile-exporter",
        "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": {
          "exportMode": {
            "title": "📦 Export preset",
            "enum": [
              "groupRoster",
              "contactsAndProfiles",
              "conversationBackup",
              "completeSnapshot"
            ],
            "type": "string",
            "description": "Select the result you want. The preset configures the right data automatically.",
            "default": "groupRoster"
          },
          "messagesSince": {
            "title": "📅 Messages from",
            "type": "string",
            "description": "Optional. Choose a date to limit cost and runtime. Leave empty to read as far back as Zalo returns."
          },
          "includeMessageText": {
            "title": "📝 Include message text",
            "type": "boolean",
            "description": "When disabled, message bodies are omitted from the Dataset.",
            "default": true
          },
          "includeAttachmentMetadata": {
            "title": "📎 Include attachment details",
            "type": "boolean",
            "description": "Includes names, links and thumbnails when visible. Files themselves are never downloaded.",
            "default": true
          },
          "accountAlias": {
            "title": "🏷️ Saved account name",
            "pattern": "^[a-z0-9-]{1,40}$",
            "minLength": 1,
            "maxLength": 40,
            "type": "string",
            "description": "Leave this as “main”. For another account, use a separate lowercase label such as “work-account”.",
            "default": "main"
          },
          "reconnectZalo": {
            "title": "🔄 Refresh this saved login",
            "type": "boolean",
            "description": "Leave disabled. Enable only when the login saved under this name expired or was revoked. It cannot switch this saved name to another Zalo account; use a new saved account name instead.",
            "default": false
          },
          "groupIds": {
            "title": "👥 Only these group IDs",
            "maxItems": 500,
            "type": "array",
            "description": "Optional. Enter joined group IDs; leave empty to process all joined groups within the safety limit.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "default": []
          },
          "conversationIds": {
            "title": "💬 Only these conversation IDs",
            "maxItems": 500,
            "type": "array",
            "description": "Optional. Enter accessible conversation IDs; leave empty to discover conversations within the safety limit.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "default": []
          },
          "maxGroups": {
            "title": "👥 Maximum groups",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stops after this many joined groups.",
            "default": 1
          },
          "maxMembersPerGroup": {
            "title": "🧑‍🤝‍🧑 Members per group",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stops after this many visible members in each group.",
            "default": 100
          },
          "maxConversations": {
            "title": "💬 Conversations per type",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stops after this many visible direct conversations and this many joined-group conversations.",
            "default": 3
          },
          "maxMessagesPerConversation": {
            "title": "📨 Messages per conversation",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stops after this many messages in each conversation. The Actor loads older pages automatically, with a safe delay between requests.",
            "default": 200
          },
          "listenSeconds": {
            "title": "⏱️ Wait for new messages (seconds)",
            "minimum": 0,
            "maximum": 900,
            "type": "integer",
            "description": "Optional. Keep 0 unless you want the run to wait for newly received messages.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}