{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Board Image Downloader",
    "description": "Download images from public Pinterest boards in bulk. Scrape image URLs, save available high-resolution images, export them as a ZIP, and get structured dataset results for automation or API use.",
    "version": "0.2",
    "x-build-id": "ZYGu9xaJgNYWDqbrj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tamkungz~PinFetch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tamkungz-PinFetch",
        "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/tamkungz~PinFetch/runs": {
      "post": {
        "operationId": "runs-sync-tamkungz-PinFetch",
        "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/tamkungz~PinFetch/run-sync": {
      "post": {
        "operationId": "run-sync-tamkungz-PinFetch",
        "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": [
          "url"
        ],
        "properties": {
          "url": {
            "title": "Pinterest page URL",
            "type": "string",
            "description": "Pinterest profile or ref URL to scrape image URLs from",
            "default": "https://www.pinterest.com/TamKungZ_/drawing-tutorial/"
          },
          "max_scroll": {
            "title": "Maximum scroll rounds",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of scroll iterations",
            "default": 300
          },
          "max_no_new": {
            "title": "Stop after no new images",
            "minimum": 1,
            "type": "integer",
            "description": "Stop crawl after this many consecutive rounds with no newly found images",
            "default": 6
          },
          "max_reloads": {
            "title": "Reload attempts after stall",
            "minimum": 0,
            "type": "integer",
            "description": "When max_no_new is reached, reload page this many times before final stop",
            "default": 2
          },
          "reload_only_below_total": {
            "title": "Reload only below total images",
            "minimum": 0,
            "type": "integer",
            "description": "Allow stall-reload only while collected image total is below this threshold (helps avoid unnecessary reloads later)",
            "default": 30
          },
          "max_images": {
            "title": "Maximum images to collect",
            "minimum": 1,
            "type": "integer",
            "description": "Stop scraping early when this many unique images have been collected"
          },
          "scroll_delay_sec": {
            "title": "Scroll delay (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Delay between scroll rounds in seconds",
            "default": 1.4
          },
          "save_dir": {
            "title": "Save directory",
            "type": "string",
            "description": "Directory path inside Actor container where images are downloaded",
            "default": "pinterest_images"
          },
          "request_timeout_sec": {
            "title": "Download request timeout (seconds)",
            "minimum": 1,
            "type": "integer",
            "description": "HTTP timeout for each image download request",
            "default": 30
          },
          "download_retries": {
            "title": "Download retries",
            "minimum": 0,
            "type": "integer",
            "description": "Retry each CDN URL on transient HTTP/network failures before trying a fallback image size",
            "default": 2
          },
          "download_delay_sec": {
            "title": "Delay between downloads (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Sleep delay between each file download",
            "default": 0.15
          },
          "headless": {
            "title": "Headless browser",
            "type": "boolean",
            "description": "Run Chromium in headless mode",
            "default": true
          },
          "browser_restarts": {
            "title": "Browser restart attempts",
            "minimum": 0,
            "type": "integer",
            "description": "Restart Chromium and continue with already collected URLs after browser crashes or repeated feed stalls",
            "default": 2
          },
          "navigation_timeout_sec": {
            "title": "Navigation timeout (seconds)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum time for Pinterest page navigation/reload before recovery is attempted",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}