{
  "openapi": "3.0.1",
  "info": {
    "title": "GoldAnswer — High-Intent Lead Hunter",
    "description": "Finds high-intent questions on Reddit, Hacker News & RSS, scores them 0–100, and drafts a reply with your CTA (BYOK).",
    "version": "0.0",
    "x-build-id": "TrH4j9g2Dedmn28Rv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gemlike_playbill~goldanswer-hunter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gemlike_playbill-goldanswer-hunter",
        "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/gemlike_playbill~goldanswer-hunter/runs": {
      "post": {
        "operationId": "runs-sync-gemlike_playbill-goldanswer-hunter",
        "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/gemlike_playbill~goldanswer-hunter/run-sync": {
      "post": {
        "operationId": "run-sync-gemlike_playbill-goldanswer-hunter",
        "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": {
          "keywords": {
            "title": "Keywords (niche)",
            "type": "string",
            "description": "Comma-separated buyer keywords, e.g. 'analytics, saas, churn'. These define the intent you hunt for."
          },
          "communities": {
            "title": "Communities / sources",
            "type": "string",
            "description": "Comma-separated. Use 'hackernews' (works with no key), 'r/SUBREDDIT' or 'reddit:SUBREDDIT' (needs the Reddit credentials below), or a full RSS/Atom feed URL. Empty = Hacker News only."
          },
          "product": {
            "title": "Your product / offer",
            "type": "string",
            "description": "Used inside the drafted answer so it reads naturally. Optional."
          },
          "ctaUrl": {
            "title": "CTA / lead link (with UTM)",
            "type": "string",
            "description": "The link the draft points to, e.g. 'https://yoursite.com?utm=goldanswer'. Optional."
          },
          "minIntentScore": {
            "title": "Minimum intent score (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only leads at or above this score are output. 40 = good volume, 60 = solid, 70 = hot. Lower it to include more HN news; raise it to keep only real questions.",
            "default": 40
          },
          "maxResults": {
            "title": "Max leads to output",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stop after this many high-intent leads (keeps runs cheap).",
            "default": 30
          },
          "includeDrafts": {
            "title": "Include drafted answers",
            "type": "boolean",
            "description": "If true, each lead comes with a ready-to-post draft. Disable to output questions only.",
            "default": true
          },
          "redditClientId": {
            "title": "Reddit app ID (optional)",
            "type": "string",
            "description": "Create a 'script' or 'web app' at reddit.com/prefs/apps and paste its ID here. Needed for reliable Reddit scanning (the public API is often rate-limited / returns 403). Hacker News needs no key. Billed to your own Reddit app quota."
          },
          "redditClientSecret": {
            "title": "Reddit app secret (optional)",
            "type": "string",
            "description": "Pair this with the Client ID above."
          },
          "llmBaseUrl": {
            "title": "LLM base URL (optional — powers AI drafts)",
            "type": "string",
            "description": "Any OpenAI-compatible endpoint. Provide it (with a key + model) to use your own LLM for smarter drafts. Examples: OpenAI https://api.openai.com/v1 | DeepSeek https://api.deepseek.com/v1 | Groq https://api.groq.com/openai/v1 | Alibaba Qwen https://dashscope.aliyuncs.com/compatible-mode/v1 | local Ollama http://localhost:11434/v1. Leave empty to use free rule-based drafts (no key needed)."
          },
          "llmApiKey": {
            "title": "LLM API key (optional)",
            "type": "string",
            "description": "The API key for the base URL above (get it from OpenAI / DeepSeek / Groq / Qwen, etc.). For local models like Ollama, any non-empty string works. Leave empty to skip the LLM. Billed to your own account."
          },
          "llmModel": {
            "title": "LLM model (optional)",
            "type": "string",
            "description": "Model name, comma-separated for fallbacks, e.g. gpt-4o-mini, deepseek-chat, llama3.1:8b. deepseek-chat is a great low-friction choice. Empty defaults to gpt-4o-mini."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}