{
  "openapi": "3.0.1",
  "info": {
    "title": "Procurement Intelligence Copilot",
    "description": "Find and qualify public tenders from SAM.gov, UK Contracts Finder, and TED. This Actor filters noise, scores fit, and uses AI review to surface the procurement opportunities actually worth pursuing.",
    "version": "0.0",
    "x-build-id": "uiJwvxaY88ZPUGrJQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/marielise.dev~procurement-intelligence-copilot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-marielise.dev-procurement-intelligence-copilot",
        "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/marielise.dev~procurement-intelligence-copilot/runs": {
      "post": {
        "operationId": "runs-sync-marielise.dev-procurement-intelligence-copilot",
        "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/marielise.dev~procurement-intelligence-copilot/run-sync": {
      "post": {
        "operationId": "run-sync-marielise.dev-procurement-intelligence-copilot",
        "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": {
          "query": {
            "title": "Search Keywords",
            "type": "string",
            "description": "Keywords to search for in opportunity titles and descriptions. If left blank, the Actor uses your company profile keywords."
          },
          "countries": {
            "title": "Sources to Search",
            "type": "array",
            "description": "Which procurement portals to search.",
            "items": {
              "type": "string",
              "enum": [
                "us",
                "uk",
                "eu"
              ],
              "enumTitles": [
                "United States (SAM.gov)",
                "United Kingdom (Contracts Finder)",
                "European Union (TED)"
              ]
            },
            "default": [
              "us",
              "uk",
              "eu"
            ]
          },
          "postedWithinDays": {
            "title": "Posted within (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only include opportunities posted in the last N days.",
            "default": 30
          },
          "deadlineWithinDays": {
            "title": "Deadline within (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only include opportunities whose deadlines are within N days, when a deadline is available.",
            "default": 60
          },
          "status": {
            "title": "Opportunity Status",
            "type": "array",
            "description": "Statuses to include.",
            "items": {
              "type": "string",
              "enum": [
                "open",
                "forecasted",
                "closed",
                "awarded"
              ]
            },
            "default": [
              "open"
            ]
          },
          "valueMin": {
            "title": "Minimum Contract Value (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum estimated contract value."
          },
          "valueMax": {
            "title": "Maximum Contract Value (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Maximum estimated contract value."
          },
          "maxItemsPerSource": {
            "title": "Max items per source",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "Upper bound per procurement portal before results are merged.",
            "default": 30
          },
          "maxItems": {
            "title": "Max opportunities to return",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum number of scored opportunities to return after ranking and filtering.",
            "default": 90
          },
          "onlyQualified": {
            "title": "Only return qualified opportunities",
            "type": "boolean",
            "description": "If enabled, only opportunities with fit score >= minimum fit score are returned.",
            "default": false
          },
          "minFitScore": {
            "title": "Minimum fit score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Qualification threshold used when 'Only return qualified opportunities' is enabled.",
            "default": 60
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "fit_desc",
              "deadline_asc",
              "posted_desc",
              "value_desc"
            ],
            "type": "string",
            "description": "How ranked opportunities should be ordered.",
            "default": "fit_desc"
          },
          "includeAnalytics": {
            "title": "Include analytics",
            "type": "boolean",
            "description": "Generate qualification analytics and management summary.",
            "default": true
          },
          "outputFormat": {
            "title": "Dataset output format",
            "enum": [
              "full",
              "summary_only",
              "opportunities_only"
            ],
            "type": "string",
            "description": "Controls what goes into the default dataset.",
            "default": "full"
          },
          "useAiReview": {
            "title": "Use AI relevance review",
            "type": "boolean",
            "description": "Use OpenAI to re-rank the strongest candidates after rule-based filtering. Requires OPENAI_API_KEY in the Actor environment.",
            "default": false
          },
          "aiReviewModel": {
            "title": "AI model",
            "type": "string",
            "description": "OpenAI model used for semantic procurement review.",
            "default": "gpt-5-mini"
          },
          "aiReviewMaxItems": {
            "title": "Max AI-reviewed opportunities",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only the top rule-scored opportunities up to this limit are sent for AI review.",
            "default": 25
          },
          "aiReviewMinRuleScore": {
            "title": "Min rule score for AI review",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only opportunities with at least this rule-based score are eligible for AI review.",
            "default": 40
          },
          "companyProfile": {
            "title": "Company Profile",
            "type": "object",
            "description": "Business context used to score bid fit.",
            "properties": {
              "companyName": {
                "title": "Company name",
                "type": "string",
                "description": "Your company or business unit name.",
                "editor": "textfield"
              },
              "description": {
                "title": "Company description",
                "type": "string",
                "description": "Short description of what your company does.",
                "editor": "textarea"
              },
              "keywords": {
                "title": "Core keywords",
                "type": "array",
                "description": "Words or phrases that indicate a relevant opportunity.",
                "editor": "stringList",
                "default": [],
                "items": {
                  "type": "string"
                }
              },
              "excludedKeywords": {
                "title": "Excluded keywords",
                "type": "array",
                "description": "Words or phrases that should count against fit.",
                "editor": "stringList",
                "default": [],
                "items": {
                  "type": "string"
                }
              },
              "naicsCodes": {
                "title": "Target NAICS codes",
                "type": "array",
                "description": "US industry codes your business wants to match.",
                "editor": "stringList",
                "default": [],
                "items": {
                  "type": "string"
                }
              },
              "cpvCodes": {
                "title": "Target CPV codes",
                "type": "array",
                "description": "EU procurement codes your business wants to match.",
                "editor": "stringList",
                "default": [],
                "items": {
                  "type": "string"
                }
              },
              "preferredCountries": {
                "title": "Preferred countries",
                "type": "array",
                "description": "Preferred procurement geographies.",
                "editor": "select",
                "default": [],
                "items": {
                  "type": "string",
                  "enum": [
                    "us",
                    "uk",
                    "eu"
                  ],
                  "enumTitles": [
                    "United States",
                    "United Kingdom",
                    "European Union"
                  ]
                }
              },
              "minContractValueUsd": {
                "title": "Minimum target value (USD)",
                "type": "number",
                "description": "Smallest contract size your team wants to pursue.",
                "editor": "number",
                "minimum": 0
              },
              "maxContractValueUsd": {
                "title": "Maximum target value (USD)",
                "type": "number",
                "description": "Largest contract size your team wants to pursue.",
                "editor": "number",
                "minimum": 0
              },
              "setAsideEligibility": {
                "title": "Set-aside eligibility",
                "type": "array",
                "description": "US set-aside programs your company is eligible for.",
                "editor": "select",
                "default": [],
                "items": {
                  "type": "string",
                  "enum": [
                    "small business",
                    "8a",
                    "hubzone",
                    "sdvosb",
                    "wosb",
                    "veteran"
                  ]
                }
              },
              "targetAgencies": {
                "title": "Target agencies",
                "type": "array",
                "description": "Agency names you prefer to sell to.",
                "editor": "stringList",
                "default": [],
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration for source portals that need browser-based scraping.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}