{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Trends & Content Intel - Trends, Top Pins",
    "description": "Pinterest trend + content intelligence from logged-out public surfaces: trending keywords with trajectory, top pins per topic (saves/engagement), and board/creator signals. The data the gated Pinterest API hides behind app review + OAuth. For marketers, e-commerce, and content strategists.",
    "version": "0.1",
    "x-build-id": "tecC46AUReD0M1wgZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seibs.co~pinterest-trends-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seibs.co-pinterest-trends-intel",
        "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/seibs.co~pinterest-trends-intel/runs": {
      "post": {
        "operationId": "runs-sync-seibs.co-pinterest-trends-intel",
        "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/seibs.co~pinterest-trends-intel/run-sync": {
      "post": {
        "operationId": "run-sync-seibs.co-pinterest-trends-intel",
        "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": "Mode",
            "enum": [
              "trend_search",
              "topic_content",
              "pin_detail",
              "profile_analysis"
            ],
            "type": "string",
            "description": "trend_search = seed keywords -> trend records (interest trajectory + seasonality + related terms + category, plus the top pins behind each term). topic_content = topic queries -> ranked top pins (saves/engagement) + a per-topic rollup (top creators, category mix, color palette). pin_detail = pin URLs/ids -> deep normalized pin records. profile_analysis = usernames -> creator/board audience signals (followers, board/pin counts, monthly views, top boards).",
            "default": "trend_search"
          },
          "keywords": {
            "title": "Keywords / topics",
            "maxItems": 30,
            "type": "array",
            "description": "Search terms for trend_search and topic_content, e.g. ['home office decor', 'fall outfits', 'air fryer recipes']. High purchase-intent terms work best. Hard cap of 30.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pin_urls": {
            "title": "Pin URLs or IDs (pin_detail)",
            "maxItems": 50,
            "type": "array",
            "description": "Pin URLs (https://www.pinterest.com/pin/123456789/) or bare numeric pin ids for pin_detail mode. Hard cap of 50.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Profile usernames (profile_analysis)",
            "maxItems": 30,
            "type": "array",
            "description": "Pinterest handles or profile URLs for profile_analysis mode, e.g. ['nordstrom', 'https://www.pinterest.com/thepioneerwoman/']. Public profile facts only. Hard cap of 30.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region (trend trajectory)",
            "type": "string",
            "description": "Two-letter country code for the Pinterest Trends time series (trend_search), e.g. US, GB, CA, AU, DE. Defaults to US.",
            "default": "US"
          },
          "max_pins_per_query": {
            "title": "Max pins per query",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Hard cap on pins fetched per keyword/topic. Default 25, max 50.",
            "default": 25
          },
          "include_trajectory": {
            "title": "Fetch trend trajectory (trend_search)",
            "type": "boolean",
            "description": "Attempt the public Pinterest Trends weekly interest time series for each keyword (the gated API's prize field). When the Trends surface is unreachable, the trend record falls back to a transparent search-derived interest proxy (the trajectory_source field says which). Turn off to skip the trends leg entirely.",
            "default": true
          },
          "include_pins": {
            "title": "Include top pins in trend_search",
            "type": "boolean",
            "description": "In trend_search, also emit the top pins behind each keyword (charged as pin records). Turn off for a trends-only run.",
            "default": true
          },
          "top_pins_in_trend": {
            "title": "Top pins per term (trend_search)",
            "minimum": 0,
            "maximum": 25,
            "type": "integer",
            "description": "How many top pins to emit per keyword in trend_search when include_pins is on. Default 8, max 25.",
            "default": 8
          },
          "include_creator_signals": {
            "title": "Include creator signals (topic_content)",
            "type": "boolean",
            "description": "In topic_content, surface the top creators behind a topic (with follower counts as exposed on the pins) as board_audience_signal records. Use profile_analysis for full board/monthly-view signals.",
            "default": true
          },
          "top_creators_per_topic": {
            "title": "Top creators per topic",
            "minimum": 0,
            "maximum": 25,
            "type": "integer",
            "description": "How many creator signals to emit per topic in topic_content. Default 8, max 25.",
            "default": 8
          },
          "monitor_webhook_url": {
            "title": "Monitor webhook URL (Slack / email, optional)",
            "type": "string",
            "description": "When this actor runs under an Apify Schedule (monitor mode), post the change digest (new/rising terms, save deltas) to this Slack-compatible webhook URL.",
            "default": ""
          },
          "use_apify_proxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Route requests through Apify Proxy. The DATACENTER tier handles the first (httpx) pass; a RESIDENTIAL tier is provisioned for the anti-bot escalation legs. Pinterest anti-bot is far easier to clear on residential IPs.",
            "default": true
          },
          "use_browser_fallback": {
            "title": "Anti-bot escalation (curl_cffi + browser)",
            "type": "boolean",
            "description": "When Pinterest serves a 403/challenge from a datacenter IP, automatically escalate: switch to the RESIDENTIAL proxy and retry with curl_cffi Chrome TLS impersonation, then (if available) a stealth headless browser. Turn off to use plain httpx only.",
            "default": true
          },
          "browser_cdp_url": {
            "title": "Warm browser CDP endpoint (optional)",
            "type": "string",
            "description": "Optional. CDP/WebSocket endpoint of an already-running anti-detect (UC-mode / real Chrome) browser. When set, the browser tier connects to it (inheriting its session + fingerprint) for the stubborn challenges. Without it a patchright stealth Chromium is launched. Can also be set as the BROWSER_CDP_URL env var.",
            "default": ""
          },
          "apify_proxy_groups": {
            "title": "Proxy groups (optional override)",
            "type": "array",
            "description": "Override the auto-selected proxy group for the httpx tier. Leave empty to let the actor pick DATACENTER (with RESIDENTIAL provisioned for escalation).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "concurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Parallel Pinterest fetches. Kept polite; default 4, max 8.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}