{
  "openapi": "3.0.1",
  "info": {
    "title": "Turkey Public Tenders Scraper (İhale)",
    "description": "Search Turkish public tender notices (ihale ilanları) by keyword, province, tender type, authority and date. Returns the IKN number, buyer, dates and notice text. Fast HTTP scraper, no browser.",
    "version": "0.0",
    "x-build-id": "3Pn0BecABHjT1sJFp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dodoflix~ihale-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dodoflix-ihale-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/dodoflix~ihale-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dodoflix-ihale-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/dodoflix~ihale-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dodoflix-ihale-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to look for, in Turkish or English letters (for example akaryakıt, yazılım, ambulans). Each keyword is searched on its own and the results are merged without duplicates.",
            "items": {
              "type": "string"
            }
          },
          "keywordScope": {
            "title": "Search keywords in",
            "enum": [
              "all",
              "title"
            ],
            "type": "string",
            "description": "Where the keywords are looked up: the title only gives fewer, more precise results than the whole notice text.",
            "default": "all"
          },
          "ikn": {
            "title": "IKN numbers",
            "type": "array",
            "description": "Look up tenders by their registry number (İhale Kayıt Numarası), written like 2026/2243759. A tender can have several notices: the original, corrections and a cancellation.",
            "items": {
              "type": "string"
            }
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Province of the buying authority: the Turkish name (İstanbul, Ankara, Şanlıurfa) or the plate number (34, 06). Leave empty for all of Turkey.",
            "items": {
              "type": "string"
            }
          },
          "tenderKinds": {
            "title": "Tender kinds",
            "type": "array",
            "description": "Only these kinds of notice. Leave empty for all of them.",
            "items": {
              "type": "string",
              "enum": [
                "goods",
                "services",
                "works",
                "lease",
                "sale",
                "funded",
                "correction",
                "cancellation"
              ],
              "enumTitles": [
                "Goods (mal alımı)",
                "Services (hizmet alımı)",
                "Works and construction (yapım)",
                "Lease and operating rights (kiralama, işletme hakkı)",
                "Sales (satış, trampa)",
                "EU, World Bank and development agency funded",
                "Corrections (zeyilname)",
                "Cancellations (iptal)"
              ]
            }
          },
          "authorities": {
            "title": "Authorities",
            "type": "array",
            "description": "Name of the buying authority or part of it (for example Talas Belediye, Milli Savunma, Devlet Hastanesi), or its code (M006096). Every authority whose name contains the text is included, up to 25 per entry. Each authority is searched separately.",
            "items": {
              "type": "string"
            }
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Only notices published on or after this date (YYYY-MM-DD). The site lists notices from roughly the last month."
          },
          "publishedTo": {
            "title": "Published until",
            "type": "string",
            "description": "Only notices published on or before this date (YYYY-MM-DD)."
          },
          "tenderFrom": {
            "title": "Tender date from",
            "type": "string",
            "description": "Only tenders whose bid opening is on or after this date (YYYY-MM-DD). Use today's date to skip tenders that are already closed."
          },
          "tenderTo": {
            "title": "Tender date until",
            "type": "string",
            "description": "Only tenders whose bid opening is on or before this date (YYYY-MM-DD)."
          },
          "includeDetails": {
            "title": "Include notice details",
            "type": "boolean",
            "description": "Open every notice to add the exact tender time, the authority code and address, document links and the full notice text. Turn it off for a faster, list-only run.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new notices",
            "type": "boolean",
            "description": "Skip notices returned by earlier runs with the same state key. Use it for a daily alert on a schedule.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the list of notices already seen, used by 'Only new notices'. Give each saved search its own key.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max items in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many tenders. Leave empty for no limit."
          },
          "maxItemsPerSearch": {
            "title": "Max items per keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Stop each keyword (or IKN) search after this many tenders.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Requests in flight at the same time. The site answers a few at a time without errors, so keep this low.",
            "default": 3
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 1,
            "type": "integer",
            "description": "Request speed. One request lists 20 notices and one more is needed per notice when details are on.",
            "default": 300
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The site answers plain requests from datacenter IPs, so no proxy is needed by default. Choose Apify Proxy with country TR only if you see 403 errors.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}