{"openapi":"3.1.0","info":{"title":"Vigil API — India Red Flag Tracker","version":"3.1.0","description":"Credit ratings, insider trading, pledge data, SAST disclosures, encumbrance events, surveillance flags, and related party transactions for ~750 Indian listed companies.\n\nRate limit: 30 requests/min per IP. Downloads: 10/min. No auth required.\n\nApp: https://vigil.tigzig.com"},"paths":{"/vigil/v1/":{"get":{"tags":["Vigil — India Red Flag Tracker"],"summary":"API catalog — list all available endpoints and tables","description":"Returns a catalog of all available endpoints, tables, and their descriptions.\nThis is the starting point for AI agents to discover available data.","operationId":"catalog_vigil_v1__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/vigil/v1/tables":{"get":{"tags":["Vigil — India Red Flag Tracker"],"summary":"List all tables with row counts and freshness","description":"Returns all available table names with row counts and data freshness.","operationId":"tables_list_vigil_v1_tables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/vigil/v1/companies":{"get":{"tags":["Vigil — India Red Flag Tracker"],"summary":"List all companies with symbol and ISIN","description":"Returns a unique list of all companies across all tables.\nUse this to get valid symbols for the /company/{symbol} endpoint.","operationId":"companies_list_vigil_v1_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/vigil/v1/company/{identifier}":{"get":{"tags":["Vigil — India Red Flag Tracker"],"summary":"All data for a single company","description":"Fetch all available data for a single company across all tables.\n\nThe identifier should be an **NSE Symbol** (e.g. `RELIANCE`, `TCS`, `HDFCBANK`).\nAlso accepts ISIN (e.g. `INE002A01018`) or company name.\n\nReturns per-table record counts in a summary section, plus full data arrays.\nUse the `tables` parameter to fetch only specific tables (e.g. `?tables=credit_ratings,insider_trading`).","operationId":"company_lookup_vigil_v1_company__identifier__get","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"tables","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated table names to include (default: all)","title":"Tables"},"description":"Comma-separated table names to include (default: all)"},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Response format: json or tsv","enum":["json","tsv"],"default":"json","title":"Format"},"description":"Response format: json or tsv"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vigil/v1/data/{table_name}":{"get":{"tags":["Vigil — India Red Flag Tracker"],"summary":"Paginated table data","description":"Paginated data from a single table.\n\nAvailable tables: `credit_ratings`, `insider_trading`, `pledge_data`,\n`sast_disclosures`, `encumbrance_events`, `surveillance_flags`, `rpt_transactions`.\n\nUse `limit` and `offset` for pagination. Default: 1000 rows per page, max 5000.","operationId":"table_data_vigil_v1_data__table_name__get","parameters":[{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"description":"Rows per page (max 5000)","default":1000,"title":"Limit"},"description":"Rows per page (max 5000)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Row offset for pagination","default":0,"title":"Offset"},"description":"Row offset for pagination"},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Response format: json or tsv","enum":["json","tsv"],"default":"json","title":"Format"},"description":"Response format: json or tsv"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vigil/v1/download/all":{"get":{"tags":["Vigil — India Red Flag Tracker"],"summary":"Download all tables as a single file","description":"Download all tables in a single SQLite database file.\n\nFormats:\n- **sqlite** — Zipped SQLite (browser-friendly, unzip to get vigil_all_tables.db)\n- **sqlite.gz** — Gzipped SQLite (for API/programmatic use)\n\nServed from pre-generated static files for instant delivery.","operationId":"download_all_vigil_v1_download_all_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"File format: sqlite, sqlite.gz","enum":["sqlite","sqlite.gz"],"default":"sqlite","title":"Format"},"description":"File format: sqlite, sqlite.gz"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vigil/v1/download/{table_name}":{"get":{"tags":["Vigil — India Red Flag Tracker"],"summary":"Download full table as a file","description":"Download an entire table as a pre-generated static file.\n\nFormats:\n- **csv** — Zipped CSV, universal (browser-friendly)\n- **csv.gz** — Gzipped CSV (for API/programmatic use)\n- **tsv** — Zipped TSV, ideal for AI/LLM context windows\n- **tsv.gz** — Gzipped TSV (for API/programmatic use)\n- **parquet** — Snappy-compressed columnar, ideal for pandas/DuckDB\n- **sqlite** — Zipped SQLite database (unzip, then query locally)\n- **sqlite.gz** — Gzipped SQLite (for API/programmatic use)","operationId":"download_table_vigil_v1_download__table_name__get","parameters":[{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"File format: csv, tsv, parquet, sqlite, csv.gz, tsv.gz, sqlite.gz","enum":["csv","tsv","parquet","sqlite","csv.gz","tsv.gz","sqlite.gz"],"default":"csv","title":"Format"},"description":"File format: csv, tsv, parquet, sqlite, csv.gz, tsv.gz, sqlite.gz"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vigil/v1/freshness":{"get":{"tags":["Vigil — India Red Flag Tracker"],"summary":"Data freshness — last sync time per table","description":"Returns the last sync time and record count for each table.\nUse this to check how current the data is.","operationId":"freshness_vigil_v1_freshness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/vigil/v1/downloads/manifest":{"get":{"tags":["Vigil — India Red Flag Tracker"],"summary":"Download file manifest with sizes","description":"Returns the manifest of pre-generated download files with file sizes.\nUse this to show file sizes on download buttons.","operationId":"downloads_manifest_vigil_v1_downloads_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}