{
  "openapi": "3.0.1",
  "info": {
    "title": "Notion Marketplace & Template Scraper",
    "description": "Scrape Notion templates, creators, prices, ratings, and details from the Notion Template Gallery. Export structured data in JSON/CSV for market research and B2B lead generation.",
    "version": "2.0",
    "x-build-id": "UIkSGrWjOGSt1p2EA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/forlex~notion-template-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-forlex-notion-template-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/forlex~notion-template-scraper/runs": {
      "post": {
        "operationId": "runs-sync-forlex-notion-template-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/forlex~notion-template-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-forlex-notion-template-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": {
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Keyword to search in Notion Marketplace (e.g. 'crm', 'second brain', 'habit tracker')."
          },
          "searchQueries": {
            "title": "Search Queries (Batch)",
            "type": "array",
            "description": "Optional list of multiple search keywords to scrape in one run.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "enum": [
              "All",
              "Work",
              "Personal",
              "CRM",
              "Finance",
              "Freelance",
              "Projects",
              "AI Skills",
              "Design",
              "Education",
              "Engineering",
              "Health",
              "Home",
              "HR",
              "Marketing",
              "Planning",
              "Product",
              "Sales",
              "Wiki",
              "Student Dashboards",
              "Personal Planner"
            ],
            "type": "string",
            "description": "Single Notion Marketplace category slug or name (e.g. 'CRM', 'Finance', 'AI Skills', or 'All').",
            "default": "All"
          },
          "categories": {
            "title": "Categories (Batch Slugs)",
            "type": "array",
            "description": "Optional list of Notion Marketplace category slugs to paginate through (e.g. ['crm', 'finance', 'ai-skills']).",
            "items": {
              "type": "string"
            }
          },
          "creatorUsernames": {
            "title": "Creator Handles (@username)",
            "type": "array",
            "description": "Scrape templates and AI agents created by specific Notion Marketplace creators (e.g. ['notion', 'thomas']).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct Notion Marketplace URLs: search pages, /templates/category/<slug>, /templates/<slug>, /custom-agent-templates/<slug>, or /@<username>.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "assetType": {
            "title": "Asset Type",
            "enum": [
              "templates",
              "agents",
              "skills",
              "all"
            ],
            "type": "string",
            "description": "Choose whether to extract Notion templates, custom AI agents, AI skills, or all asset types.",
            "default": "templates"
          },
          "priceModel": {
            "title": "Price Filter",
            "enum": [
              "All",
              "Free",
              "Paid"
            ],
            "type": "string",
            "description": "Filter results by free or paid pricing.",
            "default": "All"
          },
          "minPrice": {
            "title": "Min Price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum template price in USD (e.g. 5)."
          },
          "maxPrice": {
            "title": "Max Price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Maximum template price in USD (e.g. 150)."
          },
          "madeBy": {
            "title": "Creator Origin",
            "enum": [
              "all",
              "community",
              "notion"
            ],
            "type": "string",
            "description": "Filter between community creators and official Notion templates.",
            "default": "all"
          },
          "onlyWithEmail": {
            "title": "Only B2B Leads with Email",
            "type": "boolean",
            "description": "Keep only items where the creator exposes a public contact email.",
            "default": false
          },
          "onlyVerifiedSellers": {
            "title": "Only Approved Paid Sellers",
            "type": "boolean",
            "description": "Keep only creators with approved marketplace seller / Stripe onboarding status (when available).",
            "default": false
          },
          "includeReviews": {
            "title": "Include Full Detail & Buyer Reviews",
            "type": "boolean",
            "description": "Fetch individual template/agent detail pages to include buyer reviews, ratings, full descriptions, and screenshots (incurs detail enrichment event).",
            "default": false
          },
          "deepScrape": {
            "title": "Deep Scrape Mode (Alias for Include Reviews)",
            "type": "boolean",
            "description": "Legacy alias for includeReviews. When true, fetches individual detail pages and buyer reviews.",
            "default": false
          },
          "sortBy": {
            "title": "Sort Results By",
            "enum": [
              "default",
              "popularity_desc",
              "price_desc",
              "price_asc",
              "newest"
            ],
            "type": "string",
            "description": "Post-scrape sorting order.",
            "default": "default"
          },
          "outputMode": {
            "title": "Output Format Mode",
            "enum": [
              "standard",
              "rag"
            ],
            "type": "string",
            "description": "Standard JSON fields, or RAG mode adding an LLM-ready Markdown summary per item.",
            "default": "standard"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of Notion Marketplace items to return.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration. Direct HTTP works without proxies for standard volumes.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}