{
  "openapi": "3.0.1",
  "info": {
    "title": "India Export Data by HS Code and Country: Monthly TradeStat",
    "description": "First 50 export rows free. India export data by HS code and country, monthly from TradeStat — pay only for export rows that match, no source fee: US $, ₹, tonnes, unit price, growth. Type a product or HS code. Free demo on any plan.",
    "version": "0.1",
    "x-build-id": "fO4AymJxppyBi971P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rich_minds~india-export-stats-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rich_minds-india-export-stats-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~india-export-stats-ai/runs": {
      "post": {
        "operationId": "runs-sync-rich_minds-india-export-stats-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~india-export-stats-ai/run-sync": {
      "post": {
        "operationId": "run-sync-rich_minds-india-export-stats-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",
              "chilli-eu-us",
              "rice-gulf",
              "shrimp-top-markets",
              "pharma-africa",
              "spices-annual",
              "spice-basket"
            ],
            "type": "string",
            "description": "Pick a ready search and press Start: it replaces the sample below and reads TradeStat's MEIDB form live (any Apify plan, no Store Actor runs); a value you typed yourself always wins. The status names what ran. <b>Custom</b> = fill the fields yourself.",
            "default": "custom"
          },
          "hsCodes": {
            "title": "Products — HS codes or product words",
            "type": "array",
            "description": "ITC-HS codes (090422, 0904) or product words (\"basmati rice\", \"frozen shrimp\"): a word is matched to TradeStat's own HS lookup and the code found is named in the status. Typing one reads TradeStat live on any Apify plan; the free demo below does not search it. At most 10. Affects what you pay: one charge per export row.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Destination countries",
            "type": "array",
            "description": "The markets you want, or <b>All countries</b> (≈ 160 partners; zero-trade months dropped free). API: ISO-2 codes, names or <code>[\"ALL\"]</code>. Typed next to the untouched sample they start the live read on any Apify plan — the free demo does not search them; in list mode they filter your rows. Affects what you pay: 13 rows per country.",
            "items": {
              "type": "string",
              "enum": [
                "ALL",
                "AF",
                "AL",
                "DZ",
                "AS",
                "AD",
                "AO",
                "AI",
                "AG",
                "AR",
                "AM",
                "AW",
                "AU",
                "AT",
                "AZ",
                "BS",
                "BH",
                "BD",
                "BB",
                "BY",
                "BE",
                "BZ",
                "BJ",
                "BM",
                "BT",
                "BO",
                "BA",
                "BW",
                "BR",
                "VG",
                "BN",
                "BG",
                "BF",
                "BI",
                "KH",
                "CM",
                "CA",
                "CV",
                "KY",
                "CF",
                "TD",
                "CL",
                "CN",
                "CO",
                "KM",
                "CG",
                "CK",
                "CR",
                "CI",
                "HR",
                "CU",
                "CW",
                "CY",
                "CZ",
                "CD",
                "DK",
                "DJ",
                "DM",
                "DO",
                "EC",
                "EG",
                "SV",
                "GQ",
                "ER",
                "EE",
                "SZ",
                "ET",
                "FK",
                "FO",
                "FJ",
                "FI",
                "FR",
                "GF",
                "PF",
                "GA",
                "GM",
                "GE",
                "DE",
                "GH",
                "GI",
                "GR",
                "GL",
                "GD",
                "GP",
                "GU",
                "GT",
                "GN",
                "GW",
                "GY",
                "HT",
                "HN",
                "HK",
                "HU",
                "IS",
                "ID",
                "IR",
                "IQ",
                "IE",
                "IL",
                "IT",
                "JM",
                "JP",
                "JO",
                "KZ",
                "KE",
                "KI",
                "KW",
                "KG",
                "LA",
                "LV",
                "LB",
                "LS",
                "LR",
                "LY",
                "LI",
                "LT",
                "LU",
                "MO",
                "MG",
                "MW",
                "MY",
                "MV",
                "ML",
                "MT",
                "MH",
                "MQ",
                "MR",
                "MU",
                "YT",
                "MX",
                "FM",
                "MD",
                "MC",
                "MN",
                "ME",
                "MS",
                "MA",
                "MZ",
                "MM",
                "NA",
                "NR",
                "NP",
                "NL",
                "NC",
                "NZ",
                "NI",
                "NE",
                "NG",
                "KP",
                "MK",
                "NO",
                "OM",
                "PK",
                "PW",
                "PS",
                "PA",
                "PG",
                "PY",
                "PE",
                "PH",
                "PL",
                "PT",
                "PR",
                "QA",
                "RE",
                "RO",
                "RU",
                "RW",
                "WS",
                "SM",
                "ST",
                "SA",
                "SN",
                "RS",
                "SC",
                "SL",
                "SG",
                "SX",
                "SK",
                "SI",
                "SB",
                "SO",
                "ZA",
                "KR",
                "SS",
                "ES",
                "LK",
                "KN",
                "LC",
                "VC",
                "SD",
                "SR",
                "SE",
                "CH",
                "SY",
                "TW",
                "TJ",
                "TZ",
                "TH",
                "TL",
                "TG",
                "TO",
                "TT",
                "TN",
                "TR",
                "TM",
                "TC",
                "TV",
                "UG",
                "UA",
                "AE",
                "GB",
                "US",
                "UY",
                "UZ",
                "VU",
                "VA",
                "VE",
                "VN",
                "WF",
                "YE",
                "ZM",
                "ZW"
              ],
              "enumTitles": [
                "All countries",
                "Afghanistan (AF)",
                "Albania (AL)",
                "Algeria (DZ)",
                "American Samoa (AS)",
                "Andorra (AD)",
                "Angola (AO)",
                "Anguilla (AI)",
                "Antigua And Barbuda (AG)",
                "Argentina (AR)",
                "Armenia (AM)",
                "Aruba (AW)",
                "Australia (AU)",
                "Austria (AT)",
                "Azerbaijan (AZ)",
                "Bahamas (BS)",
                "Bahrain (BH)",
                "Bangladesh (BD)",
                "Barbados (BB)",
                "Belarus (BY)",
                "Belgium (BE)",
                "Belize (BZ)",
                "Benin (BJ)",
                "Bermuda (BM)",
                "Bhutan (BT)",
                "Bolivia (BO)",
                "Bosnia and Herzegovina (BA)",
                "Botswana (BW)",
                "Brazil (BR)",
                "British Virgin Islands (VG)",
                "Brunei (BN)",
                "Bulgaria (BG)",
                "Burkina Faso (BF)",
                "Burundi (BI)",
                "Cambodia (KH)",
                "Cameroon (CM)",
                "Canada (CA)",
                "Cape Verde (CV)",
                "Cayman Islands (KY)",
                "Central African Republic (CF)",
                "Chad (TD)",
                "Chile (CL)",
                "China (CN)",
                "Colombia (CO)",
                "Comoros (KM)",
                "Congo Republic (CG)",
                "Cook Islands (CK)",
                "Costa Rica (CR)",
                "Cote d'Ivoire (CI)",
                "Croatia (HR)",
                "Cuba (CU)",
                "Curacao (CW)",
                "Cyprus (CY)",
                "Czech Republic (CZ)",
                "DR Congo (CD)",
                "Denmark (DK)",
                "Djibouti (DJ)",
                "Dominica (DM)",
                "Dominican Republic (DO)",
                "Ecuador (EC)",
                "Egypt (EG)",
                "El Salvador (SV)",
                "Equatorial Guinea (GQ)",
                "Eritrea (ER)",
                "Estonia (EE)",
                "Eswatini (SZ)",
                "Ethiopia (ET)",
                "Falkland Islands (FK)",
                "Faroe Islands (FO)",
                "Fiji (FJ)",
                "Finland (FI)",
                "France (FR)",
                "French Guiana (GF)",
                "French Polynesia (PF)",
                "Gabon (GA)",
                "Gambia (GM)",
                "Georgia (GE)",
                "Germany (DE)",
                "Ghana (GH)",
                "Gibraltar (GI)",
                "Greece (GR)",
                "Greenland (GL)",
                "Grenada (GD)",
                "Guadeloupe (GP)",
                "Guam (GU)",
                "Guatemala (GT)",
                "Guinea (GN)",
                "Guinea Bissau (GW)",
                "Guyana (GY)",
                "Haiti (HT)",
                "Honduras (HN)",
                "Hong Kong (HK)",
                "Hungary (HU)",
                "Iceland (IS)",
                "Indonesia (ID)",
                "Iran (IR)",
                "Iraq (IQ)",
                "Ireland (IE)",
                "Israel (IL)",
                "Italy (IT)",
                "Jamaica (JM)",
                "Japan (JP)",
                "Jordan (JO)",
                "Kazakhstan (KZ)",
                "Kenya (KE)",
                "Kiribati (KI)",
                "Kuwait (KW)",
                "Kyrgyzstan (KG)",
                "Laos (LA)",
                "Latvia (LV)",
                "Lebanon (LB)",
                "Lesotho (LS)",
                "Liberia (LR)",
                "Libya (LY)",
                "Liechtenstein (LI)",
                "Lithuania (LT)",
                "Luxembourg (LU)",
                "Macao (MO)",
                "Madagascar (MG)",
                "Malawi (MW)",
                "Malaysia (MY)",
                "Maldives (MV)",
                "Mali (ML)",
                "Malta (MT)",
                "Marshall Islands (MH)",
                "Martinique (MQ)",
                "Mauritania (MR)",
                "Mauritius (MU)",
                "Mayotte (YT)",
                "Mexico (MX)",
                "Micronesia (FM)",
                "Moldova (MD)",
                "Monaco (MC)",
                "Mongolia (MN)",
                "Montenegro (ME)",
                "Montserrat (MS)",
                "Morocco (MA)",
                "Mozambique (MZ)",
                "Myanmar (MM)",
                "Namibia (NA)",
                "Nauru (NR)",
                "Nepal (NP)",
                "Netherlands (NL)",
                "New Caledonia (NC)",
                "New Zealand (NZ)",
                "Nicaragua (NI)",
                "Niger (NE)",
                "Nigeria (NG)",
                "North Korea (KP)",
                "North Macedonia (MK)",
                "Norway (NO)",
                "Oman (OM)",
                "Pakistan (PK)",
                "Palau (PW)",
                "Palestine (PS)",
                "Panama (PA)",
                "Papua New Guinea (PG)",
                "Paraguay (PY)",
                "Peru (PE)",
                "Philippines (PH)",
                "Poland (PL)",
                "Portugal (PT)",
                "Puerto Rico (PR)",
                "Qatar (QA)",
                "Reunion (RE)",
                "Romania (RO)",
                "Russia (RU)",
                "Rwanda (RW)",
                "Samoa (WS)",
                "San Marino (SM)",
                "Sao Tome And Principe (ST)",
                "Saudi Arabia (SA)",
                "Senegal (SN)",
                "Serbia (RS)",
                "Seychelles (SC)",
                "Sierra Leone (SL)",
                "Singapore (SG)",
                "Sint Maarten (SX)",
                "Slovakia (SK)",
                "Slovenia (SI)",
                "Solomon Islands (SB)",
                "Somalia (SO)",
                "South Africa (ZA)",
                "South Korea (KR)",
                "South Sudan (SS)",
                "Spain (ES)",
                "Sri Lanka (LK)",
                "St Kitts And Nevis (KN)",
                "St Lucia (LC)",
                "St Vincent and the Grenadines (VC)",
                "Sudan (SD)",
                "Suriname (SR)",
                "Sweden (SE)",
                "Switzerland (CH)",
                "Syria (SY)",
                "Taiwan (TW)",
                "Tajikistan (TJ)",
                "Tanzania (TZ)",
                "Thailand (TH)",
                "Timor Leste (TL)",
                "Togo (TG)",
                "Tonga (TO)",
                "Trinidad and Tobago (TT)",
                "Tunisia (TN)",
                "Turkey (TR)",
                "Turkmenistan (TM)",
                "Turks And Caicos (TC)",
                "Tuvalu (TV)",
                "Uganda (UG)",
                "Ukraine (UA)",
                "United Arab Emirates (AE)",
                "United Kingdom (GB)",
                "United States (US)",
                "Uruguay (UY)",
                "Uzbekistan (UZ)",
                "Vanuatu (VU)",
                "Vatican City (VA)",
                "Venezuela (VE)",
                "Vietnam (VN)",
                "Wallis And Futuna (WF)",
                "Yemen (YE)",
                "Zambia (ZM)",
                "Zimbabwe (ZW)"
              ]
            }
          },
          "goalDescription": {
            "title": "What are you deciding? (optional, for the AI)",
            "type": "string",
            "description": "One sentence on your export plan, e.g. <i>we export ground chilli and want the fastest-growing market for next quarter</i>. The AI ranks each HS × country series against it and writes the trend note; the rules ignore it."
          },
          "notifyEmail": {
            "title": "E-mail me the new months (optional)",
            "type": "string",
            "description": "After every run with new export rows, the digest (top 10 with links) is e-mailed here — schedule it monthly and only the new month arrives. 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."
          },
          "minScore": {
            "title": "Minimum score (0–100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "The field that decides what you pay: export rows scoring below this are discarded and <b>not charged</b>. 0 = every row that passed the free filters (the score only orders them); 45 keeps the warm and hot markets (share of India's exports, growth, final figures).",
            "default": 0
          },
          "maxQualified": {
            "title": "Max qualified export rows to output",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on results — and the ceiling of what this Actor charges: at most this many export rows × $0.006 with AI on (× $0.002 with AI off) — worst case $3.00 with AI on at 500. The best markets are output first. Affects what you pay.",
            "default": 500
          },
          "enableAi": {
            "title": "AI assessment",
            "type": "boolean",
            "description": "One AI call per HS code × country series writes a trend note and a market-entry next step, from TradeStat's figures only. <b>On = $0.006 per qualified export row + AI tokens; off = $0.002</b> (rule-based flags, score and a rule-written trend note). AI runs on Apify Starter and up (Apify's model access: not measured on the platform yet) or free with your own Gemini key (measured 2026-11-24: 9 of 9 rows of a 9-row run) — otherwise you get the rules row at $0.002. The demo shows labelled sample verdicts.",
            "default": true
          },
          "fromMonth": {
            "title": "From month (YYYY-MM)",
            "type": "string",
            "description": "First month to deliver, e.g. <code>2025-09</code>. Empty = the last 13 published months (annual: the last 3 complete years). TradeStat holds January 2018 onwards. Read live on any Apify plan (no Store Actor — a plan that cannot run them loses nothing); in list mode it filters your own rows. Affects what you pay: each month is one row per HS code × country.",
            "default": ""
          },
          "toMonth": {
            "title": "To month (YYYY-MM)",
            "type": "string",
            "description": "Last month to deliver, e.g. <code>2026-09</code>. Empty = the newest month TradeStat has published (it updates mid-month). Same plan rule as the first month: any Apify plan live, list mode for rows you already have.",
            "default": ""
          },
          "frequency": {
            "title": "Monthly or calendar-year totals",
            "enum": [
              "monthly",
              "annual"
            ],
            "type": "string",
            "description": "<b>Monthly</b> = one row per month. <b>Annual</b> = TradeStat's own Jan–Dec total per year (never our sum of months), complete years only.",
            "default": "monthly"
          },
          "metrics": {
            "title": "Figures to read",
            "type": "array",
            "description": "Each figure is one form submit per month: US $ (published in US $ million, 2 decimals), ₹ (₹ crore — about 9× finer, converted to US $ at the month's rate) and quantity (tonnes for KGS / TON units). Fewer figures = a faster run.",
            "items": {
              "type": "string",
              "enum": [
                "valueUsd",
                "valueInr",
                "quantity"
              ],
              "enumTitles": [
                "US $ value",
                "₹ value (+ US $ from ₹)",
                "Quantity (+ tonnes, unit value)"
              ]
            },
            "default": [
              "valueUsd",
              "valueInr",
              "quantity"
            ]
          },
          "targetFlags": {
            "title": "Target flags (any of)",
            "type": "array",
            "description": "Only deliver export rows that have at least one of these flags, and rank those with more of them higher. Leave empty to keep everything. An API call passes the flag names from the README's flag table, e.g. <code>growing</code>; an unknown name stops the run at once with the list of valid ones.",
            "items": {
              "type": "string",
              "enum": [
                "below_rounding",
                "mixed_units",
                "country_unmapped",
                "hs_reallocated",
                "provisional",
                "growing",
                "falling"
              ],
              "enumTitles": [
                "US $ and ₹ views both print 0.00 — the month's value is below the published rounding",
                "The 8-digit codes under this HS code use different units, so no tonne figure",
                "TradeStat's country name is not in the ISO table — `country` is empty",
                "TradeStat marks this HS code * (dropped or re-allocated from April 2026)",
                "The month is still provisional — TradeStat may revise it",
                "Exports up 20 % or more on the same month a year earlier",
                "Exports down 20 % or more on the same month a year earlier"
              ]
            }
          },
          "suppressionList": {
            "title": "Exclude list",
            "type": "array",
            "description": "Row names, URLs or ids to never output (e.g. <code>090422 → U S A, 2026-09</code>). Suppressed rows are skipped before any processing and never charged.",
            "items": {
              "type": "string"
            }
          },
          "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 (Starter plan and up); tokens are billed to your Apify account at OpenRouter's rates. <b>My own key</b> — your OpenAI / Anthropic / Gemini / Groq key instead. With a free Gemini key (gemini-3.5-flash-lite) expect 5 AI-assessed series in a 9-row run (3 runs, 2026-11-22 to 2026-11-24) at ≈ 0.8–4.5 s per series (measured); a 50-series run needs a timeout of ≈ 405 s. Larger runs on a free key may hit its rate limit — then the borderline series are retried one by one and the rest keep their rule score; a paid Groq / Gemini key (billing on) assesses every export row.",
            "default": "apify"
          },
          "llmModel": {
            "title": "AI model",
            "type": "string",
            "description": "Leave empty for the default: <code>anthropic/claude-haiku-4.5</code> through Apify, <code>google:gemini-3.5-flash-lite</code> with your own key (a free Gemini key works as is). 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> for an Anthropic key."
          },
          "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 export rows 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 export rows as JSON. After every run with at least one new export row, 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>."
          },
          "dedupeAcrossRuns": {
            "title": "Never output the same export row twice",
            "type": "boolean",
            "description": "Remembers every export row you were charged for (HS × country × month × status, in a named key-value store on your account) and skips it in future runs — a provisional month that turns final comes again. Off = the full series every run, charged every run.",
            "default": true
          },
          "dedupeTtlDays": {
            "title": "Deliver an export row again after (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "How long a delivered export row stays remembered. 0 = never deliver or charge it again. A number of days lets an export row that comes back (a seasonal peak, a relisted item) reach you again after that many days — charged again as a new export row.",
            "default": 0
          },
          "historyDatasetName": {
            "title": "Keep a running log (dataset name)",
            "type": "string",
            "description": "Optional. Type a name (e.g. <code>india-export-stats-ai-seen-log</code>) and every run appends its new export rows 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 export rows come from?",
            "enum": [
              "live",
              "dataset",
              "list"
            ],
            "type": "string",
            "description": "<code>{}</code> over the API runs the free demo — nothing charged; any HS code or product word in <code>hsCodes</code> runs the live read of TradeStat. <b>live</b> submits TradeStat's public MEIDB form itself (no Store Actor, any plan); <b>dataset</b> / <b>list</b> score export rows you already have. The chosen mode with your own records always runs; only the untouched sample + HS codes or countries you typed switch to the live read.",
            "default": "live"
          },
          "autoSwitchToLive": {
            "title": "Typed search next to the sample starts the live search (API only)",
            "type": "boolean",
            "description": "API only — hidden on the form. On (default, Console runs only): search terms typed next to the untouched sample records start the live search (spend-capped; <code>OUTPUT.switchedToLive</code> names them). Off: the mode you send is the mode that runs — the sample stays the free demo and the status names the terms it did not search. Over the API the mode you send is always the mode that runs.",
            "default": true
          },
          "failOnSourceError": {
            "title": "Fail the run when no export row could be loaded",
            "type": "boolean",
            "description": "API only — hidden on the form. Off (default): a run that could not load any export row ends with <code>OUTPUT.ok: false</code>. On: it ends FAILED, so a schedule's failed-run alert fires.",
            "default": false
          },
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "Only for <b>dataset</b> mode. Pick the dataset so the Actor is granted read access to it."
          },
          "itemsList": {
            "title": "Export rows to process",
            "type": "array",
            "description": "Only for <b>list</b> mode. JSON array of export rows. Required on every row: <code>hsCode</code>, <code>period</code> (YYYY-MM or YYYY) and <code>country</code> (ISO-2) or <code>countryName</code>; optional: <code>valueUsd</code>, <code>valueInr</code>, <code>quantity</code>, <code>unit</code>, <code>yoyGrowthPct</code> and any field the README's <i>List-mode rows</i> table names. The prefilled rows are the free demo (real TradeStat figures for 090422, Sep 2025 and Sep 2026, marked <code>sample</code>)."
          },
          "maxDiscoveryChargeUsd": {
            "title": "Max fallback source spend, USD (API only)",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "API only — hidden on the form. The cap on what the fallback Store Actor may charge your account if TradeStat blocks the built-in read — $0.50 for an API call that leaves it out; a normal live read spends none of it.",
            "default": 0.5
          },
          "discoveryActorId": {
            "title": "Fallback source Actor (API only)",
            "type": "string",
            "description": "API only — hidden on the form. The Store Actor that fetches the form page only when TradeStat blocks the built-in read before any row (<code>OUTPUT.sourceStatus.ownSourceFallback</code> says so); it then runs on your Apify plan within the spend cap — a plan that cannot run Store Actors gets the explained stop instead, and rows you already have still work in list mode.",
            "default": "apify/website-content-crawler"
          },
          "discoveryInput": {
            "title": "Fallback source input (API only)",
            "type": "object",
            "description": "API only — hidden on the form. Extra input for that fallback Store Actor, merged over the form-page request the Actor builds; same plan rule — it runs only on a plan that runs Store Actors, and a plan that cannot still scores your own rows in list mode."
          },
          "maxToProcess": {
            "title": "Max export rows to score per run",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "API only — hidden on the form. Upper bound on how many export rows are scored in one run. Default = 3 × max qualified."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "Qualified export rows 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 export row the moment it is ready. Higher = one POST per N export rows.",
            "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 (source and search terms): rewording <code>goalDescription</code> keeps it, so a scheduled run never re-delivers what you already have, and another search starts its own list. Running it for several clients on one account, type one name per client.",
            "default": "india-export-stats-ai-seen"
          },
          "discoveryTimeoutSecs": {
            "title": "Source run timeout, seconds (API only)",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "API only — hidden on the form. How long the source Store Actor may run before its partial results are used — never more than 60 % of the run's time left, so the AI, the charges and the digest keep the rest. Raise it (and the run timeout) when the status says the source stopped early.",
            "default": 3600
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Slack incoming-webhook URL for the digest."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Discord channel webhook URL for the digest."
          },
          "teamsWebhookUrl": {
            "title": "Microsoft Teams webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Teams Workflows webhook URL for the digest."
          },
          "googleChatWebhookUrl": {
            "title": "Google Chat webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Google Chat space webhook URL for the digest."
          },
          "telegramUrl": {
            "title": "Telegram sendMessage link (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}