{
  "openapi": "3.0.1",
  "info": {
    "title": "Peptide Market Intelligence Scraper",
    "description": "Track GLP-1s, BPC-157, and 30+ peptide compounds across Reddit, YouTube, and Amazon with sentiment, intent, and vendor leaderboards.",
    "version": "1.0",
    "x-build-id": "UEc6O6hB4FSfHpJYR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/constructive_calm~peptide-market-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-constructive_calm-peptide-market-intel",
        "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/constructive_calm~peptide-market-intel/runs": {
      "post": {
        "operationId": "runs-sync-constructive_calm-peptide-market-intel",
        "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/constructive_calm~peptide-market-intel/run-sync": {
      "post": {
        "operationId": "run-sync-constructive_calm-peptide-market-intel",
        "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": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which channels to aggregate peptide mentions from. YouTube and Amazon are enabled by default. Reddit is available as opt-in but can return 403 from Apify cloud.",
            "items": {
              "type": "string",
              "enum": [
                "reddit",
                "youtube",
                "amazon"
              ],
              "enumTitles": [
                "Reddit",
                "YouTube videos",
                "Amazon product search"
              ]
            },
            "default": [
              "youtube",
              "amazon"
            ]
          },
          "compoundCategories": {
            "title": "Compound categories",
            "type": "array",
            "description": "Filter the resolved vocabulary by therapeutic category. Leave empty to track all categories. Categories come from UniProt keywords + the consumer overlay.",
            "items": {
              "type": "string",
              "enum": [
                "GLP-1",
                "healing",
                "GH-GHRP",
                "cosmetic",
                "sexual",
                "nootropic",
                "longevity"
              ]
            },
            "default": []
          },
          "customVocabulary": {
            "title": "Custom compound vocabulary",
            "type": "array",
            "description": "Add peptide compounds (canonical names) to track beyond the resolved UniProt + consumer-overlay list. Useful for experimental or newly-launched compounds not yet in the public vocabulary.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerSource": {
            "title": "Max items per source",
            "minimum": 10,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap the number of items fetched from each mention-producing source (Reddit, YouTube, Amazon). Higher values increase coverage and runtime. Start low (30-100) to preview before scaling up.",
            "default": 30
          },
          "enrichmentMode": {
            "title": "Enrichment mode",
            "enum": [
              "full",
              "raw"
            ],
            "type": "string",
            "description": "full = Gemini 2.5 Flash adds compound disambiguation, sentiment (positive/neutral/negative + score), intent classification, and vendor/brand extraction. raw = faster, no LLM fields; rows still have deterministic compound + alias matches. Same price per mention either way.",
            "default": "full"
          },
          "includeAggregates": {
            "title": "Include aggregate reports",
            "type": "boolean",
            "description": "Write TOP_COMPOUNDS, VENDOR_LEADERBOARD, SENTIMENT_BY_COMPOUND, and TRENDING_COMPOUNDS_7D to the Key-Value Store. Recommended: this is where the cross-source intelligence lives.",
            "default": true
          },
          "autoDiscover": {
            "title": "Auto-discover new compounds",
            "type": "boolean",
            "description": "Ask Gemini to flag compound-like terms that look like peptides but aren't in the resolved vocabulary. Results land in the SUGGESTED_VOCABULARY KV doc. Review them and add promising ones to customVocabulary or the VOCAB_CONSUMER_OVERLAY KV record on next run.",
            "default": false
          },
          "datasetName": {
            "title": "Named dataset (enables 7-day trending deltas)",
            "type": "string",
            "description": "Set a persistent dataset name across scheduled runs to get week-over-week TRENDING_COMPOUNDS_7D deltas. Leave empty for one-off runs; the trending doc will return a note rather than real deltas."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}