{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Trending Topics & Shopping Category Scraper",
    "description": "Collect Pinterest's public featured and editorial trend topics, its shopping category taxonomy, and shopping-category click metrics with history and forecast, by region.",
    "version": "1.1",
    "x-build-id": "LAKEQaRBcKlEf3ayl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~pinterest-trending-topics-and-shopping-category/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-pinterest-trending-topics-and-shopping-category",
        "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/vexaloom-labs~pinterest-trending-topics-and-shopping-category/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-pinterest-trending-topics-and-shopping-category",
        "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/vexaloom-labs~pinterest-trending-topics-and-shopping-category/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-pinterest-trending-topics-and-shopping-category",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to collect",
            "enum": [
              "trendingSearches",
              "keywordResearch",
              "featuredTopics",
              "editorialStories",
              "shoppingCategories",
              "shoppingMetrics",
              "moments",
              "featured",
              "editorial"
            ],
            "type": "string",
            "description": "Choose a Pinterest Trends dataset.",
            "default": "trendingSearches"
          },
          "region": {
            "title": "Region",
            "enum": [
              "US",
              "GB+IE",
              "CA",
              "IT+ES+PT+GR+MT",
              "IT",
              "ES",
              "DE+AT+CH",
              "DE",
              "FR",
              "SE+DK+FI+NO",
              "NL+BE+LU",
              "PL+RO+HU+SK+CZ",
              "MX+AR+CO+CL",
              "CO",
              "AR",
              "MX",
              "BR",
              "AU+NZ",
              "MY",
              "PH",
              "TH",
              "EG",
              "TR",
              "KR",
              "CR+DO+EC+GT+PE",
              "CY+CZ+GR+HU+MT+PL+RO+SK"
            ],
            "type": "string",
            "description": "Pinterest Trends market. Combined codes such as `GB+IE` cover Pinterest's published regional groups.",
            "default": "US"
          },
          "trendType": {
            "title": "Trend list",
            "enum": [
              "topMonthly",
              "topYearly",
              "growing",
              "seasonal"
            ],
            "type": "string",
            "description": "Trending list to collect (mode=trendingSearches).",
            "default": "topMonthly"
          },
          "lookbackWindow": {
            "title": "Lookback window",
            "enum": [
              "7D",
              "30D",
              "90D",
              "180D",
              "365D"
            ],
            "type": "string",
            "description": "Comparison window used by Pinterest for trending searches (mode=trendingSearches).",
            "default": "30D"
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Historical end date in `YYYY-MM-DD` format. Leave empty for Pinterest's latest available date (mode=trendingSearches, keywordResearch, shoppingCategories, shoppingMetrics)."
          },
          "interest": {
            "title": "Interest category",
            "enum": [
              "all",
              "Food and drinks",
              "Beauty",
              "Home decor",
              "Fashion",
              "Men's fashion",
              "Children's fashion",
              "Travel",
              "Art",
              "Quotes",
              "Entertainment",
              "DIY and crafts",
              "Health",
              "Wedding",
              "Event planning",
              "Gardening",
              "Animals",
              "Parenting",
              "Education",
              "Vehicles",
              "Design",
              "Sport",
              "Electronics",
              "Finance",
              "Architecture"
            ],
            "type": "string",
            "description": "Pinterest interest filter for trending searches (mode=trendingSearches).",
            "default": "all"
          },
          "moment": {
            "title": "Seasonal moment",
            "enum": [
              "all",
              "thanksgiving",
              "valentines day",
              "independence day",
              "memorial day",
              "fathers day",
              "hanukkah",
              "new years eve",
              "easter",
              "st patricks day",
              "summer",
              "christmas",
              "mothers day",
              "halloween"
            ],
            "type": "string",
            "description": "Pinterest seasonal moment filter for trending searches (mode=trendingSearches).",
            "default": "all"
          },
          "keywordsToInclude": {
            "title": "Include keywords",
            "type": "array",
            "description": "Only keep trending searches containing at least one of these words (mode=trendingSearches).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordsToExclude": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop trending searches containing any of these words (mode=trendingSearches).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ageGroup": {
            "title": "Audience age",
            "enum": [
              "all",
              "18-20",
              "18-24",
              "21-24",
              "25-34",
              "35-44",
              "45-49",
              "50-54",
              "55-64",
              "65+"
            ],
            "type": "string",
            "description": "Pinterest audience age filter for trending searches and keyword research.",
            "default": "all"
          },
          "gender": {
            "title": "Audience gender",
            "enum": [
              "all",
              "female",
              "male",
              "unspecified"
            ],
            "type": "string",
            "description": "Pinterest audience gender filter for trending searches and keyword research.",
            "default": "all"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Terms to research (mode=keywordResearch). Leave empty to use Pinterest's current top trending searches.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "days": {
            "title": "History window",
            "minimum": 30,
            "maximum": 730,
            "type": "integer",
            "description": "History length in days for keyword research and shopping metrics.",
            "default": 90
          },
          "predictedDays": {
            "title": "Forecast days",
            "minimum": 0,
            "maximum": 28,
            "type": "integer",
            "description": "Pinterest forecast horizon. Forecasts are published for the US only (mode=keywordResearch, shoppingMetrics).",
            "default": 0
          },
          "includeRelated": {
            "title": "Include related terms",
            "type": "boolean",
            "description": "Add Pinterest's related terms and their weekly history for each keyword (mode=keywordResearch).",
            "default": false
          },
          "includeAudience": {
            "title": "Include audience demographics",
            "type": "boolean",
            "description": "Add age and gender distributions for each keyword (mode=keywordResearch).",
            "default": false
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Add a representative Pinterest image for each keyword (mode=keywordResearch).",
            "default": false
          },
          "includeSuggestions": {
            "title": "Include search suggestions",
            "type": "boolean",
            "description": "Add Pinterest search suggestions for each keyword (mode=keywordResearch).",
            "default": false
          },
          "shoppingEvent": {
            "title": "Shopping signal",
            "enum": [
              "OUTBOUND_CLICK",
              "SAVE"
            ],
            "type": "string",
            "description": "Pinterest shopping signal used for category metrics and ranked shopping trends.",
            "default": "OUTBOUND_CLICK"
          },
          "includeTopCategories": {
            "title": "Include ranked shopping categories",
            "type": "boolean",
            "description": "Add Pinterest's fastest-growing shopping categories with related searches (mode=shoppingCategories).",
            "default": false
          },
          "categoryNames": {
            "title": "Shopping category names",
            "type": "array",
            "description": "Exact Pinterest shopping category names for metrics, such as `Sofas` or `Wedding dress` (mode=shoppingMetrics). Leave empty to use Pinterest's featured level-2 categories.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum records to return. Trending lists are partitioned by interest to go beyond Pinterest's 100-term list ceiling.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}