{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Media Downloader",
    "description": "Download public Pinterest image, GIF, Story Pin, and video media with source metadata and Key-Value Store links.",
    "version": "1.1",
    "x-build-id": "fHnOYPsdhpAycpss7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~pinterest-media-downloader-2/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-pinterest-media-downloader-2",
        "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-media-downloader-2/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-pinterest-media-downloader-2",
        "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-media-downloader-2/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-pinterest-media-downloader-2",
        "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 download",
            "enum": [
              "auto",
              "pinDetail",
              "searchPins",
              "searchVideos"
            ],
            "type": "string",
            "description": "Auto handles both Pin links and search phrases. Choose a specific mode to restrict the run to links or search.",
            "default": "auto"
          },
          "pinUrls": {
            "title": "Pinterest Pin URLs or IDs",
            "type": "array",
            "description": "Public Pin links (https://www.pinterest.com/pin/123...) or numeric Pin IDs. Used by auto and pinDetail.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchTerms": {
            "title": "Search phrases",
            "type": "array",
            "description": "Pinterest search phrases. Used by auto, searchPins and searchVideos.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "mediaType": {
            "title": "Media type",
            "enum": [
              "all",
              "images",
              "videos",
              "gifs"
            ],
            "type": "string",
            "description": "Download all media, only images (GIFs count as images), only videos, or only animated GIFs.",
            "default": "all"
          },
          "imageSize": {
            "title": "Image size",
            "enum": [
              "original",
              "736x",
              "564x",
              "474x",
              "236x"
            ],
            "type": "string",
            "description": "Preferred image size. The actor falls back to the original or the nearest available size. Animated GIFs are always saved at their original size.",
            "default": "original"
          },
          "videoQuality": {
            "title": "Video quality",
            "enum": [
              "best",
              "720p",
              "540p",
              "360p",
              "240p"
            ],
            "type": "string",
            "description": "Preferred MP4 quality. The actor falls back to the nearest available quality and prefers H.264 MP4 files.",
            "default": "best"
          },
          "maxItems": {
            "title": "Maximum media items",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum files to download per Pin URL or search phrase. Set to 0 to follow the available results.",
            "default": 50
          },
          "maxPages": {
            "title": "Maximum search pages",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum result pages per search phrase. Set to 0 to follow Pinterest's pagination until it ends.",
            "default": 0
          },
          "minSaves": {
            "title": "Minimum saves",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Keep media only when Pinterest reports at least this many saves."
          },
          "minCreatorFollowers": {
            "title": "Minimum creator followers",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keep media only when Pinterest reports at least this many creator followers."
          },
          "verifiedOnly": {
            "title": "Verified creators only",
            "type": "boolean",
            "description": "Keep only media whose creator Pinterest marks as verified.",
            "default": false
          },
          "requireOutboundLink": {
            "title": "Require destination link",
            "type": "boolean",
            "description": "Keep only Pins that publish a destination URL.",
            "default": false
          },
          "excludeAds": {
            "title": "Exclude promoted Pins",
            "type": "boolean",
            "description": "Exclude Pins that Pinterest marks as promoted.",
            "default": false
          },
          "commerceOnly": {
            "title": "Shoppable Pins only",
            "type": "boolean",
            "description": "Keep only Pins with Pinterest product or shopping metadata.",
            "default": false
          },
          "includeComments": {
            "title": "Include comments and activity",
            "type": "boolean",
            "description": "Also emit public comment and activity rows for every processed Pin.",
            "default": false
          },
          "maxComments": {
            "title": "Maximum comments per Pin",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum public comment/activity rows per Pin when comments are enabled.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration (optional)",
            "type": "object",
            "description": "Optional proxy override. The actor works without a proxy and only escalates when Pinterest blocks a request."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}