{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Posts Scraper With Creator Profiles",
    "description": "Instagram Posts Scraper extracts posts from Instagram profiles or URLs. It collects captions, post URLs, images, videos, likes, comments, hashtags, and publish dates. Ideal for influencer research, content analysis, competitor monitoring, and social media data collection.",
    "version": "0.1",
    "x-build-id": "mwoh9ad7rmxZ7aFmB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraper-engine~instagram-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraper-engine-instagram-posts-scraper",
        "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/scraper-engine~instagram-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scraper-engine-instagram-posts-scraper",
        "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/scraper-engine~instagram-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scraper-engine-instagram-posts-scraper",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "🔗 Profile URLs, Usernames, or Post Shortcodes",
            "type": "array",
            "description": "List one or more Instagram profile URLs (e.g. https://www.instagram.com/username), usernames (e.g. username), or post shortcodes (e.g. ABC123DEF). The actor auto-detects the input type and resolves post shortcodes to their author's username. Example: [\"https://www.instagram.com/cristiano/\"].",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "📦 Maximum Posts to Scrape Per Profile",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of posts to scrape per profile (1-1000). Default is 10.",
            "default": 10
          },
          "dateFilterType": {
            "title": "📅 Date Filter Mode",
            "enum": [
              "absolute",
              "relative"
            ],
            "type": "string",
            "description": "Choose your date filter mode: an absolute calendar date, or a relative time range (e.g. 7d, 2w, 3m). Default: relative.",
            "default": "relative"
          },
          "filterDate": {
            "title": "📆 Only Posts Newer Than",
            "pattern": "^(|\\d{4}-\\d{2}-\\d{2}|\\d+[hdwmy])$",
            "type": "string",
            "description": "With Absolute mode use a calendar date (YYYY-MM-DD). With Relative mode (the default) use a value like 7d (7 days), 2w (2 weeks), 3m (3 months), or 1y (1 year). Leave empty to skip the date filter.",
            "default": ""
          },
          "includeCreatorProfile": {
            "title": "👤 Attach Creator Profile to Every Post",
            "type": "boolean",
            "description": "Fetch each post author's public profile ONCE per unique creator per run (cached, not re-fetched per post) and attach it to every post row from that creator: bio, external link, follower/following counts, verified and private status (all reliably populated). Also attempts business category, public email/phone, and media count when Instagram's public profile view exposes them for that account — otherwise those four fields are null, never faked. Default: enabled.",
            "default": true
          },
          "includeCreatorSummary": {
            "title": "📊 Add Per-Creator Summary Row",
            "type": "boolean",
            "description": "Adds one extra dataset row per unique profile in this run's results (type: \"creatorSummary\") holding that creator's profile snapshot plus aggregate stats across the posts collected this run: posts collected, average likes, average comments. Default: enabled.",
            "default": true
          },
          "includeEngagement": {
            "title": "📈 Include Post Engagement Metrics",
            "type": "boolean",
            "description": "Whether to include per-post engagement metrics (likes, views, comment count, share settings). Default: disabled.",
            "default": false
          },
          "includeVideoMetadata": {
            "title": "🎞️ Include Video Metadata",
            "type": "boolean",
            "description": "Whether to include detailed video metadata (duration, quality variants, codec) on video/reel posts. Default: disabled.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Configure the proxy used for every request (profile HTML, post feed, and the creator-profile lookup). Residential proxy is strongly recommended for reliable Instagram access. This selection is actually used by the run — not cosmetic."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}