{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Trends Scraper: Rising Search Terms",
    "description": "Find Pinterest trend terms and related searches for selected markets. Compare relative interest, growth momentum, seasonality, weekly history, and audience context when Pinterest publishes them.",
    "version": "1.0",
    "x-build-id": "H7whw6mhL4j85wP7r"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~pinterest-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-pinterest-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/maximedupre~pinterest-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-pinterest-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/maximedupre~pinterest-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-pinterest-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",
        "required": [
          "discoveryMethod",
          "markets"
        ],
        "properties": {
          "discoveryMethod": {
            "title": "Find trends by",
            "enum": [
              "publishedTrendLists",
              "seedKeywords"
            ],
            "type": "string",
            "description": "Choose published Pinterest trend lists or find related search terms from seed keywords."
          },
          "trendView": {
            "title": "Trend view",
            "enum": [
              "growing",
              "seasonal",
              "topMonthly",
              "topYearly"
            ],
            "type": "string",
            "description": "Choose which published Pinterest trend list to read. Used when Find trends by is Published trend lists."
          },
          "trendWatch": {
            "title": "Named trend watch",
            "required": [
              "name"
            ],
            "type": "object",
            "description": "For Published trend lists, name a watch to compare this list with its last saved results and return newly seen terms. Use the same name and research settings on later runs. Leave blank to return the full list. Failed reads do not show that a term is gone.",
            "properties": {
              "name": {
                "title": "Watch name",
                "type": "string",
                "editor": "textfield",
                "description": "Use a name to keep this watch separate from other watches.",
                "minLength": 1
              },
              "restart": {
                "title": "Restart this watch",
                "type": "boolean",
                "description": "Start a fresh history for this named watch on this run."
              }
            }
          },
          "seedKeywords": {
            "title": "Seed keywords",
            "minItems": 1,
            "type": "array",
            "description": "Add one or more starting keywords for related Pinterest search terms. Used when Find trends by is Seed keywords.",
            "items": {
              "type": "string"
            }
          },
          "markets": {
            "title": "Pinterest markets",
            "minItems": 1,
            "type": "array",
            "description": "Add one or more Pinterest market codes, such as US or GB. Use a separate run for a different research job.",
            "items": {
              "type": "string"
            }
          },
          "endDate": {
            "title": "Reporting end date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Set the report's last date in YYYY-MM-DD format. Leave blank to use the available source date."
          },
          "lookbackDays": {
            "title": "Trend lookback window (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Set how many days of trend history to use. Leave blank to use the source lookback period for the chosen method and trend view."
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Keep returned terms that match at least one of these keywords. This filters results and does not set seed keywords.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Remove returned terms that match any of these keywords. Leave blank to remove none.",
            "items": {
              "type": "string"
            }
          },
          "interestCategories": {
            "title": "Pinterest interest categories",
            "type": "array",
            "description": "Filter results by one or more Pinterest interest categories. Use names shown by Pinterest.",
            "items": {
              "type": "string"
            }
          },
          "seasonalEvents": {
            "title": "Seasonal events",
            "type": "array",
            "description": "Filter results by one or more seasonal events. Use names shown by Pinterest.",
            "items": {
              "type": "string"
            }
          },
          "minimumGrowth": {
            "title": "Minimum growth (%)",
            "minimum": 0,
            "type": "number",
            "description": "Keep terms when at least one published weekly, monthly, or yearly growth value meets this percentage. Leave blank to keep all terms."
          },
          "minimumWeeklyGrowth": {
            "title": "Minimum weekly growth (%)",
            "minimum": 0,
            "type": "number",
            "description": "Keep terms with published weekly growth at or above this percentage. Terms without weekly growth are left out. Leave blank to skip this filter. If Minimum growth is also set, terms must pass both filters."
          },
          "rankingBasis": {
            "title": "Rank results by",
            "enum": [
              "weeklyGrowth",
              "monthlyGrowth",
              "yearlyGrowth",
              "relativeSearchInterest"
            ],
            "type": "string",
            "description": "Choose the signal used to order returned terms. Pinterest may not publish every signal for every term."
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many ranked terms across the run. Leave blank to return all available results until the source is exhausted."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}