{
  "openapi": "3.0.1",
  "info": {
    "title": "All-in-One Pinterest Scraper",
    "description": "Collects Pinterest Pins, search results, profiles, boards, and board Pins through a single Actor. The mode is selected per run; each mode accepts its own identifier and returns that dataset's fields, with optional enrichment attached to every row.",
    "version": "0.1",
    "x-build-id": "ccCkaTT6lbnn8XhQK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thenetaji~pinterest-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thenetaji-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/thenetaji~pinterest-scraper/runs": {
      "post": {
        "operationId": "runs-sync-thenetaji-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/thenetaji~pinterest-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-thenetaji-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",
        "required": [
          "scraperType"
        ],
        "properties": {
          "scraperType": {
            "title": "What to collect",
            "enum": [
              "pinDetail",
              "searchPins",
              "userProfile",
              "userBoards",
              "boardPins"
            ],
            "type": "string",
            "description": "Choose the dataset for this run, then fill in the section for that mode below.",
            "default": "pinDetail"
          },
          "pin_id_or_url": {
            "title": "Pin",
            "type": "string",
            "description": "A Pinterest Pin's numeric ID, full pinterest.com/pin/<id>/ URL, or pin.it short link."
          },
          "addonPinnerProfile": {
            "title": "Add pinner profile",
            "type": "boolean",
            "description": "Fetch the full public Pinterest profile of the account that saved each Pin, attached under `pinner_profile`. This makes one extra request per Pin and adds a charge per enriched row.",
            "default": false
          },
          "query": {
            "title": "Search keywords",
            "type": "string",
            "description": "Words or phrases used to find Pinterest Pins."
          },
          "scope": {
            "title": "Result type",
            "enum": [
              "pins",
              "videos"
            ],
            "type": "string",
            "description": "Choose whether the search returns Pins or video Pins.",
            "default": "pins"
          },
          "addonPinDetails": {
            "title": "Add Pin details",
            "type": "boolean",
            "description": "Fetch full Pin detail (save count, comment count, and media) for each Pin found. This makes one extra request per Pin and adds a charge per enriched row.",
            "default": false
          },
          "username_or_url": {
            "title": "Profile",
            "type": "string",
            "description": "A Pinterest username, or the full pinterest.com/<username>/ profile URL."
          },
          "addonBoards": {
            "title": "Add boards",
            "type": "boolean",
            "description": "Fetch this profile's public boards, attached under `boards`, paginated up to `maxBoardsPerProfile` (0 continues until no further boards are available). This makes one or more extra requests and adds one charge per enriched row once the boards are collected. Combine with `addonBoardPins` to also fetch each returned board's Pins.",
            "default": false
          },
          "maxBoardsPerProfile": {
            "title": "Maximum boards per profile",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of boards to collect per profile when the boards add-on is enabled. The add-on paginates until this many boards are collected. Set `0` to continue until no further boards are available.",
            "default": 0
          },
          "board_id_or_url": {
            "title": "Board",
            "type": "string",
            "description": "A Pinterest board's numeric ID, or the full pinterest.com/<owner>/<board-slug>/ board URL."
          },
          "addonBoardPins": {
            "title": "Add board Pins",
            "type": "boolean",
            "description": "Fetch a board's Pins, attached under `board_pins`, paginated up to `maxPinsPerBoard` (0 continues until no further Pins are available). This makes one or more extra requests per board and adds one charge per enriched row once that board's Pins are collected. On the Profile Scraper, enabling this alongside `addonBoards` also fetches each returned board's Pins.",
            "default": false
          },
          "maxPinsPerBoard": {
            "title": "Maximum Pins per board",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of Pins to collect per board when the board Pins add-on is enabled. The add-on paginates until this many Pins are collected. Set `0` to continue until no further Pins are available.",
            "default": 0
          },
          "addonCoverPinDetails": {
            "title": "Add cover Pin details",
            "type": "boolean",
            "description": "Fetch full Pin detail (save count, comment count, and media) for each board's cover Pin, attached under `cover_pin_details`. This makes one extra request per board and adds a charge per enriched row.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum records to save. Set `0` to continue until no further records are available.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}