{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Trends Scraper",
    "description": "Export ranked Pinterest Trends data with filters and optional weekly history.",
    "version": "0.1",
    "x-build-id": "6HjkoLufkIfEamRUD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/akash9078~pinterest-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-akash9078-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/akash9078~pinterest-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-akash9078-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/akash9078~pinterest-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-akash9078-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": [
          "countries",
          "trendTypes"
        ],
        "properties": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Country or region codes supported by Pinterest Trends.",
            "items": {
              "type": "string",
              "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"
              ],
              "enumTitles": [
                "United States",
                "Great Britain and Ireland",
                "Canada",
                "Southern Europe (GR, IT, MT, PT, ES)",
                "Italy",
                "Spain",
                "Germanic countries (DE, AT, CH)",
                "Germany",
                "France",
                "Nordic countries (NO, FI, DK, SE)",
                "Benelux (NL, BE, LU)",
                "Eastern Europe (HU, PL, RO, SK, CZ)",
                "Hispanic LatAm (CL, CO, AR, MX)",
                "Colombia",
                "Argentina",
                "Mexico",
                "Brazil",
                "Australasia (AU, NZ)",
                "Malaysia",
                "Philippines",
                "Thailand",
                "Egypt",
                "Turkey",
                "Korea",
                "Latin America and Caribbean (CR, DO, EC, GT, PE)",
                "Eastern Europe and Mediterranean (CY, CZ, GR, HU, MT, PL, RO, SK)"
              ]
            },
            "default": [
              "US"
            ]
          },
          "trendTypes": {
            "title": "Trend types",
            "type": "array",
            "description": "Trend lists to fetch: growing, seasonal, top_monthly, or top_yearly.",
            "items": {
              "type": "string",
              "enum": [
                "growing",
                "seasonal",
                "top_monthly",
                "top_yearly"
              ],
              "enumTitles": [
                "Growing",
                "Seasonal",
                "Top monthly",
                "Top yearly"
              ]
            },
            "default": [
              "growing"
            ]
          },
          "interests": {
            "title": "Interests",
            "type": "array",
            "description": "Interest slugs to filter by, or empty for all 22 categories.",
            "items": {
              "type": "string",
              "enum": [
                "animals",
                "architecture",
                "art",
                "beauty",
                "design",
                "diy_and_crafts",
                "education",
                "electronics",
                "entertainment",
                "event_planning",
                "fashion",
                "finance",
                "food_and_drink",
                "health",
                "home_decor",
                "lawn_and_garden",
                "parenting",
                "quotes",
                "sports",
                "travel",
                "vehicles",
                "weddings"
              ],
              "enumTitles": [
                "Animals",
                "Architecture",
                "Art",
                "Beauty",
                "Design",
                "DIY and crafts",
                "Education",
                "Electronics",
                "Entertainment",
                "Event planning",
                "Fashion",
                "Finance",
                "Food and drink",
                "Health",
                "Home decor",
                "Lawn and garden",
                "Parenting",
                "Quotes",
                "Sports",
                "Travel",
                "Vehicles",
                "Weddings"
              ]
            },
            "default": []
          },
          "maxTermsPerQuery": {
            "title": "Max terms per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Rows to request per country and trend type (1-100).",
            "default": 25
          },
          "lookbackWindow": {
            "title": "Lookback window",
            "enum": [
              "7D",
              "30D",
              "90D",
              "180D",
              "365D"
            ],
            "type": "string",
            "description": "Growth window: 7D, 30D, 90D, 180D, or 365D.",
            "default": "30D"
          },
          "includeHistory": {
            "title": "Include weekly history",
            "type": "boolean",
            "description": "Add a weekly series to each row. Slower and uses more requests.",
            "default": false
          },
          "historyDays": {
            "title": "History length (days)",
            "type": "integer",
            "description": "History window: 30, 90, 180, 365, or 730 days.",
            "default": 90
          },
          "endDate": {
            "title": "End date",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Report date in YYYY-MM-DD. Defaults to Pinterest's latest date."
          },
          "maxConcurrency": {
            "title": "Max concurrent queries",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Parallel queries (1-5). Lower is gentler on Pinterest.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for network, 408, 429, and 5xx errors (0-5).",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy. Disabled by default.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}