{
  "openapi": "3.0.1",
  "info": {
    "title": "Perplexity Discover Scraper",
    "description": "Scrapes trending stories, summaries, and topics from Perplexity Discover (perplexity.ai/discover). Extracts story titles, descriptions, publication timestamps, source counts, category tags, and discover URLs.",
    "version": "3.0",
    "x-build-id": "gBdLRZ2QgtFnvbJMl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/searchapi~perplexity-discover-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-searchapi-perplexity-discover-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/searchapi~perplexity-discover-scraper/runs": {
      "post": {
        "operationId": "runs-sync-searchapi-perplexity-discover-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/searchapi~perplexity-discover-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-searchapi-perplexity-discover-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": {
          "category": {
            "title": "Category (single / legacy)",
            "enum": [
              "",
              "Top",
              "Tech & Science",
              "Business",
              "Arts & Culture",
              "Sports",
              "Entertainment"
            ],
            "type": "string",
            "description": "One Discover category. It can be combined with categories; leave empty to use Top.",
            "default": ""
          },
          "categories": {
            "title": "Additional categories",
            "type": "array",
            "description": "Optional fair batch of up to five unique Discover categories.",
            "items": {
              "type": "string",
              "enum": [
                "Top",
                "Tech & Science",
                "Business",
                "Arts & Culture",
                "Sports",
                "Entertainment"
              ]
            }
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Global output limit across all selected categories.",
            "default": 20
          },
          "maxItemsPerCategory": {
            "title": "Maximum candidates per category",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Structured stories requested from each category in one bounded response.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort results",
            "enum": [
              "feedOrder",
              "newest",
              "oldest",
              "mostSources",
              "mostViewed"
            ],
            "type": "string",
            "description": "Preserve fair Discover ranking or sort combined unique records by a source-backed field.",
            "default": "feedOrder"
          },
          "minSourceCount": {
            "title": "Minimum source count",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Keep stories backed by at least this many Perplexity-reported sources.",
            "default": 0
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Keep stories containing at least one keyword in title or summaries.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Remove stories containing any keyword in title or summaries.",
            "items": {
              "type": "string"
            }
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Optional inclusive ISO-8601 date/time boundary."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Optional inclusive ISO-8601 date/time boundary."
          },
          "maxConcurrency": {
            "title": "Category concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum number of category pages processed concurrently.",
            "default": 3
          },
          "maxRequestRetries": {
            "title": "Maximum retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Bounded retry count for temporary browser, proxy, or target failures.",
            "default": 2
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout (seconds)",
            "minimum": 10,
            "maximum": 90,
            "type": "integer",
            "description": "Maximum time allowed for each category-page navigation.",
            "default": 45
          },
          "requestHandlerTimeoutSecs": {
            "title": "Handler timeout (seconds)",
            "minimum": 30,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time allowed to capture and normalize one category response.",
            "default": 90
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional authorized Apify or custom proxy. GOOGLE_SERP is rejected because it is Google-only."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}