{
  "openapi": "3.0.1",
  "info": {
    "title": "TED, SAM.gov & Grants Monitor | Bid Alerts & Award Watch",
    "description": "Public-sector tender monitoring for teams that need TED, SAM.gov, and Simpler.Grants.gov bid alerts, award watch, rebid signals, and recurring summaries without maintaining scrapers.",
    "version": "0.1",
    "x-build-id": "UDo8tSneTaGWY6Cxh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~procurement-intel-actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-procurement-intel-actor",
        "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/taroyamada~procurement-intel-actor/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-procurement-intel-actor",
        "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/taroyamada~procurement-intel-actor/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-procurement-intel-actor",
        "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": {
          "jurisdictions": {
            "title": "Free / starter vs paid expansion: Jurisdictions (comma-separated)",
            "type": "string",
            "description": "Keep eu for the free / starter TED-only first run. Add grants when you want a richer source mix and recurring grant deltas, then add us once you have a SAM.gov key for the paid US federal lane. If us is present without a key, the actor warns and skips that source rather than hard-failing.",
            "default": "eu"
          },
          "keywords": {
            "title": "Free / starter: Search terms / buyer intent (comma-separated)",
            "type": "string",
            "description": "Core first-run themes sent to TED notice titles, SAM.gov opportunity titles, and Simpler.Grants.gov queries. Start narrow enough that the TED-only queue feels useful before you pay for broader source coverage or delivery workflows.",
            "default": "digital services,cybersecurity,framework"
          },
          "watchTerms": {
            "title": "Paid expansion: Watch terms (comma-separated)",
            "type": "string",
            "description": "Add after the free / starter run works. Highlights buyers, incumbents, frameworks, or competitor terms in summaries and notice signals without changing upstream source queries."
          },
          "cpvCodes": {
            "title": "Free / starter: TED CPV codes (comma-separated)",
            "type": "string",
            "description": "Optional TED filters for the TED-only starter lane. Use them to keep the first public-sector tender queue tight before adding broader coverage.",
            "default": "72000000,72220000"
          },
          "naicsCodes": {
            "title": "Paid expansion: NAICS codes (comma-separated)",
            "type": "string",
            "description": "Optional SAM.gov NAICS filters for the paid US federal expansion path.",
            "default": "541512,541519"
          },
          "tedFields": {
            "title": "Free / starter: TED fields (comma-separated)",
            "type": "string",
            "description": "Requested TED API fields used to explain buyer, deadline, value, and notice type in the first-run output.",
            "default": "notice-identifier,notice-title,publication-date,deadline,buyer-name,buyer-country,estimated-value-proc,classification-cpv,notice-type"
          },
          "minValue": {
            "title": "Free / starter: Minimum estimated value",
            "minimum": 0,
            "type": "number",
            "description": "Hide smaller notices when an estimated value is present so the TED-first starter run focuses on meaningful tenders or grants.",
            "default": 100000
          },
          "daysAhead": {
            "title": "Free / starter: Deadline window (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Keep notices closing within this window so the starter dataset reads like a current bid-alert queue.",
            "default": 30
          },
          "maxItemsPerSource": {
            "title": "Free / starter: Max items per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound fetched per source request while you validate the smallest useful queue. Increase it later for paid expansion runs that cover more themes, jurisdictions, or watch overlays.",
            "default": 100
          },
          "delivery": {
            "title": "Delivery mode (free / starter dataset vs paid routing)",
            "enum": [
              "dataset",
              "webhook",
              "email"
            ],
            "type": "string",
            "description": "Start with dataset for review-first runs. The paid / ops path is webhook once the procurement queue is useful enough to route automatically.",
            "default": "dataset"
          },
          "webhookUrl": {
            "title": "Paid expansion: Webhook URL",
            "type": "string",
            "description": "Required only when delivery is webhook. Leave it empty for the free / starter dataset lane."
          },
          "email": {
            "title": "Future / placeholder: Email target",
            "type": "string",
            "description": "Optional metadata only; email sending is not implemented in the MVP."
          },
          "includeAwarded": {
            "title": "Paid expansion: Include awarded / closed notices",
            "type": "boolean",
            "description": "Turn this on once you want award watch, incumbent movement, or rebid monitoring rather than a free / starter open-opportunity queue.",
            "default": false
          },
          "samApiKey": {
            "title": "Paid expansion: SAM API key",
            "type": "string",
            "description": "SAM.gov API key from Account Details. Needed for the paid US federal expansion path. If it is missing, the actor warns and skips the US lane instead of hard-failing the whole run."
          },
          "samApiUrl": {
            "title": "Paid expansion: SAM API URL",
            "type": "string",
            "description": "SAM opportunities endpoint used for the US federal expansion lane.",
            "default": "https://api.sam.gov/opportunities/v2/search"
          },
          "tedApiUrl": {
            "title": "Free / starter: TED API URL",
            "type": "string",
            "description": "TED notices search endpoint for the lowest-friction first run.",
            "default": "https://api.ted.europa.eu/v3/notices/search"
          },
          "grantsApiKey": {
            "title": "Paid expansion: Simpler.Grants.gov API key",
            "type": "string",
            "description": "Optional X-API-Key header for Simpler.Grants.gov requests. Recommended when you expand into grants coverage, but not required for the free / starter TED-only lane."
          },
          "grantsApiUrl": {
            "title": "Paid expansion: Simpler.Grants.gov API URL",
            "type": "string",
            "description": "Simpler.Grants.gov opportunities search endpoint for the grants expansion path.",
            "default": "https://api.simpler.grants.gov/v1/opportunities/search"
          },
          "grantsApplicantTypes": {
            "title": "Paid expansion: Grants applicant types (comma-separated)",
            "type": "string",
            "description": "Optional Simpler.Grants.gov applicant_type filters for the grants lane."
          },
          "grantsFundingInstruments": {
            "title": "Paid expansion: Grants funding instruments (comma-separated)",
            "type": "string",
            "description": "Optional Simpler.Grants.gov funding_instrument filters for the grants expansion path."
          },
          "grantsOpportunityStatuses": {
            "title": "Paid expansion: Grants statuses (comma-separated)",
            "type": "string",
            "description": "Optional Simpler.Grants.gov opportunity_status filters such as posted or forecasted.",
            "default": "posted,forecasted"
          },
          "grantsAlertClosingSoonDays": {
            "title": "Paid recurring: Grants closing-soon threshold (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "For recurring grants runs, emit a closing_soon alert when a tracked grant crosses inside this deadline window.",
            "default": 7
          },
          "grantsAlertStateStoreName": {
            "title": "Paid recurring: Grants alert state store name",
            "type": "string",
            "description": "Named Apify key-value store used to persist grants snapshots across recurring runs so deadline and status alerts stay comparable.",
            "default": "procurement-intel-grants-state"
          },
          "grantsAlertStateKey": {
            "title": "Paid recurring: Grants alert state key",
            "type": "string",
            "description": "Optional override for the grants snapshot key. Leave blank to auto-derive a stable key from grants filters and keywords."
          },
          "samFixturePath": {
            "title": "Testing: SAM fixture path",
            "type": "string",
            "description": "Local JSON fixture path for offline SAM verification."
          },
          "tedFixturePath": {
            "title": "Testing: TED fixture path",
            "type": "string",
            "description": "Local JSON fixture path for offline TED verification."
          },
          "grantsFixturePath": {
            "title": "Testing: Grants fixture path",
            "type": "string",
            "description": "Local JSON fixture path for offline Simpler.Grants.gov verification."
          },
          "nowIso": {
            "title": "Testing: Override current time (ISO)",
            "type": "string",
            "description": "Optional deterministic run time override for fixtures and repeatable validation."
          },
          "dryRun": {
            "title": "Testing: Dry run",
            "type": "boolean",
            "description": "Skip webhook or email delivery side effects while validating either starter or paid configurations.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}