{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper: Profiles, Posts, Reels & People Search",
    "description": "Scrape public Instagram profiles, recent posts and Reels, or discover people by keyword. Managed session and proxies are included. Export structured data and monitor accounts for new content.",
    "version": "0.3",
    "x-build-id": "8n6UnND7cEZ6mt52J"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/stefanie-rink~instagram-intelligence-mvp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-stefanie-rink-instagram-intelligence-mvp",
        "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/stefanie-rink~instagram-intelligence-mvp/runs": {
      "post": {
        "operationId": "runs-sync-stefanie-rink-instagram-intelligence-mvp",
        "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/stefanie-rink~instagram-intelligence-mvp/run-sync": {
      "post": {
        "operationId": "run-sync-stefanie-rink-instagram-intelligence-mvp",
        "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": {
          "searchTerms": {
            "title": "People search terms",
            "maxItems": 100,
            "type": "array",
            "description": "Keywords for Instagram people search, such as \"coffee roaster\". Each term returns ranked accounts. Public matches are collected, and private matches are listed only in the search outcomes. Up to 100 terms of up to 200 characters. Search results fill the profile slots left after usernames and profile URLs.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "usernames": {
            "title": "Usernames",
            "maxItems": 100,
            "type": "array",
            "description": "Instagram usernames to collect, with or without @. Case-insensitive, and duplicates are removed. Usernames are collected before search results. Private profiles return the profile record only. Up to 100.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "startUrls": {
            "title": "Profile URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Instagram profile URLs, such as https://www.instagram.com/natgeo/. Post, Reel, Story, Explore, and other non-profile URLs are rejected before the run starts. Up to 100.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "maxProfiles": {
            "title": "Max profiles (whole run)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum unique profiles in the whole run, from usernames, profile URLs, and search combined. A profile entered twice uses one slot.",
            "default": 20
          },
          "searchResultsPerTerm": {
            "title": "Max search matches per term",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many top-ranked matches to take from each people search term. Private matches use a slot but are not collected. Max profiles still caps the total.",
            "default": 10
          },
          "postsPerProfile": {
            "title": "Recent posts and Reels per profile",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many of the most recent profile-feed items (posts, Reels, and videos) to collect per profile. Reels are included when they appear in the feed. Set 0 to collect profile records only.",
            "default": 10
          },
          "onlyNew": {
            "title": "Only new posts and Reels",
            "type": "boolean",
            "description": "Skip posts and Reels that an earlier run already saved. Checks only the recent window set by posts and Reels per profile, and does not look further back. Profile records are always returned. Requires the state store below.",
            "default": false
          },
          "stateStoreId": {
            "title": "Only-new state store",
            "minLength": 1,
            "type": "string",
            "description": "Required when Only new is on. Name or ID of a Key-Value Store that remembers saved content between runs. Use the same value on every run."
          },
          "maxResults": {
            "title": "Max dataset records (profiles + content)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop the run after this many dataset records, counting profile records and content records together. Search outcomes, diagnostics, and the run summary do not count.",
            "default": 1000
          },
          "allowPartialResults": {
            "title": "Allow partial results",
            "type": "boolean",
            "description": "By default, a failed search, profile, or feed request marks the run as failed, while records already saved stay in the dataset. Turn on to let the run succeed with status partial when at least one record was saved. Runs with no records and storage errors always fail.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}