{
  "openapi": "3.0.1",
  "info": {
    "title": "Public Tenders and Procurement Data API: Tendios",
    "description": "Public tenders and government procurement data API for Spain and the EU: search tenders by CPV, location, status, budget and dates, plus documents, bidders, buyer contacts, awards, alert results and CPV codes, through the Tendios API. Bring your own key.",
    "version": "0.1",
    "x-build-id": "dakgass5CWkOYdehC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~public-tenders-procurement-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-public-tenders-procurement-data-api",
        "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/nabeelbaghoor~public-tenders-procurement-data-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-public-tenders-procurement-data-api",
        "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/nabeelbaghoor~public-tenders-procurement-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-public-tenders-procurement-data-api",
        "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": {
          "mode": {
            "title": "What to read",
            "enum": [
              "searchTenders",
              "alertResults",
              "tenderDetails",
              "tenderDocuments",
              "tenderClarifications",
              "tenderBidders",
              "tenderContacts",
              "organizationProfile",
              "organizationAwards",
              "marketAwards",
              "alerts",
              "cpvCodes"
            ],
            "type": "string",
            "description": "Each mode calls one documented read endpoint of the Tendios API. Search and market awards take filters; tender modes take tender IDs; organization modes take organization IDs or slugs; alert results take alert IDs; the CPV mode takes CPV codes. Nothing is ever written to your Tendios account.",
            "default": "searchTenders"
          },
          "apiKey": {
            "title": "Tendios API key",
            "type": "string",
            "description": "Your own Tendios API key (starts with tend_). An account admin creates it in Tendios Bid under Settings, Subscription, Integrations; API access is part of Enterprise plans. A read-only key is enough. Leave empty to use the DATA_API_KEY secret."
          },
          "searchText": {
            "title": "Keywords",
            "type": "string",
            "description": "Tender search and alert results. Free-text query, such as limpieza de edificios or software development."
          },
          "statuses": {
            "title": "Tender status",
            "type": "array",
            "description": "Tender search. Publicada is open for bids, Adjudicada awarded, Formalizada contract signed. Leave empty for every status.",
            "items": {
              "type": "string",
              "enum": [
                "Creada",
                "Anuncio Previo",
                "Publicada",
                "Evaluación Previa",
                "Evaluación",
                "Adjudicada",
                "Parcialmente Adjudicada",
                "Resolución Provisional",
                "Resuelta",
                "No Resuelta",
                "Finalizada",
                "Formalizada",
                "Parcialmente Resuelta",
                "Desistida",
                "Cerrada",
                "Anulada",
                "No definido",
                "Desierta"
              ]
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Tender search: only tenders under these CPV codes. CPV code mode: the codes to describe, such as 72000000 or 45000000-7.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Tender search. country/<ISO-2> or town/<name>, such as country/ES or town/Barcelona. A bare two-letter code is read as a country, anything else as a town.",
            "items": {
              "type": "string"
            }
          },
          "procedures": {
            "title": "Procedure types",
            "type": "array",
            "description": "Tender search. Procedure values as Tendios returns them in the procedure field, such as Abierto, Abierto simplificado or Negociado sin publicidad.",
            "items": {
              "type": "string"
            }
          },
          "contractTypes": {
            "title": "Contract types",
            "type": "array",
            "description": "Tender search. Contract type values as Tendios returns them, such as Servicios, Suministros or Obras.",
            "items": {
              "type": "string"
            }
          },
          "onlyWithinDeadline": {
            "title": "Only open for bids",
            "type": "boolean",
            "description": "Tender search. Only tenders still within their submission deadline.",
            "default": false
          },
          "minorContractsOnly": {
            "title": "Only minor contracts",
            "type": "boolean",
            "description": "Tender search. Only minor contracts (contratos menores).",
            "default": false
          },
          "withLotsOnly": {
            "title": "Only tenders with lots",
            "type": "boolean",
            "description": "Tender search. Only tenders split into lots.",
            "default": false
          },
          "minBudget": {
            "title": "Minimum budget",
            "minimum": 0,
            "type": "integer",
            "description": "Tender search. Minimum budget without taxes, in the tender currency."
          },
          "maxBudget": {
            "title": "Maximum budget",
            "minimum": 0,
            "type": "integer",
            "description": "Tender search. Maximum budget without taxes, in the tender currency."
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Tender search, alert results and market awards. Earliest publication date, YYYY-MM-DD."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Tender search, alert results and market awards. Latest publication date, YYYY-MM-DD."
          },
          "deadlineFrom": {
            "title": "Deadline from",
            "type": "string",
            "description": "Tender search. Earliest submission deadline, YYYY-MM-DD."
          },
          "deadlineTo": {
            "title": "Deadline to",
            "type": "string",
            "description": "Tender search. Latest submission deadline, YYYY-MM-DD."
          },
          "awardedFrom": {
            "title": "Awarded from",
            "type": "string",
            "description": "Tender search and market awards. Earliest award date, YYYY-MM-DD."
          },
          "awardedTo": {
            "title": "Awarded to",
            "type": "string",
            "description": "Tender search and market awards. Latest award date, YYYY-MM-DD."
          },
          "sort": {
            "title": "Sort tenders by",
            "enum": [
              "by-published-date",
              "by-relevance",
              "by-update-date",
              "by-due-date",
              "by-budget",
              "by-prorated-budget",
              "by-expiration-date",
              "by-awarding-date",
              "by-last-significant-change"
            ],
            "type": "string",
            "description": "Tender search and alert results. The order tenders come back in.",
            "default": "by-published-date"
          },
          "sortDescending": {
            "title": "Newest or largest first",
            "type": "boolean",
            "description": "Sort descending (the default). Turn off for oldest or smallest first. Also sets the direction of the alert list and market awards.",
            "default": true
          },
          "extraFilters": {
            "title": "Extra search filters",
            "type": "object",
            "description": "Tender search. Any other documented Tendios search field as JSON, such as {\"minAwardAmount\": 100000, \"maxDiscountRate\": 20, \"minExpirationDate\": \"2027-01-01T00:00:00Z\"}. Undocumented fields are refused."
          },
          "tenderIds": {
            "title": "Tender IDs",
            "type": "array",
            "description": "Tender detail, documents, clarifications, bidders and contacts. Tendios tender IDs, the tenderId column of a search row.",
            "items": {
              "type": "string"
            }
          },
          "minDir3Relevance": {
            "title": "Minimum DIR3 relevance",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Tender contacts. Keep DIR3-only emails whose procurement relevance is above this percentage (Tendios default 30). Emails from other sources are always kept."
          },
          "organizationIds": {
            "title": "Organization IDs or slugs",
            "type": "array",
            "description": "Organization profile and award statistics. A buyer or winner ID from a tender row, or a slug such as altia-consultores-sa. IDs are safer: slugs are not unique.",
            "items": {
              "type": "string"
            }
          },
          "alertIds": {
            "title": "Alert IDs",
            "type": "array",
            "description": "Alert results. IDs of saved alerts on your Tendios account, from the alert list mode.",
            "items": {
              "type": "string"
            }
          },
          "alertTitle": {
            "title": "Alert title contains",
            "type": "string",
            "description": "Alert list. Only alerts whose title matches this text."
          },
          "alertState": {
            "title": "Alert state",
            "enum": [
              "any",
              "active",
              "archived"
            ],
            "type": "string",
            "description": "Alert list. Filter archived or non-archived alerts.",
            "default": "any"
          },
          "alertSort": {
            "title": "Sort alerts by",
            "enum": [
              "by-update-date",
              "by-name",
              "by-creation-date",
              "by-last-notified-date",
              "by-last-notification-sent-date",
              "by-status"
            ],
            "type": "string",
            "description": "Alert list. The order alerts come back in.",
            "default": "by-update-date"
          },
          "supplierFamilyId": {
            "title": "Supplier family ID",
            "type": "string",
            "description": "Market awards. A curated Tendios supplier family (a company and its related entities). Tendios support shares these IDs."
          },
          "buyerPerimeterId": {
            "title": "Buyer perimeter ID",
            "type": "string",
            "description": "Market awards. A curated Tendios buyer perimeter. Cannot be combined with a buyer organization ID."
          },
          "buyerOrganizationId": {
            "title": "Buyer organization ID",
            "type": "string",
            "description": "Market awards. The Tendios organization ID of a buyer without a curated perimeter."
          },
          "includeBuyerDependents": {
            "title": "Include dependent bodies",
            "type": "boolean",
            "description": "Market awards with a buyer organization ID. Also count its dependent bodies.",
            "default": true
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Market awards. Two-letter tender-location country code, such as ES, limited to the countries your account can access."
          },
          "includeModifications": {
            "title": "Include contract modifications",
            "type": "boolean",
            "description": "Market awards. Also include contract modifications.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many rows across every lookup. Pages of up to 100 are read as needed.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Pacing ceiling. Tendios allows 30 requests a minute per endpoint by default, shared by every key of the account.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}