{
  "openapi": "3.0.1",
  "info": {
    "title": "Government Tenders Scraper | Data API: SAM.gov, TED, $2/1K",
    "description": "Scrape government tenders data from SAM.gov (USA), CanadaBuys and TED Europa (EU) in one run at $2.00 per 1,000, cheaper than the leading tools. Official open data, no login or key: buyer, country, NAICS/UNSPSC/CPV, value, dates, status, link.",
    "version": "0.4",
    "x-build-id": "Rwm2Nk9kuLWXhkhT4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/aurelix~government-tenders-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-aurelix-government-tenders-scraper",
        "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/aurelix~government-tenders-scraper/runs": {
      "post": {
        "operationId": "runs-sync-aurelix-government-tenders-scraper",
        "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/aurelix~government-tenders-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-aurelix-government-tenders-scraper",
        "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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which official sources to read: 'sam.gov' (US federal contract opportunities, public extract), 'canadabuys' (Government of Canada tender notices, open data), 'ted' (EU Tenders Electronic Daily). Example: ['sam.gov', 'canadabuys'].",
            "items": {
              "type": "string",
              "enum": [
                "sam.gov",
                "canadabuys",
                "ted"
              ],
              "enumTitles": [
                "SAM.gov (US federal)",
                "CanadaBuys (Canada federal)",
                "TED (European Union)"
              ]
            },
            "default": [
              "sam.gov",
              "canadabuys",
              "ted"
            ]
          },
          "daysBack": {
            "title": "Published in the last N days",
            "minimum": 0,
            "maximum": 7,
            "type": "integer",
            "description": "Keep notices published on or after today minus this many days (UTC). Example: 1 for a daily feed, 7 for a weekly one. At most 7; use incremental mode on a schedule for a longer feed.",
            "default": 3
          },
          "openOnly": {
            "title": "Open tenders only",
            "type": "boolean",
            "description": "Keep only notices still open for bids (closing date not passed; award notices and SAM.gov justifications and special notices excluded). Turn off to include awards and closed notices.",
            "default": true
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep only notices whose title or description contains at least one of these words (case-insensitive), e.g. ['software', 'cybersecurity']. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries (ISO codes)",
            "type": "array",
            "description": "Keep only notices from buyers in these countries, as two-letter ISO codes, e.g. ['US', 'CA', 'DE', 'IE']. SAM.gov uses the place of performance. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS code prefixes (SAM.gov)",
            "type": "array",
            "description": "Keep notices whose NAICS code starts with one of these, e.g. ['5415', '236220']. When any code filter is set, a notice passes if it matches any of the NAICS, UNSPSC or CPV prefixes, and sources that publish none of the given code systems are skipped.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "unspscCodes": {
            "title": "UNSPSC code prefixes (CanadaBuys)",
            "type": "array",
            "description": "Keep notices whose UNSPSC code starts with one of these, e.g. ['4321', '8111'].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV code prefixes (TED)",
            "type": "array",
            "description": "Keep notices whose CPV code starts with one of these digits, e.g. ['72', '48000000'].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSource": {
            "title": "Max results per source",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit of results per source after filters, newest first; the run status says when it was hit. TED alone publishes about 3,500 notices a working day. 0 = no limit.",
            "default": 500
          },
          "includeDescription": {
            "title": "Include description",
            "type": "boolean",
            "description": "Include the notice description text (SAM.gov, CanadaBuys, TED). Turn off for smaller output.",
            "default": true
          },
          "incremental": {
            "title": "Only new tenders since last run",
            "type": "boolean",
            "description": "Return only notices not returned by a previous run with the same sources and filters. Use with a daily schedule for a new-tenders feed.",
            "default": false
          },
          "stateKey": {
            "title": "Incremental state name (optional)",
            "type": "string",
            "description": "Name for the 'new since last run' memory. Leave empty to derive it from the sources and filters; set it to keep separate feeds apart, e.g. 'it-services-feed'."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL (optional)",
            "type": "string",
            "description": "After each run, post a short digest to Slack: how many results were saved (new ones only when 'Only new tenders since last run' is on) and the top 10 with links, e.g. https://hooks.slack.com/services/T000/B000/XXXX. Nothing is posted when the run saved nothing. Leave empty to skip."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "After each run, POST the same digest as JSON (actor, newOnly, count, items = top 10 results, runUrl, text) to any URL, e.g. a Zapier, Make or n8n webhook. Nothing is sent when the run saved nothing. Leave empty to skip."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}