{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Event Extractor — Posters, Dates & Changes",
    "description": "Turn public Instagram captions and event poster images into structured event records. Track new and changed events. Bring your own Gemini API key.",
    "version": "0.1",
    "x-build-id": "iqmzP5pI3ZpielcjV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/renaissant_vibraphone~instagram-event-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-renaissant_vibraphone-instagram-event-extractor",
        "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/renaissant_vibraphone~instagram-event-extractor/runs": {
      "post": {
        "operationId": "runs-sync-renaissant_vibraphone-instagram-event-extractor",
        "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/renaissant_vibraphone~instagram-event-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-renaissant_vibraphone-instagram-event-extractor",
        "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": [
          "source"
        ],
        "properties": {
          "source": {
            "title": "Data source",
            "enum": [
              "demo",
              "instagram",
              "dataset"
            ],
            "type": "string",
            "description": "Start with Demo. Select Instagram for live profiles, or Dataset to read a previous Instagram Post Scraper dataset.",
            "default": "demo"
          },
          "usernames": {
            "title": "Instagram usernames or profile URLs",
            "maxItems": 10,
            "type": "array",
            "description": "For Instagram mode only. Up to 10 public venue or organizer profiles. Example: @your_venue or https://www.instagram.com/your_venue/. No passwords or Instagram cookies.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "datasetId": {
            "title": "Existing Instagram posts dataset",
            "type": "string",
            "description": "For Dataset mode only. Select a dataset with fields such as id, caption, timestamp, displayUrl, images and childPosts. The Actor reads at most maxTotalPosts raw rows."
          },
          "geminiApiKey": {
            "title": "Your Gemini API key",
            "type": "string",
            "description": "Required for live modes, unless GEMINI_API_KEY is set in your private Actor environment. Get a key from Google AI Studio. Captions and selected images are sent to Gemini. Never publish a shared owner-funded key."
          },
          "defaultTimezone": {
            "title": "Default event timezone",
            "type": "string",
            "description": "IANA timezone, for example Europe/Rome or America/New_York. Used when the source provides no timezone and flagged as an assumption. Use separate monitors for different regions.",
            "default": "UTC"
          },
          "maxPostsPerProfile": {
            "title": "Maximum posts per profile",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Upper bound requested from each profile. Automatically lowered when needed to stay within maxTotalPosts across all profiles. Recent posts may include non-events or videos.",
            "default": 5
          },
          "maxTotalPosts": {
            "title": "Maximum total post records",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum raw dataset rows inspected per run, including skipped videos and errors. In Instagram mode must be at least the number of profiles.",
            "default": 50
          },
          "maxImagesPerPost": {
            "title": "Maximum images per post",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Poster/carousel images analyzed per post. Truncated carousels are flagged. Lower this to reduce image-analysis costs. Videos and Stories are not analyzed.",
            "default": 4
          },
          "maxEventsPerPost": {
            "title": "Maximum events per post",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum extracted occurrences per post. Dense monthly calendars may exceed this limit; inspect source and review flags.",
            "default": 10
          },
          "scraperBudgetCents": {
            "title": "Upstream scraper budget (US cents)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "50 means USD 0.50. Applied as maxTotalChargeUsd to the upstream pay-per-event scraper. It does not cap Gemini, this Actor's fee or total platform usage.",
            "default": 50
          },
          "monitorName": {
            "title": "Monitor history name",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{0,49}$",
            "type": "string",
            "description": "Keep this stable across scheduled runs. Use a different name for a fresh monitor. History is isolated by Actor, source profiles/dataset, model, timezone and extraction limits. Avoid overlapping runs for the same monitor.",
            "default": "instagram-events-history"
          },
          "onlyChanges": {
            "title": "Return only new or changed events",
            "type": "boolean",
            "description": "First run returns all eligible events. Later runs can return an empty dataset when nothing changed. Disable to return all events observed in the current post window.",
            "default": true
          },
          "includePastEvents": {
            "title": "Include past scheduled events",
            "type": "boolean",
            "description": "Compare dates in the event timezone. Undated records stay visible for review. Explicit cancellations and postponements remain eligible.",
            "default": false
          },
          "forceReprocess": {
            "title": "Analyze unchanged posts again",
            "type": "boolean",
            "description": "Bypass the successful-analysis cache. This makes new Gemini calls and can incur a post-analyzed fee again. Use when checking extraction quality or changing source images.",
            "default": false
          },
          "geminiModel": {
            "title": "Gemini model",
            "type": "string",
            "description": "An image-capable Gemini model supporting structured JSON output. Your API key must have access. Default checked against Google's model documentation on 2026-10-29.",
            "default": "gemini-3.5-flash-lite"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}