{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Trends Scraper",
    "description": "Instagram trends scraper: Instagram's own trending board as rows, with trending keywords and hashtags, rising profiles, categories and post counts. Add each keyword's top reels with plays and likes, and the trending songs and sounds they use. From $1.02 per 1,000 trends.",
    "version": "0.1",
    "x-build-id": "WN5lWxnfXi4RewQSb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~instagram-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-instagram-trends-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-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-instagram-trends-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-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-instagram-trends-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": {
          "sections": {
            "title": "Sections of the trends board",
            "type": "array",
            "description": "The parts of Instagram's own trends board to read, in the order you list them. \"Trending now\" is what is rising today; \"What's happening now\" covers the month; \"Profiles to look out for\" lists accounts with their follower counts.",
            "items": {
              "type": "string",
              "enum": [
                "trending_now",
                "whats_happening",
                "pop_culture",
                "profiles",
                "categories",
                "get_inspired",
                "learn_something_new",
                "shop_the_trends"
              ],
              "enumTitles": [
                "Trending now",
                "What's happening now",
                "Pop culture moments",
                "Profiles to look out for",
                "Find what you're into (categories)",
                "Get inspired",
                "Learn something new",
                "Shop the trends"
              ]
            },
            "default": [
              "trending_now",
              "whats_happening",
              "pop_culture"
            ]
          },
          "maxResultsPerSection": {
            "title": "Entries per section",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many entries to take from the top of each section. Each entry is one row.",
            "default": 20
          },
          "includeKeywordDetails": {
            "title": "Related keywords and Instagram's summary",
            "type": "boolean",
            "description": "Fills relatedKeywords (up to 30 searches Instagram links to each keyword) and summary (Instagram's own short write-up of the topic, when it has one) on every keyword row.",
            "default": false
          },
          "includeTopReels": {
            "title": "Top reels of each keyword",
            "type": "boolean",
            "description": "Adds the reels Instagram shows first for each trending keyword, one row each, with plays, date, caption, hashtags and the creator. Each reel is charged as a reel.",
            "default": false
          },
          "maxReelsPerKeyword": {
            "title": "Reels per keyword",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "How many of each keyword's top reels to return, from the top. Used with \"Top reels of each keyword\".",
            "default": 6
          },
          "includeReelDetails": {
            "title": "Likes, comments and sound of each reel",
            "type": "boolean",
            "description": "Opens each reel to fill likesCount, commentsCount and its sound: title, artist, whether it is original audio, and whether Instagram marks the sound as trending. Same reel price; the run takes longer.",
            "default": false
          },
          "includeSounds": {
            "title": "Sounds of the trending reels",
            "type": "boolean",
            "description": "Adds one row per sound used by the reels this run read, most used first: how many of those reels use it, their plays, the keywords they came from, and Instagram's own trending mark. With \"Top reels of each keyword\" off, it reads each keyword's featured reel instead. Each sound is charged as a sound.",
            "default": false
          },
          "maxSounds": {
            "title": "Most sounds",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many sound rows to return at most, from the most used.",
            "default": 50
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since the last run",
            "type": "boolean",
            "description": "Leaves out the keywords and profiles your earlier runs already returned, section by section, so a scheduled run gives only what is new on the board. The list is kept in a store named instagram-trends-memory in your own account; delete it to start over.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}