{
  "openapi": "3.0.1",
  "info": {
    "title": "Mandi Traders List — Clean, Dedupe & Score Your APMC File",
    "description": "First 25 traders free. Mandi traders list from your RTI copy of APMC licence holders — a commission agents list cleaner, pay per qualified trader: licences checked, duplicates merged, scored 0–100, optional AI note in English or 5 Indian languages.",
    "version": "0.2",
    "x-build-id": "pzh1R4yteL65UPLED"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rich_minds~apmc-traders-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rich_minds-apmc-traders-ai",
        "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/rich_minds~apmc-traders-ai/runs": {
      "post": {
        "operationId": "runs-sync-rich_minds-apmc-traders-ai",
        "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/rich_minds~apmc-traders-ai/run-sync": {
      "post": {
        "operationId": "run-sync-rich_minds-apmc-traders-ai",
        "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": {
          "preset": {
            "title": "Start from a ready search (one click)",
            "enum": [
              "custom",
              "onion-lasalgaon",
              "chilli-telangana-karnataka",
              "turmeric-sourcing",
              "expiring-licences",
              "spice-exporter-set",
              "processors-exporters"
            ],
            "type": "string",
            "description": "Pick a ready filter set and press Start: it replaces the sample search's filters (the untouched prefill counts as empty) — commodities, states, licence types, validity; a value you typed always wins. Without a file it filters the free sample; with your list's link it filters your list. <b>Custom</b> = fill the fields yourself.",
            "default": "custom"
          },
          "fileUrls": {
            "title": "Your licensee lists (links)",
            "type": "array",
            "description": "Your APMC / mandi-board licensee list (RTI reply or purchased): CSV, XLSX, XLS, text PDF or zip, headers in 6 Indian languages. <b>A scanned printout cannot be read yet</b> — ask the office for the Excel / CSV file. <b>A Google Drive, Sheets, Dropbox or OneDrive share link works.</b> Any Apify plan. Government-site links are refused.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreId": {
            "title": "Your files in Apify Storage",
            "type": "string",
            "description": "Upload your list to Apify (Console → Storage → Key-value stores → create → upload the file) and pick the store here: every CSV / XLSX / XLS / PDF / zip record in it is read. A private record link above cannot be read by a public Actor — pick its store here instead. Any plan."
          },
          "pastedTable": {
            "title": "…or paste the table (copy from Excel, Sheets or a web page)",
            "type": "string",
            "description": "No file link? Copy the rows from Excel, Google Sheets or a web page and paste them here, header row first — tab, comma or semicolon separated. Read exactly like a file; 20 rows are enough to see the result. Any plan — no Store Actor runs, so a plan that cannot run Store Actors reads it too."
          },
          "goalDescription": {
            "title": "What do you buy or sell?",
            "type": "string",
            "description": "One or two sentences, e.g. <i>We export onion and dry chilli and want traders and commission agents with a valid licence</i>. The AI scores every trader against it; with <b>Commodities</b> empty, the commodity words in it become the commodity filter."
          },
          "commodities": {
            "title": "Commodities",
            "type": "array",
            "description": "Keep only traders of these commodities, in English or a local name — <code>onion</code> = <code>kanda</code> = <code>कांदा</code> = <code>pyaz</code>, <code>chilli</code> = <code>mirchi</code> = <code>మిర్చి</code>. A trader with no commodity in the list is kept and flagged. Empty = the commodity words of your goal, else all. API: <code>commodityMatch</code> <code>group</code> also keeps the same commodity group.",
            "items": {
              "type": "string"
            }
          },
          "minScore": {
            "title": "Minimum score (0–100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "The field that decides what you pay: traders scoring below this are dropped and <b>not charged</b>. 0 keeps every trader that passes your filters; 40 keeps warm and hot only, 70 hot only. The score: commodity +30, licence type +20, validity up to +20, place +5–10, complete row +10.",
            "default": 0
          },
          "maxQualified": {
            "title": "Max qualified traders to output",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on results and on what this Actor charges — worst case for 500 traders: $4.50 with AI on ($1.10 off), plus ≈ $1.20 of AI tokens. Best-scoring first; the rest are counted, not charged. <b>Affects what you pay.</b>",
            "default": 500
          },
          "maxDiscoveryChargeUsd": {
            "title": "Max spend for this run (USD)",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "Stops delivering before this run's charges pass this amount — the traders after it are counted, not charged. No source Actor runs, so this is the whole bill apart from AI tokens. <b>Affects what you pay.</b>",
            "default": 5
          },
          "enableAi": {
            "title": "AI assessment",
            "type": "boolean",
            "description": "Adds what rules cannot: the buyer segment the trader serves, red flags on the row, the question for the first call, a fit score with reasons and a pitch in English (licence facts only, never contacts). <b>On = $0.009 per qualified trader + ≈ $0.0024–0.0030 tokens; off = $0.0022.</b> Your first 5 traders get live AI verdicts on any plan; every one with Apify model access (not measured on the platform yet) or a paid own key.",
            "default": true
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Keep only traders of these states. Empty = all. API: ISO 3166-2:IN codes (<code>MH</code>, <code>TG</code> …) or state names in English or local script.",
            "items": {
              "type": "string",
              "enum": [
                "MH",
                "MP",
                "KA",
                "TG",
                "AP",
                "PB",
                "RJ",
                "GJ",
                "UP",
                "HR",
                "DL",
                "TN",
                "KL",
                "WB",
                "BR",
                "OR",
                "CT",
                "JH",
                "UT",
                "HP",
                "JK",
                "AS",
                "GA"
              ],
              "enumTitles": [
                "Maharashtra",
                "Madhya Pradesh",
                "Karnataka",
                "Telangana",
                "Andhra Pradesh",
                "Punjab",
                "Rajasthan",
                "Gujarat",
                "Uttar Pradesh",
                "Haryana",
                "Delhi",
                "Tamil Nadu",
                "Kerala",
                "West Bengal",
                "Bihar",
                "Odisha",
                "Chhattisgarh",
                "Jharkhand",
                "Uttarakhand",
                "Himachal Pradesh",
                "Jammu and Kashmir",
                "Assam",
                "Goa"
              ]
            }
          },
          "mandis": {
            "title": "Mandis (APMC / market committee)",
            "type": "array",
            "description": "Keep only these mandis — matched on the cleaned English name, case- and accent-insensitive: <code>Lasalgaon</code> = <code>लासलगाव</code> = <code>Lasalgaon APMC</code>. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "licenceTypes": {
            "title": "Licence types",
            "type": "array",
            "description": "Keep only these licence types. Labour licences (hamal, tulawati, palledar) are always dropped free — they are individual workers, not trading firms. Empty = all trading types.",
            "items": {
              "type": "string",
              "enum": [
                "trader",
                "commission_agent",
                "processor",
                "exporter",
                "retailer",
                "broker",
                "warehouse",
                "unified",
                "other"
              ],
              "enumTitles": [
                "Trader (vyapari, kharidar)",
                "Commission agent (arhtiya, adte, adatiya)",
                "Processor (miller, ginner)",
                "Exporter",
                "Retail trader",
                "Broker",
                "Warehouse / cold storage",
                "Unified / single trading licence",
                "Other"
              ]
            }
          },
          "commodityMatch": {
            "title": "Commodity match",
            "type": "string",
            "description": "API only — hidden on the form. <code>exact</code> (default): only traders of your commodities. <code>group</code>: also traders of the same commodity group (turmeric → any spice trader) at +15 instead of +30.",
            "default": "exact"
          },
          "minValidityDays": {
            "title": "Licence valid for at least (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "API only — hidden on the form (the form keeps 25 fields); the README input table names it. Drop licences that expire in fewer days than this, counted from today (the onion and chilli presets set 30 on the form). 0 = keep every valid licence. A licence with no validity date is kept and flagged.",
            "default": 0
          },
          "includeExpired": {
            "title": "Include expired, cancelled and suspended licences",
            "type": "boolean",
            "description": "API only — hidden on the form (the form keeps 25 fields); the README input table names it. On: expired, cancelled and suspended licences stay in the list (score −20, flagged) — the compliance or lender's check; the <b>Compliance: expired & expiring licences</b> preset sets it on the form. Off: they are dropped and never charged.",
            "default": false
          },
          "expiringWithinDays": {
            "title": "Expiring window (days)",
            "minimum": 0,
            "maximum": 730,
            "type": "integer",
            "description": "API only — hidden on the form. A licence that expires within this many days gets the status <code>expiring</code>.",
            "default": 90
          },
          "asOfDate": {
            "title": "Measure validity on (date)",
            "type": "string",
            "description": "API only — hidden on the form. The date validity is measured against (YYYY-MM-DD). Empty = today (India time)."
          },
          "listAsOf": {
            "title": "Date of your copy (RTI reply / purchase)",
            "type": "string",
            "description": "API only — hidden on the form (the form keeps 25 fields); the README input table names it. The date the list was issued or bought (YYYY-MM-DD) — shown on every row as <code>listAsOf</code>, so an old copy is visible in the sheet."
          },
          "targetFlags": {
            "title": "Target flags (any of)",
            "type": "array",
            "description": "Only deliver traders that carry at least one of these flags — e.g. <b>expiring</b> for a renewal list, <b>missing licence number</b> for a data-quality check. Empty = keep everything. An API call passes the flag names (<code>expiring</code>, <code>missingLicenceNumber</code> works too); an unknown name stops the run with the valid ones.",
            "items": {
              "type": "string",
              "enum": [
                "expired",
                "expiring",
                "cancelled",
                "suspended",
                "lifetime_licence",
                "validity_from_fy",
                "validity_unknown",
                "validity_inconsistent",
                "duplicate_merged",
                "merged_by_name",
                "possible_duplicate",
                "missing_licence_number",
                "missing_district",
                "missing_mandi",
                "commodities_unknown",
                "commodity_unmapped",
                "mandi_unmatched",
                "district_unmatched",
                "state_from_district",
                "mandi_from_sheet_name",
                "type_from_licence_number",
                "transliterated",
                "name_is_person_like",
                "sensitive_value_removed",
                "contact_from_buyer_file"
              ],
              "enumTitles": [
                "The licence expired before the as-of date (kept only with includeExpired)",
                "The licence expires within expiringWithinDays (default 90)",
                "The list marks the licence cancelled or surrendered",
                "The list marks the licence suspended",
                "A lifetime licence (आजीवन / permanent) — no expiry date",
                "Validity read from a financial year (2026-27 → 31 March 2027)",
                "The list gives no validity date",
                "The validity date is before the issue date — validity left empty",
                "Several rows of the same licence number and mandi merged into this one",
                "A row without a licence number merged into this trader by a near-identical firm name",
                "A row without a licence number that looks like two traders of the same mandi — not merged",
                "The list gives no licence number",
                "The list gives no district",
                "The list gives no mandi",
                "The list gives no commodity for this trader (kept, not filtered)",
                "A commodity the dictionary does not know — kept as published in commoditiesRaw",
                "The mandi is not in the built-in alias table — kept as published",
                "The district is not in the built-in district table — kept as published",
                "The state was filled from the district (the list had no state)",
                "The mandi was taken from the sheet name (one sheet per mandi)",
                "The licence type was read from the licence number (/CA/, /T/, /EX/ …)",
                "The firm name is not in Latin script — traderNameLatin is a best-effort reading",
                "The trading name is only 2–3 personal-name words (still the licensed name)",
                "An Aadhaar-, PAN- or IFSC-shaped value was removed from a kept cell",
                "Phone / e-mail / contact person come from your own file (includeContacts on)"
              ]
            }
          },
          "includeContacts": {
            "title": "Include contacts from my file",
            "type": "boolean",
            "description": "Output <code>phone</code>, <code>email</code>, <code>contactPerson</code> and a <code>whatsappLink</code> (wa.me with the pitch prefilled) only when your file carries them. Turn on only if you hold the right to use these contact details (for example, you obtained the list lawfully for this purpose). The Actor never looks up contacts on the web. Aadhaar, PAN, GSTIN and bank columns are always dropped, on or off. Off: the Outreach view says where and when to meet each trader at the yard instead.",
            "default": false
          },
          "requireEmail": {
            "title": "Only traders with an e-mail",
            "type": "boolean",
            "description": "On: keep only traders whose row in your file carries an e-mail — the rest are dropped, never charged, and counted in <code>OUTPUT.dropped.no_email</code>. Needs <b>Include contacts from my file</b> on. Off (default): every trader that passes your filters.",
            "default": false
          },
          "columnMap": {
            "title": "Column map (when a header is not recognised)",
            "type": "object",
            "description": "API / JSON tab only — hidden on the form (the form keeps 25 fields). Point a field at a header of your file: <code>{\"traderName\": \"Naam\", \"licenceNumber\": \"Regd No\"}</code>. It overrides the automatic mapping for the fields it names. Keys: traderName, licenceNumber, licenceType, mandi, subYard, district, state, commodities, validUntil, validFrom, status, address, pincode, phone, email, contactPerson. A refused file lists its headers in OUTPUT.queries[].headers."
          },
          "sheetName": {
            "title": "Sheet name (XLSX / XLS)",
            "type": "string",
            "description": "API only — hidden on the form. Read only this sheet. Empty = every sheet with a header row (board lists often hold one sheet per mandi)."
          },
          "dateOrder": {
            "title": "Date order",
            "type": "string",
            "description": "API only — hidden on the form. How to read <code>03/04/2026</code>-style dates: <code>auto</code> (default, day first unless a date proves otherwise), <code>DMY</code>, <code>MDY</code> or <code>YMD</code>.",
            "default": "auto"
          },
          "fileState": {
            "title": "State of the whole file",
            "type": "string",
            "description": "API only — hidden on the form (the form keeps 25 fields); the README input table names it. For a list (Excel, CSV or text PDF) that names its state only in the title — one office's RTI reply: that state (name or code), filled in where a row has none, so the filters and the score see it."
          },
          "fileMandi": {
            "title": "Mandi of the whole file",
            "type": "string",
            "description": "API only — hidden on the form (the form keeps 25 fields); the README input table names it. For a list (Excel, CSV or text PDF) that names its mandi only in the title — one office's RTI reply: that mandi, filled in where a row has none, so the filters and the score see it."
          },
          "fileDistrict": {
            "title": "District of the whole file",
            "type": "string",
            "description": "API only — hidden on the form (the form keeps 25 fields); the README input table names it. For a list (Excel, CSV or text PDF) that names its district only in the title — one office's RTI reply: that district, filled in where a row has none, so the filters and the score see it."
          },
          "outputLanguage": {
            "title": "Language of the AI pitch and question",
            "enum": [
              "en",
              "hi",
              "mr",
              "te",
              "kn",
              "pa"
            ],
            "type": "string",
            "description": "The language the AI writes the pitch (also typed into the WhatsApp link), the question to ask and the next step in — for field staff who call the trader at the yard. Firm names, mandis and commodity words stay as published; the other fields stay in English. AI on only.",
            "default": "en"
          },
          "llmProvider": {
            "title": "AI model access",
            "enum": [
              "apify",
              "byok"
            ],
            "type": "string",
            "description": "<b>Apify (no keys)</b> — the AI runs through Apify's built-in OpenRouter proxy; tokens are billed to your Apify account at OpenRouter's rates. <b>My own key</b> — your Gemini key: measured ≈ 1.0–31.4 s per trader with a free google:gemini-3.5-flash-lite key (1.0 s 2026-11-24, 31.4 s 2026-11-25), so 50 traders need a ≈ 1750 s timeout (sized from the slowest); OpenAI, Anthropic and Groq keys are accepted but untested. On a free-tier key expect 11–16 AI checks per run (measured 2026-11-24/25: every trader of those runs); a large backfill can hit its rate limit, and the traders it skips keep their rule score; a paid Groq / Gemini key (billing on) assesses every trader (as many as the run's time limit fits).",
            "default": "apify"
          },
          "llmModel": {
            "title": "AI model",
            "type": "string",
            "description": "API only — hidden on the form. Leave empty for the default (<code>anthropic/claude-haiku-4.5</code>). Apify mode takes an OpenRouter slug such as <code>openai/gpt-4.1-mini</code>; own-key mode takes <code>provider:model</code>, e.g. <code>anthropic:claude-haiku-4-5-20251001</code>."
          },
          "llmApiKey": {
            "title": "Your API key (own-key mode only)",
            "type": "string",
            "description": "Required when <b>AI model access</b> is <i>My own API key</i>. Stored encrypted by Apify, never logged."
          },
          "aiCandidateMultiplier": {
            "title": "AI shortlist size, × max qualified (API only)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "API only — hidden on the form. How many of the best rule-scored traders get the AI pass, as a multiple of <b>Max qualified</b>. Higher = more thorough, slower, more tokens.",
            "default": 2
          },
          "sendAlertsTo": {
            "title": "Send alerts to (Slack, Discord, Teams, Google Chat, Telegram or webhook)",
            "type": "string",
            "description": "Paste one or more URLs, one per line — the service is detected from the address: a Slack or Discord channel webhook, a Teams Workflows or Google Chat space webhook, your Telegram bot's send link (<code>https://api.telegram.org/bot&lt;token&gt;/sendMessage?chat_id=@yourchannel</code>) or any other https URL (Zapier, Make, n8n, your CRM), which gets the traders as JSON. After every run with at least one new trader, the digest (how many are new, the top 10 with links) is posted there. Never sent for the free demo. Headers, batching and signing: <i>Delivery details (advanced)</i>."
          },
          "notifyEmail": {
            "title": "E-mail me the cleaned list (Starter plan and up)",
            "type": "string",
            "description": "After every run with new traders, the digest (top 10 with their licence and mandi) is e-mailed here. Sent by Apify's send-mail Actor, so it needs a plan that runs Store Actors; on any plan use a Slack / Teams / Discord webhook (Send alerts to). Never sent for the free demo."
          },
          "dedupeAcrossRuns": {
            "title": "Never output the same trader twice",
            "type": "boolean",
            "description": "On: a trader (licence number + mandi) already delivered in an earlier run is not delivered or charged again — upload next quarter's RTI copy and pay only for new licensees. <b>Switched on by itself</b> in the task a run saves for scheduling, on scheduled runs and whenever an e-mail or alert destination is set (untick it there to get the whole list each time). Adding or removing a commodity or a mandi keeps the memory; changing the states, licence types, target flags or the source mode starts a new one; <code>dedupeStoreName</code> names a separate memory. Off (default for a one-off run): every run returns the whole cleaned list.",
            "default": false
          },
          "dedupeTtlDays": {
            "title": "Deliver a trader again after (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "API only — hidden on the form. How long a delivered trader stays remembered. 0 = never deliver or charge it again. A number of days lets a trader that comes back on a later copy reach you again after that many days — charged again as a new trader. Adding or removing a commodity or a mandi keeps the memory; changing the states, licence types, target flags or the source mode starts a new one; set <code>dedupeStoreName</code> to keep one memory per client.",
            "default": 0
          },
          "historyDatasetName": {
            "title": "Keep a running log (dataset name)",
            "type": "string",
            "description": "API only — hidden on the form. Optional. Type a name (e.g. <code>apmc-traders-ai-seen-log</code>) and every run appends its new traders with the date to that named dataset on your account — one list across months to connect to Google Sheets or your BI tool once. Empty = off. Costs nothing extra.",
            "default": ""
          },
          "sourceMode": {
            "title": "Where do the licensee rows come from?",
            "enum": [
              "files",
              "list",
              "dataset"
            ],
            "type": "string",
            "description": "<code>{}</code> over the API runs the free demo — nothing charged; any link in <code>fileUrls</code> runs your list. <b>files</b> — your list files or a pasted table (any plan). <b>list</b> — licensee rows pasted as JSON into <i>Licensee rows</i> (the free sample is prefilled). <b>dataset</b> — an Apify dataset of licensee rows. The mode you choose runs as chosen; only the untouched sample next to a file link or a pasted table on the Console form switches to your files.",
            "default": "files"
          },
          "autoSwitchToLive": {
            "title": "A file link next to the sample switches to your files (API only)",
            "type": "boolean",
            "description": "API only — hidden on the form. On (default, Console runs only): a file link, a pasted table or a store typed next to the untouched sample rows switches the run to your files (<code>OUTPUT.switchedToLive</code> names the field). Off: the mode you send is the mode that runs. Over the API, a schedule or a task the <code>sourceMode</code> you send always decides.",
            "default": true
          },
          "failOnSourceError": {
            "title": "Fail the run when no file could be read",
            "type": "boolean",
            "description": "API only — hidden on the form. Off (default): a run whose files could all not be read ends with 0 rows and <code>OUTPUT.ok: false</code> (the refused files listed). On: the run ends FAILED with the same message, so a schedule's or an API pipeline's failed-run alert fires.",
            "default": false
          },
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "Only for <b>dataset</b> mode: a dataset whose items are licensee rows (an earlier run of this Actor, or your own import) — read through the same column mapping."
          },
          "itemsList": {
            "title": "Licensee rows (JSON)",
            "type": "array",
            "description": "Only for <b>list</b> mode. Licensee rows as JSON objects, keyed by the headers of your list in any of the six languages (README → List-mode rows). At least a firm name or a licence number and a mandi, district or state. The prefill is a free, fictional sample."
          },
          "maxToProcess": {
            "title": "Max traders to score per run",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "API only — hidden on the form. Upper bound on how many licensees are scored in one run. Default: all (200,000)."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "API only — hidden on the form. Qualified traders are POSTed here as JSON (Zapier, Make, n8n, your CRM). For Google Sheets / Slack you can also use Apify's built-in Integrations tab. Stored encrypted — Zapier / Make hook URLs carry their secret in the path."
          },
          "webhookHeaders": {
            "title": "Webhook headers (API only)",
            "type": "object",
            "description": "API only — hidden on the form. Extra HTTP headers for the webhook, e.g. <code>{\"Authorization\": \"Bearer …\"}</code>. Stored encrypted by Apify, never logged."
          },
          "webhookBatchSize": {
            "title": "Webhook batch size (API only)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "API only — hidden on the form. 1 = one POST per trader the moment it is ready. Higher = one POST per N traders.",
            "default": 1
          },
          "webhookSecret": {
            "title": "Webhook signing secret (API only)",
            "type": "string",
            "description": "API only — hidden on the form. Any random string. Every webhook POST then carries <code>X-Signature: sha256=&lt;HMAC-SHA256 of the raw body with this secret&gt;</code>, so your endpoint can verify it came from this Actor. Stored encrypted by Apify, never logged."
          },
          "dedupeStoreName": {
            "title": "Dedupe store name (API only)",
            "type": "string",
            "description": "API only — hidden on the form. Key-value store used for cross-run memory. Left at the default, the memory is kept per search: Adding or removing a commodity or a mandi keeps the memory; changing the states, licence types, target flags or the source mode starts a new one. Rewording <code>goalDescription</code> keeps it too. Running it for several clients on one account, type one name per client.",
            "default": "apmc-traders-ai-seen"
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL (API only)",
            "type": "string",
            "description": "API only — an alias of <code>sendAlertsTo</code> (prefer it: one field takes every service), hidden on the form. Slack incoming-webhook URL for the digest."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL (API only)",
            "type": "string",
            "description": "API only — an alias of <code>sendAlertsTo</code> (prefer it: one field takes every service), hidden on the form. Discord channel webhook URL for the digest."
          },
          "teamsWebhookUrl": {
            "title": "Microsoft Teams webhook URL (API only)",
            "type": "string",
            "description": "API only — an alias of <code>sendAlertsTo</code> (prefer it: one field takes every service), hidden on the form. Teams Workflows webhook URL for the digest."
          },
          "googleChatWebhookUrl": {
            "title": "Google Chat webhook URL (API only)",
            "type": "string",
            "description": "API only — an alias of <code>sendAlertsTo</code> (prefer it: one field takes every service), hidden on the form. Google Chat space webhook URL for the digest."
          },
          "telegramUrl": {
            "title": "Telegram sendMessage link (API only)",
            "type": "string",
            "description": "API only — an alias of <code>sendAlertsTo</code> (prefer it: one field takes every service), hidden on the form. The bot's sendMessage link with its chat_id."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}