{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Location Scraper - Posts by Place, Top and Recent",
    "description": "Instagram location scraper: posts by location ID or place URL. A place page has two feeds, Top and Recent, holding different posts, and you get both. Each row has the caption, likes, comments, media URLs, owner, timestamp and place id. About 70 posts per place. $0.40 per 1,000 posts.",
    "version": "0.1",
    "x-build-id": "W8sCYt866lBMnv2du"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~instagram-location-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-instagram-location-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/dami_studio~instagram-location-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-instagram-location-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/dami_studio~instagram-location-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-instagram-location-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",
        "properties": {
          "locationIds": {
            "title": "Location IDs",
            "type": "array",
            "description": "Instagram location/place ids (number in /explore/locations/{id}/).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Location URLs",
            "type": "array",
            "description": "Or paste place links such as instagram.com/explore/locations/{id}/. You can mix links and ids in one run.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Find places by name",
            "type": "array",
            "description": "Optional paid add-on. Type a place's name, for example Katz's Delicatessen New York, with the city or country if you know it. The run writes a free row with the name and coordinates of the place it picked, so you can check them, then reads its posts as if you had given its id. If it picked the wrong one, add more of the name or give the id. If no place matches you get one free row, no posts and no charge. Up to 10 names a run. When the add-on is not available on a run, that run writes one free row and searches nothing.",
            "items": {
              "type": "string"
            }
          },
          "placesPerTerm": {
            "title": "Places to read for each name",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many of the places that match a name to read, the likeliest first. A name can match fewer than this. Their posts count toward Max posts.",
            "default": 1
          },
          "resultsLimit": {
            "title": "Max posts",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Posts for the whole run, not for each place: several places share it, filled in the order given. You are charged per post, so this is also your budget for the run.",
            "default": 50
          },
          "maxPostsPerPlace": {
            "title": "Max posts per place",
            "minimum": 5,
            "maximum": 2000,
            "type": "integer",
            "description": "Optional. Stop each place at this many posts, so the later places get read too. Max posts still caps the whole run. Leave it empty to let the first places fill the run."
          },
          "newerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Keep only posts from this day on, counted in UTC, or from a window such as 7 days. With a date set, the run reads only the place's Recent feed. Posts left out are not delivered and not charged. Leave it empty for no date limit."
          },
          "postTypes": {
            "title": "Post types",
            "enum": [
              "all",
              "photos",
              "videos"
            ],
            "type": "string",
            "description": "Keep only one kind of post. Videos and reels only reads the place's Recent feed, where nearly all of them are.",
            "default": "all"
          },
          "includePlaceDetails": {
            "title": "Add a place details row",
            "type": "boolean",
            "description": "One free row for each place read: its name, post count, category, address, city and coordinates, and the phone and website the place lists, where it lists them.",
            "default": false
          },
          "commentsPerPost": {
            "title": "Comments per post",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Optional paid add-on. Adds up to this many of a post's comments to its row, in the order Instagram shows them. Set it to 12 or more. Posts with only a few comments come back without them, and no comments are charged for those. Leave it empty for no comments. When the add-on is not available on a run, that run writes one free row and reads the posts without comments."
          },
          "notionConnector": {
            "title": "Notion connector ID (optional)",
            "type": "string",
            "description": "Optional Notion delivery."
          },
          "notionParentId": {
            "title": "Notion data-source ID (optional)",
            "type": "string",
            "description": "Optional Notion data-source id."
          },
          "sessionCookies": {
            "title": "Account cookies (not needed)",
            "type": "array",
            "description": "Optional: your own session, used only for your run. You are responsible for using it within the site's terms. Runs work without it."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Your own proxy servers, if you enter any, are used exactly as given."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}