{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Boards Scraper By Keyword Search",
    "description": "Pinterest Boards Scraper helps you extract structured data from public Pinterest boards. Retrieve board info, pins, descriptions, and engagement metrics efficiently. Designed for growth teams, researchers, and data-driven insights.",
    "version": "0.1",
    "x-build-id": "ys1yNQYz73T267yKL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~pinterest-boards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-pinterest-boards-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/api-empire~pinterest-boards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-pinterest-boards-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/api-empire~pinterest-boards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-pinterest-boards-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": {
          "searchQueries": {
            "title": "🔎 Keywords to search",
            "type": "array",
            "description": "Topics to search Pinterest for — one per line, e.g. `cottagecore kitchen`, `amazon home finds`, `van conversion storage`. Adjacent keywords return the same results constantly, so results are de-duplicated across the whole run: the first keyword to surface a board/pin/profile owns the row, and `matchedQuery` lists every keyword that surfaced it.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "🗂️ What to search for",
            "enum": [
              "boards",
              "profiles",
              "pins",
              "videos"
            ],
            "type": "string",
            "description": "Which Pinterest search surface to read. `boards` (the default) returns the BOARDS curating a topic — who has already collected it, how many pins they hold and how big their audience is. `profiles` returns the accounts. `pins` returns the ordinary pin grid, and `videos` returns only video pins (a real server-side scope, measured 50/50 rows with video variants populated — not a client-side filter). Board and profile rows are labelled `type: \"board\"` / `type: \"profile\"`; pin rows keep the base's exact pin shape.",
            "default": "boards"
          },
          "maxItemsPerQuery": {
            "title": "🔢 Max results per keyword",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many results to take from each keyword before moving on (1–500). Kept separate from `maxItems`, which still governs pasted URLs, so a run can mix a board URL and three keywords without one cap fighting the other. Boards and profiles are served 50 per request and Pinterest ignores `page_size` on those two scopes, so a cap of 120 costs 3 requests; pins and videos honour it in one. If a keyword's result pool runs out first, the shortfall is logged for that keyword by name.",
            "default": 50
          },
          "resultOrder": {
            "title": "↕️ Order each keyword's results by",
            "enum": [
              "relevance",
              "audienceSize",
              "librarySize",
              "newest"
            ],
            "type": "string",
            "description": "Re-orders each keyword's results highest-first BEFORE the cap is applied, so a capped run keeps the biggest hits rather than whatever loaded first. Rows for which Pinterest sent no value sink to the bottom — they are never treated as zero. ⚠️ Pinterest ignores every server-side sort parameter (six variants returned the identical 50 board IDs in the identical order), so this orders what THIS run captured, never \"the top boards on Pinterest\". `resultRank` preserves Pinterest's own order either way. Save/comment counts are deliberately NOT offered: the search surface carries none of them (0 of 98 pin rows measured).",
            "default": "relevance"
          },
          "expandBoardsToPins": {
            "title": "🧩 Expand each discovered board into its pins",
            "type": "boolean",
            "description": "After each board row is emitted, walk that board's feed with the same engine the base uses for a pasted board URL and emit its pins (`type: \"pin\"`, `discoverySource: \"boardExpansion\"`, full base pin shape including real aggregated save counts). Only applies when `searchType` is `boards`; with any other scope it is logged as a no-op and nothing is expanded.",
            "default": false
          },
          "maxBoardsToExpand": {
            "title": "📁 Max boards to expand per run",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Ceiling on how many of the discovered boards get expanded, across the whole run. 0 = every discovered board. Boards past the ceiling are still returned as board rows.",
            "default": 10
          },
          "maxPinsPerDiscoveredBoard": {
            "title": "📌 Max pins per expanded board",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Pins taken from each expanded board (1–5000). Total charged pin rows from expansion is at most `maxBoardsToExpand × maxPinsPerDiscoveredBoard`; the run logs that arithmetic before it starts.",
            "default": 20
          },
          "enrichDiscoveredBoards": {
            "title": "📈 Fetch board followers & creation date",
            "type": "boolean",
            "description": "Spend one BoardResource request per discovered board to fill `followerCount` and `createdAt` on board rows (and `boardInfo.boardFollowerCount` / `boardInfo.boardCreatedAt` on any pins expanded out of them). Both stay null without it. Measured live: 95,813 and 101,745 followers with real 2021/2025 creation dates on the first two boards of `amazon home finds`.",
            "default": false
          },
          "maxBoardEnrichments": {
            "title": "🔢 Max board enrichment requests per run",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Ceiling on the enrichment requests above, across the whole run. Boards past the ceiling are still returned, with `followerCount` and `createdAt` null. 0 = no ceiling.",
            "default": 50
          },
          "urls": {
            "title": "🔗 Pinterest URLs (optional — scraped first)",
            "type": "array",
            "description": "Board URLs (https://www.pinterest.com/<user>/<board>/), profile URLs or bare usernames, and pin URLs or bare pin IDs. One per line. Rows from here are labelled `discoverySource: \"urls\"`. Leave empty to run keyword-only.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "📊 Max pins per URL",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum pins returned per URL target (1–5000). Applies ONLY to the URLs above — keyword results are capped by `maxItemsPerQuery`. Pins are fetched 250 per request, so 1,000 pins is 4 requests.",
            "default": 10
          },
          "fetchLinkDetails": {
            "title": "🌐 Include outbound links",
            "type": "boolean",
            "description": "Fill `link` / `externalLink` / `domain` with the destination each pin points at. Turn it off to return the three fields as null.",
            "default": true
          },
          "fetchPinDetails": {
            "title": "🔎 Fetch pin details (1 extra request per pin)",
            "type": "boolean",
            "description": "Open each pin's closeup to fill `commentCount`, `shareCount` and the pinner's follower count — and, for keyword-found pins, the save counts. ⚠️ This matters most on `searchType: pins`/`videos`: the search surface carries no save, repin, comment or share count at all (0 of 98 rows measured), and the closeup resolved real save counts on 8 of 8 sampled pins. Board-feed pins already carry aggregated saves without it.",
            "default": false
          },
          "maxPinDetailFetches": {
            "title": "🔢 Max pin detail requests per run",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Ceiling on the closeup requests above, across the whole run. Pins past the ceiling are still returned, with those fields null. 0 = no ceiling.",
            "default": 50
          },
          "includeBoardSections": {
            "title": "📁 Attribute pins to board sections",
            "type": "boolean",
            "description": "Walk a board's sections and stamp `sectionId` / `sectionTitle` / `sectionSlug` onto each of its pins. Applies to URL boards and to expanded boards. Pins that sit outside every section keep a null section.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy configuration",
            "type": "object",
            "description": "Your own proxy selection is honored exactly as configured — groups, country and custom proxy URLs all reach the fetch layer.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}