{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Pin Search - Image URLs & Destination Domains",
    "description": "Search Pinterest pins by keywords. One row per pin: title, description, image URL, dimensions, destination URL, domain, board name and date. Filter text, image orientation and destination domains; collect only new pins. Parsed pages are billed even when filters or monitoring return no rows.",
    "version": "1.4",
    "x-build-id": "7lvl1dCQR4vgfcffP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kestrel~pinterest-pin-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kestrel-pinterest-pin-search",
        "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/kestrel~pinterest-pin-search/runs": {
      "post": {
        "operationId": "runs-sync-kestrel-pinterest-pin-search",
        "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/kestrel~pinterest-pin-search/run-sync": {
      "post": {
        "operationId": "run-sync-kestrel-pinterest-pin-search",
        "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": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search queries",
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "description": "Public pin search keywords, for example [\"home office\",\"ceramic mugs\"]. Up to 20. Each parsed page costs $0.008 plus $0.001 per delivered pin. This is keyword search, not a board/profile URL input.",
            "items": {
              "type": "string"
            }
          },
          "maxPinsPerQuery": {
            "title": "Maximum pins per query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Output ceiling per original source, for example 50. Applied after filters, exclusions and monitoring. Each delivered row costs $0.001; source checks are separate. Fewer rows may exist. Duplicate results across sources are delivered only once.",
            "default": 50
          },
          "textContains": {
            "title": "Text includes any phrase",
            "type": "array",
            "description": "Keep results containing any phrase, case-insensitive; for example [\"office\"] or [\"free\"]. Checks title, description and alt text. Empty [] accepts all. Applied before row charging; successful source checks still cost money.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "textExcludes": {
            "title": "Text excludes any phrase",
            "type": "array",
            "description": "Drop results containing any phrase, for example [\"download\"] or [\"bedroom\"]. Empty [] disables the filter. Filtered rows are not charged; successful source checks remain billable.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "onlyWithDestinationUrl": {
            "title": "Require an external destination URL",
            "type": "boolean",
            "description": "false by default. true keeps only pins with a source-provided HTTP(S) destination link. Missing links are never inferred. Filtered pins have no row fee; parsed pages remain billable at $0.008.",
            "default": false
          },
          "destinationDomains": {
            "title": "Destination domains",
            "type": "array",
            "description": "Allow hostnames such as [\"etsy.com\",\"youtube.com\"], including their subdomains. Do not include https:// or paths. Empty [] disables filtering. Pins without destinations are excluded when this filter is active. No row charge for exclusions.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "imageOrientation": {
            "title": "Image orientation",
            "enum": [
              "any",
              "portrait",
              "landscape",
              "square"
            ],
            "type": "string",
            "description": "\"any\" (default), \"portrait\", \"landscape\" or \"square\", based on source image dimensions. Active filters exclude unknown dimensions. No extra filtering fee; only matching pins incur the row fee.",
            "default": "any"
          },
          "maxPagesPerQuery": {
            "title": "Maximum search pages per query",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Safety cap, for example 3. Range 1–10. A parsed page costs $0.008 even with no matching or new pins, usually with up to 25 source records. Stops on repeated pages/tokens. The result or request cap may stop earlier.",
            "default": 3
          },
          "onlyNew": {
            "title": "Only new results",
            "type": "boolean",
            "description": "false by default. true saves delivered IDs under monitorKey; later runs skip them. The first run returns the baseline. Successful checks still cost $0.008 each even with no new rows. Use an Apify schedule for recurring checks; this flag creates no schedule.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name such as \"daily-research\"; default \"default\". Reuse it for repeat runs. Targets, date window, locale and filters automatically form a separate baseline when changed. Keeps the latest 50,000 IDs per scope. Do not overlap runs with the same name and scope."
          },
          "excludeIds": {
            "title": "Previously collected IDs",
            "maxItems": 10000,
            "type": "array",
            "description": "Optional output id values, for example [\"previous-output-id\"]. Up to 10,000. Empty [] excludes nothing. Useful for caller-managed deduplication. Excluded rows are not charged; parsed source checks are.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxRequests": {
            "title": "Maximum HTTP requests",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard run-wide source request cap, for example 100; range 1–200. The initial public-session handshake uses one request before the first page, so at least 2 are needed for any pins. This is not a dollar limit. Set maxTotalChargeUsd as an Apify run option for a monetary cap.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}