{
  "openapi": "3.0.1",
  "info": {
    "title": "Avi.kz Scraper — Kazakhstan Classifieds & Prices",
    "description": "Scrape avi.kz (avito.kz redirects there), a Kazakhstan classifieds board: listings by category, city or keyword with price in tenge, negotiable flag, category, city, posted date, photos and car specs. Optional full description, attributes and views. Item data only, no seller data. No login.",
    "version": "0.1",
    "x-build-id": "AA9hKsEYG7eyWuyEH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yugenox~avi-kz-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yugenox-avi-kz-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/yugenox~avi-kz-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yugenox-avi-kz-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/yugenox~avi-kz-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yugenox-avi-kz-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": {
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "avi.kz categories: a category key from the URL (\"elektronika\", \"transport/legkovye-avtomobili\", \"mobilnye-telefony\", \"noutbuki\", \"nedvizhimost/prodazha-nedvizhimosti/prodazha-kvartir\"), a name (\"Электроника\", \"Cars\", \"Недвижимость\", \"Работа\") or a category URL. Top categories: nedvizhimost, transport, elektronika, dom-i-sad, biznes, uslugi, rabota, moda-i-stil, hobbi-otdyh-i-sport, detskiy-mir, zhivotnye. Leave empty to search every category.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🔎 Search words",
            "type": "array",
            "description": "Words to search for, e.g. \"iphone\", \"Toyota Camry\", \"диван\". Each one is searched separately (in each category and city you choose).",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "📍 City or region",
            "type": "string",
            "description": "A city or region of Kazakhstan, in Russian or English: \"Алматы\", \"Astana\", \"Шымкент\", \"Караганда\", \"Актобе\", \"Atyrau\", \"Алматинская область\"… or an avi.kz city key such as \"ekibastuz\". Leave empty for all of Kazakhstan."
          },
          "locations": {
            "title": "📍 More cities or regions",
            "type": "array",
            "description": "Run the same search in several places, e.g. \"Astana\", \"Шымкент\".",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 avi.kz URLs",
            "type": "array",
            "description": "Optional: avi.kz (or avito.kz) category, city or search URLs — the sort and price filters in the URL are kept — and listing URLs (they end in -<number>.html).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max listings",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of listings for the whole run, shared fairly between your searches (a search that finds fewer leaves its share to the others). 0 = everything.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include full details",
            "type": "boolean",
            "description": "Also open every listing's own page for the full description, all photos, the attributes (condition; for cars: model, year, mileage, body, gearbox, colour…), the full category path, the view count, the date it was first added and the seller type (private or business). One extra request per listing.",
            "default": false
          },
          "sort": {
            "title": "↕️ Sort",
            "enum": [
              "new",
              "price-asc",
              "price-desc"
            ],
            "type": "string",
            "description": "Order of the results.",
            "default": "new"
          },
          "minPrice": {
            "title": "Min price (₸)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at least this much, in tenge."
          },
          "maxPrice": {
            "title": "Max price (₸)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at most this much, in tenge."
          },
          "withPhotosOnly": {
            "title": "With photos only",
            "type": "boolean",
            "description": "Only listings that have at least one photo.",
            "default": false
          },
          "localOnly": {
            "title": "Only listings located in the city",
            "type": "boolean",
            "description": "avi.kz also shows ads shipped from other cities (\"доставка из г.…\") in a city's results. Turn this on to keep only ads from the city you chose. Has no effect for regions or all of Kazakhstan.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Listing pages opened at the same time when \"Include full details\" is on. The default is gentle on the site and fast enough.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (datacenter) is the default and comes with every Apify plan. If avi.kz refuses datacenter IPs, the run switches to residential proxies when your account has them.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}