{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Trends",
    "version": "0.0",
    "x-build-id": "67esMSyHWS9yOWv6k"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_ops_main~Pinterest-Trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_ops_main-Pinterest-Trends",
        "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/data_ops_main~Pinterest-Trends/runs": {
      "post": {
        "operationId": "runs-sync-data_ops_main-Pinterest-Trends",
        "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/data_ops_main~Pinterest-Trends/run-sync": {
      "post": {
        "operationId": "run-sync-data_ops_main-Pinterest-Trends",
        "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": [
          "country"
        ],
        "properties": {
          "country": {
            "title": "Country",
            "enum": [
              "US",
              "CA",
              "GB",
              "IE",
              "FR",
              "DE",
              "AT",
              "CH",
              "IT",
              "ES",
              "PT",
              "GR",
              "BR",
              "MX",
              "AR",
              "CO",
              "CL",
              "IN",
              "AU",
              "NZ",
              "NL",
              "BE",
              "SE",
              "DK",
              "FI",
              "NO",
              "PL",
              "CZ",
              "ZA",
              "TR",
              "AE",
              "SA",
              "GB+IE",
              "DE+AT+CH",
              "IT+ES+PT+GR+MT",
              "SE+DK+FI+NO",
              "NL+BE+LU",
              "PL+RO+HU+SK+CZ",
              "MX+AR+CO+CL",
              "AU+NZ",
              "CR+DO+EC+GT+PE",
              "AE+SA+KW+QA+OM+BH+EG+IQ+DZ",
              "IL+NG+PK+ZA+TR+MA+IN",
              "CY+CZ+GR+HU+MT+PL+RO+SK"
            ],
            "type": "string",
            "description": "Market to pull trends for. Pinterest reports some smaller markets only as a region — pick the country and the Actor maps it to the region Pinterest publishes (for example Australia becomes AU+NZ).",
            "default": "US"
          },
          "interests": {
            "title": "Interests",
            "type": "array",
            "description": "Restrict trends to Pinterest's top-level interest categories. Leave empty for all interests. Selecting several runs one query per interest so every result row shows which interest it came from.",
            "items": {
              "type": "string",
              "enum": [
                "ANIMALS",
                "ARCHITECTURE",
                "ART",
                "BEAUTY",
                "DESIGN",
                "DIY_AND_CRAFTS",
                "EDUCATION",
                "ELECTRONICS",
                "ENTERTAINMENT",
                "EVENT_PLANNING",
                "FASHION_KIDS",
                "FASHION_MENS",
                "FASHION_WOMENS",
                "FINANCE",
                "FOOD_AND_DRINKS",
                "GARDENING",
                "HEALTH",
                "HOME_DECOR",
                "PARENTING",
                "QUOTES",
                "SPORT",
                "TRAVEL",
                "VEHICLES",
                "WEDDING"
              ],
              "enumTitles": [
                "Animals",
                "Architecture",
                "Art",
                "Beauty",
                "Design",
                "DIY & Crafts",
                "Education",
                "Electronics",
                "Entertainment",
                "Event Planning",
                "Kids' Fashion",
                "Men's Fashion",
                "Women's Fashion",
                "Finance",
                "Food & Drinks",
                "Gardening",
                "Health",
                "Home Decor",
                "Parenting",
                "Quotes",
                "Sport",
                "Travel",
                "Vehicles",
                "Wedding"
              ]
            },
            "default": []
          },
          "events": {
            "title": "Events",
            "type": "array",
            "description": "Restrict trends to a seasonal event or shopping moment (Halloween, Black Friday, Ramadan …). Leave empty for no event filter. Events that the chosen country does not celebrate are skipped with a warning, and an event well outside its season usually returns nothing.",
            "items": {
              "type": "string",
              "enum": [
                "autumn",
                "back to school",
                "bank holiday",
                "black friday",
                "canada day",
                "carnaval",
                "childrens day",
                "christmas",
                "cinco de mayo",
                "colombia moda",
                "coming of age ceremony",
                "diwali",
                "earth day",
                "easter",
                "fathers day",
                "festa junina",
                "friends day",
                "golden week",
                "halloween",
                "hanukkah",
                "hinamatsuri",
                "hot sale",
                "independence day",
                "karneval",
                "lunar new year",
                "march madness",
                "mardi gras",
                "memorial day",
                "mothers day",
                "naidoc week",
                "new years eve",
                "oktoberfest",
                "passover",
                "pride",
                "prom",
                "rain season",
                "ramadan",
                "respect of the aged day",
                "setsubun",
                "shichigosan",
                "sports day",
                "spring",
                "spring break",
                "spring racing carnival",
                "st patricks day",
                "summer",
                "superbowl",
                "tanabata",
                "thanksgiving",
                "tsukimi",
                "valentines day",
                "victoria day",
                "white day",
                "winter"
              ],
              "enumTitles": [
                "Autumn",
                "Back to School",
                "Bank Holiday",
                "Black Friday",
                "Canada Day",
                "Carnaval",
                "Children's Day",
                "Christmas",
                "Cinco de Mayo",
                "Colombia Moda",
                "Coming of Age Ceremony",
                "Diwali",
                "Earth Day",
                "Easter",
                "Father's Day",
                "Festa Junina",
                "Friend's Day",
                "Golden Week",
                "Halloween",
                "Hanukkah",
                "Hinamatsuri",
                "Hot Sale",
                "Independence Day",
                "Karneval",
                "Lunar New Year",
                "March Madness",
                "Mardi Gras",
                "Memorial Day",
                "Mother's Day",
                "NAIDOC Week",
                "New Year's Eve",
                "Oktoberfest",
                "Passover",
                "Pride",
                "Prom",
                "Rain Season",
                "Ramadan",
                "Respect of the Aged Day",
                "Setsubun",
                "Shichigosan",
                "Sports Day",
                "Spring",
                "Spring Break",
                "Spring Racing Carnival",
                "St Patrick's Day",
                "Summer",
                "Superbowl",
                "Tanabata",
                "Thanksgiving",
                "Tsukimi",
                "Valentine's Day",
                "Victoria Day",
                "White Day",
                "Winter"
              ]
            },
            "default": []
          },
          "trendType": {
            "title": "Trend type",
            "enum": [
              "TOP_MONTHLY",
              "TOP_YEARLY",
              "GROWING",
              "SEASONAL"
            ],
            "type": "string",
            "description": "Which ranking to pull. 'Top monthly' is the established leaders, 'Growing' surfaces terms climbing fastest right now, and 'Seasonal' surfaces terms peaking for the time of year.",
            "default": "TOP_MONTHLY"
          },
          "maxTermsPerQuery": {
            "title": "Max terms per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many trending terms to return per query. The API caps this at 100.",
            "default": 50
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Report trends as of this date (YYYY-MM-DD). Leave empty to use the most recent date Pinterest has data for — its dataset normally runs a few days behind."
          },
          "lookbackWindow": {
            "title": "Lookback window",
            "enum": [
              "7D",
              "30D",
              "90D",
              "180D",
              "365D"
            ],
            "type": "string",
            "description": "How far back the ranking looks when scoring a term. Leave empty for the API default."
          },
          "keywordsToInclude": {
            "title": "Keywords to include",
            "type": "array",
            "description": "Only return terms containing one of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordsToExclude": {
            "title": "Keywords to exclude",
            "type": "array",
            "description": "Drop terms containing any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "combineFilters": {
            "title": "Combine filters into one query",
            "type": "boolean",
            "description": "Off (default): run one query per interest × event pair so every row is attributable to a specific filter. On: send the whole selection in a single query, which is cheaper but returns one blended ranking.",
            "default": false
          },
          "includeTimeSeries": {
            "title": "Include search-volume history",
            "type": "boolean",
            "description": "Fetch the weekly search-volume curve for every term and save it to the key-value store. Adds roughly one request per five terms.",
            "default": false
          },
          "includeDemographics": {
            "title": "Include audience demographics",
            "type": "boolean",
            "description": "Fetch the age and gender split of the audience searching each term, saved to the key-value store.",
            "default": false
          },
          "includeRelatedTerms": {
            "title": "Include related keywords",
            "type": "boolean",
            "description": "Fetch keywords Pinterest considers adjacent to each term. Costs one extra request per term, so it is slow on large runs.",
            "default": false
          },
          "timeSeriesDays": {
            "title": "History length (days)",
            "enum": [
              "30",
              "90",
              "180",
              "365",
              "730"
            ],
            "type": "string",
            "description": "How much history to pull for search-volume and demographics.",
            "default": "365"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests. Pinterest returns HTTP 429 quickly, so keep this low unless you run through a proxy.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "How many times to retry a failed or rate-limited request before giving up on it.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Pinterest rate-limits by IP. Enable Apify Proxy to rotate addresses on larger runs.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}