{
  "openapi": "3.0.1",
  "info": {
    "title": "Indian IPO Tracker - SEBI DRHP, GMP & Listing API",
    "description": "Track every Indian mainboard & SME IPO from DRHP to listing. Multi-source GMP, live subscription, webhook alerts on lifecycle changes.",
    "version": "0.4",
    "x-build-id": "XC3cd9nh7zY2ciYtd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/contented_academy~indian-ipo-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-contented_academy-indian-ipo-tracker",
        "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/contented_academy~indian-ipo-tracker/runs": {
      "post": {
        "operationId": "runs-sync-contented_academy-indian-ipo-tracker",
        "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/contented_academy~indian-ipo-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-contented_academy-indian-ipo-tracker",
        "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": [
          "preset"
        ],
        "properties": {
          "preset": {
            "title": "What do you want to do?",
            "enum": [
              "track_all_current",
              "track_specific",
              "gmp_only",
              "listed_postmortem",
              "custom"
            ],
            "type": "string",
            "description": "Pick a preset for one-click usage. Choose 'Custom' to configure every advanced field yourself.",
            "default": "track_all_current"
          },
          "mode": {
            "title": "Run mode",
            "enum": [
              "full",
              "incremental",
              "specific",
              "gmp_only",
              "subscription_checkpoint",
              "bulk_deals_daily",
              "listing_day_oneshot",
              "boa_parse",
              "prospectus_parse",
              "discovery",
              "refresh_worker",
              "parse_worker"
            ],
            "type": "string",
            "description": "Advanced. Use `incremental` for hourly polling. Use `full` for first run or after long downtime. Use `specific` to scrape only the IPOs in `ipo_filter`. The narrow modes (`gmp_only`, `subscription_checkpoint`, `bulk_deals_daily`, `listing_day_oneshot`) run a single sub-pipeline at high cadence. Ignored unless preset = Custom.",
            "default": "incremental"
          },
          "ipo_filter": {
            "title": "IPO filter",
            "uniqueItems": true,
            "type": "array",
            "description": "Specific `ipo_id` values to scrape. Required if `mode = specific`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "max_ipos": {
            "title": "Max IPOs per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum IPOs to process in one run (1–1000).",
            "default": 200
          },
          "sources_enabled": {
            "title": "Primary lifecycle sources",
            "uniqueItems": true,
            "type": "array",
            "description": "Sources scraped for DRHP, RHP, SEBI status, and exchange listing data.",
            "items": {
              "type": "string",
              "enum": [
                "sebi",
                "bse",
                "nse"
              ],
              "enumTitles": [
                "SEBI",
                "BSE",
                "NSE"
              ]
            },
            "default": [
              "sebi",
              "bse",
              "nse"
            ]
          },
          "gmp_sources_enabled": {
            "title": "GMP publishers",
            "uniqueItems": true,
            "type": "array",
            "description": "Grey-Market-Premium publishers to scrape. Disable any source to reduce cost or in response to a kill-switch event.",
            "items": {
              "type": "string",
              "enum": [
                "investorgain",
                "chittorgarh",
                "ipowatch"
              ],
              "enumTitles": [
                "InvestorGain",
                "Chittorgarh",
                "IPO Watch"
              ]
            },
            "default": [
              "investorgain",
              "chittorgarh",
              "ipowatch"
            ]
          },
          "webhook_url": {
            "title": "Webhook URL",
            "pattern": "^https://.+",
            "type": "string",
            "description": "HTTPS endpoint that receives event POSTs. Payloads are HMAC-SHA256 signed via the `X-IPO-Tracker-Signature` header."
          },
          "webhook_secret": {
            "title": "Webhook signing secret",
            "type": "string",
            "description": "32–128 character shared secret used to HMAC-sign webhook payloads. Length is enforced at actor start time."
          },
          "webhook_events_subscribed": {
            "title": "Subscribed webhook events",
            "uniqueItems": true,
            "type": "array",
            "description": "Event types to deliver to the webhook URL.",
            "items": {
              "type": "string",
              "enum": [
                "lifecycle_status_change",
                "gmp_threshold_crossed",
                "listing_pop_calculated",
                "coverage_gap_detected",
                "subscription_milestone_crossed",
                "subscription_acceleration_detected",
                "basis_of_allotment_published"
              ],
              "enumTitles": [
                "Lifecycle status change",
                "GMP threshold crossed",
                "Listing pop calculated",
                "Coverage gap detected",
                "Subscription milestone crossed (1×, 5×, 10×)",
                "Subscription acceleration detected (≥3× day-over-day)",
                "Basis of Allotment published"
              ]
            },
            "default": [
              "lifecycle_status_change"
            ]
          },
          "gmp_threshold_pct": {
            "title": "GMP change threshold (%)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Trigger a `gmp_threshold_crossed` webhook when reconciled GMP changes by at least this percent since the prior snapshot.",
            "default": 20
          },
          "verify_drhp_pdf": {
            "title": "Verify DRHP PDF URLs (HEAD only)",
            "type": "boolean",
            "description": "Issue an HTTP HEAD against every DRHP PDF URL discovered on the SEBI detail page. Confirms accessibility (filters dead/403 links) and records `lifecycle.drhp_pdf_content_length` + `lifecycle.drhp_pdf_verified_at` for audit. **Does not download or parse PDF content** — for cover-page field extraction (issue size, promoters, registrar, face value, fresh-issue/OFS split) use the upcoming `parse_drhp_cover` flag (separate plan, pending). Costs ~1 extra HEAD request per detail page; default off.",
            "default": false
          },
          "confidential_filings_enabled": {
            "title": "Scrape SEBI confidential filings",
            "type": "boolean",
            "description": "Enable the SEBI confidential-filings scraper (pre-filed acknowledgements). Disable as a kill-switch if SEBI changes the surface and the scraper starts erroring.",
            "default": true
          },
          "proxy_configuration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration. Defaults to the residential pool with India geolocation.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "countryCode": "IN"
            }
          },
          "max_concurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum concurrent requests across all sources.",
            "default": 4
          },
          "request_rate_per_minute": {
            "title": "Per-source rate limit",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum requests per minute against any single source domain. Lower is politer; higher is faster but more block-prone.",
            "default": 2
          },
          "dataset_mode": {
            "title": "Dataset write mode",
            "enum": [
              "snapshot",
              "append"
            ],
            "type": "string",
            "description": "`snapshot` writes one record per IPO per run (latest state). `append` writes one record per state change (audit trail).",
            "default": "snapshot"
          },
          "debug_mode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose per-source logs and skip webhook dispatch.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}