{
  "openapi": "3.0.1",
  "info": {
    "title": "Influencer Collection & Export",
    "description": "Submit creator collection jobs by profile links, usernames, keywords, creator videos, or post videos, then fetch data or export xlsx/csv/html files.",
    "version": "1.0",
    "x-build-id": "vq0mRgSjqeBgRaEA0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/creativault~creativault-collection-export/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-creativault-creativault-collection-export",
        "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/creativault~creativault-collection-export/runs": {
      "post": {
        "operationId": "runs-sync-creativault-creativault-collection-export",
        "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/creativault~creativault-collection-export/run-sync": {
      "post": {
        "operationId": "run-sync-creativault-creativault-collection-export",
        "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": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "What do you want to do?",
            "enum": [
              "collectionSubmit",
              "keywordCollectionSubmit",
              "collectionStatus",
              "collectionData",
              "collectionExport"
            ],
            "type": "string",
            "description": "Choose the workflow. Failed requests and status polling are not charged.",
            "default": "collectionSubmit"
          },
          "platform": {
            "title": "Platform for new collection tasks",
            "enum": [
              "",
              "tiktok",
              "youtube",
              "instagram",
              "twitter"
            ],
            "type": "string",
            "description": "Platform used when starting a new collection task. Twitter/X supports only profile URLs and usernames.",
            "default": "tiktok"
          },
          "taskType": {
            "title": "What will you provide?",
            "enum": [
              "LINK_BATCH",
              "FILE_UPLOAD",
              "CREATOR_VIDEO",
              "POST_VIDEO"
            ],
            "type": "string",
            "description": "Choose what the Values list contains. Twitter/X supports only profile URLs and usernames, not video collection.",
            "default": "LINK_BATCH"
          },
          "values": {
            "title": "Values for URL/username/video collection",
            "type": "array",
            "description": "Used by URL/username/video collection. Add profile URLs for profile collection, usernames for username collection, profile URLs for creator-video collection, or post/video URLs for post-video collection.",
            "items": {
              "type": "string"
            },
            "default": [
              "https://www.tiktok.com/@momentosforest"
            ]
          },
          "keywords": {
            "title": "Keywords for keyword collection",
            "type": "array",
            "description": "Used only by keyword collection. Add up to 10 keywords or hashtags to discover and collect matching creators.",
            "items": {
              "type": "string"
            }
          },
          "taskName": {
            "title": "New task name",
            "type": "string",
            "description": "Optional name shown in collection task records.",
            "default": "Apify sample collection"
          },
          "webhookUrl": {
            "title": "Completion webhook URL",
            "type": "string",
            "description": "Optional HTTPS callback URL called when the collection task completes."
          },
          "startTime": {
            "title": "Video/keyword collection start time",
            "minimum": 0,
            "type": "integer",
            "description": "Optional Unix timestamp in seconds. Mainly used by creator-video and keyword collection. Leave empty to use the backend default."
          },
          "endTime": {
            "title": "Video/keyword collection end time",
            "minimum": 0,
            "type": "integer",
            "description": "Optional Unix timestamp in seconds. Defaults to current time when omitted."
          },
          "waitForCompletion": {
            "title": "Wait for task completion",
            "type": "boolean",
            "description": "Poll task status before finishing. Status polling itself is free.",
            "default": false
          },
          "pollIntervalSeconds": {
            "title": "Poll interval seconds",
            "minimum": 1,
            "type": "integer",
            "description": "Polling interval for async tasks.",
            "default": 60
          },
          "maxPollAttempts": {
            "title": "Max poll attempts",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum polling attempts before timing out.",
            "default": 45
          },
          "taskId": {
            "title": "Existing collection task ID",
            "type": "string",
            "description": "Required for checking status, fetching records, or exporting a completed collection task."
          },
          "fetchData": {
            "title": "After waiting, also fetch records",
            "type": "boolean",
            "description": "Only used when starting a task with Wait for task completion enabled. For the standalone Fetch records operation, records are fetched automatically. Returned records are charged at $2 per 1,000 records.",
            "default": false
          },
          "exportFormat": {
            "title": "Export file format",
            "enum": [
              "",
              "xlsx",
              "csv",
              "html",
              "feishu_doc"
            ],
            "type": "string",
            "description": "Used by Export an existing task. Also used after submitting a task when Wait for task completion is enabled. Leave as Do not export to avoid automatic export after submit. Standalone export defaults to xlsx if omitted.",
            "default": ""
          },
          "maxResults": {
            "title": "Max records to fetch",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum records to fetch and charge for when using Fetch task data.",
            "default": 100
          },
          "size": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Page size for fetching task records.",
            "default": 50
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for temporary CreatiVault API rate-limit and server errors.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}