{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Scraper — Pins, Images, Links & Boards",
    "description": "Pinterest scraper for pins, images, outbound links, boards, pinners and engagement stats. Search by keyword or paste a Pinterest URL; choose fast overview or full detail with saves, repins, comments and hashtags. Clean JSON/CSV, no account or Pinterest API key needed.",
    "version": "1.0",
    "x-build-id": "ktkm1Ea6q1mVj5eug"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~pinterest-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-pinterest-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/sian.agency~pinterest-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-pinterest-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/sian.agency~pinterest-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-pinterest-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",
        "properties": {
          "scrapeMode": {
            "title": "🧭 Scrape Mode",
            "enum": [
              "overview",
              "detail"
            ],
            "type": "string",
            "description": "🧭 **Choose how much data per pin:**\n\n- **Overview** (cheapest): search a query or paste a search URL → up to ~25 pins per page with image, link, domain, board, pinner and alt-text. Best for volume.\n- **Detail** (full): enrich each pin with the engagement stats the search list omits — saves, repins, comments, shares, hashtags, the long-form note and the full image-size ladder.",
            "default": "overview"
          },
          "searchMode": {
            "title": "🎯 Input Type",
            "enum": [
              "byQuery",
              "bySearchUrl",
              "byPinUrl"
            ],
            "type": "string",
            "description": "🎯 **How you supply targets:**\n\n- **By Query** — type one or more search terms (e.g. `home office desk`).\n- **By Search URL** — paste a Pinterest `/search/...` URL (filters in the URL carry through).\n- **By Pin URL** — *(Detail only)* paste pin URLs or numeric pin IDs to enrich directly.\n\nLeave on the default and it auto-selects: By Query for Overview, By Pin URL for Detail.",
            "default": "byQuery"
          },
          "queries": {
            "title": "🔎 Search Queries",
            "type": "array",
            "description": "🔎 **SEARCH BY KEYWORD:** One or more search terms — each is run as a Pinterest search.\n\n💡 **TIP:** Click \"Bulk edit\" to paste many queries, one per line.\n\nExample: `minimalist desk`, `home office`, `kitchen pantry organization`",
            "default": [
              "home office desk"
            ],
            "items": {
              "type": "string"
            }
          },
          "scope": {
            "title": "🗂️ Search Scope",
            "enum": [
              "pins",
              "products",
              "videos",
              "boards",
              "users"
            ],
            "type": "string",
            "description": "🗂️ **What kind of results** the query searches across. `pins` (default) is the most common; `products`, `videos`, `boards` and `users` mirror Pinterest's own search tabs.",
            "default": "pins"
          },
          "searchUrls": {
            "title": "🔗 Pinterest Search URLs",
            "type": "array",
            "description": "🔗 **PASTE SEARCH URLS:** One or more `https://www.pinterest.com/search/...` URLs. Any faceted filters in the URL (color, price band, domain) carry through.\n\n💡 **TIP:** Open a search on pinterest.com, set your filters, then copy the address-bar URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pinUrls": {
            "title": "📌 Pin URLs or IDs (Detail mode)",
            "type": "array",
            "description": "📌 **DIRECT PIN ENRICHMENT (Detail only):** Paste pin URLs (`https://www.pinterest.com/pin/<id>/`) or bare numeric pin IDs to enrich each one with full engagement stats.\n\n💡 **TIP:** Click \"Bulk edit\" to paste many at once, one per line.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🔢 Max Pins Per Run",
            "minimum": 1,
            "type": "integer",
            "description": "🔢 **Cap the number of pins** saved in this run.\n\n- **FREE users:** up to 25 pins per run\n- **PAID users:** unlimited\n\nPay-per-result: you only pay for the pins actually returned.",
            "default": 100
          },
          "maxPages": {
            "title": "📄 Max Search Pages",
            "minimum": 1,
            "type": "integer",
            "description": "📄 **How many result pages to paginate** per query/URL (each page ≈ 18–25 pins). Stops early when `Max Pins Per Run` is reached or Pinterest runs out of results.",
            "default": 10
          },
          "useProxy": {
            "title": "🛡️ Use Residential Proxy (optional)",
            "type": "boolean",
            "description": "🛡️ **Off by default.** Pinterest data is fetched directly and reliably without a proxy. Enable this only if you run very high volume and hit a rate-limit — it routes requests through a US residential network for extra resilience.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}