{
  "openapi": "3.0.1",
  "info": {
    "title": "Avito Scraper: Listings and Cars from Avito.ru",
    "description": "Scrape Avito.ru listings from any search or category link, cars included: title, price in rubles, city, address, seller, photos and date, plus make, model, year, mileage, engine and gearbox for cars. Region, category and price filters. Up to 5,000 per search. No login.",
    "version": "0.1",
    "x-build-id": "1OClkQSLOCdMES5qa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~avito-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-avito-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/themineworks~avito-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-avito-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/themineworks~avito-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-avito-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": {
          "startUrls": {
            "title": "Avito search or category links",
            "type": "array",
            "description": "Any avito.ru page that lists results, one per line: a category (https://www.avito.ru/moskva/avtomobili), a filtered search you set up on avito.ru and copied from the address bar (https://www.avito.ru/moskva/avtomobili/toyota/camry), or a word search (https://www.avito.ru/all?q=iphone+15). All categories work: cars, real estate, electronics, jobs, services and the rest. Single listing pages are not read in this version. Up to 200 links per run.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Search words (optional)",
            "type": "string",
            "description": "Words to search for, as you would type them on avito.ru, e.g. iphone 15 or Toyota Camry. Used with region and category below. Runs in addition to the links above."
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "The region or city part of an Avito link: all (whole of Russia), moskva, sankt-peterburg, moskovskaya_oblast, ekaterinburg, novosibirsk, kazan and so on. Open the city on avito.ru and copy the word after avito.ru/. Used with search words or category.",
            "default": "all"
          },
          "category": {
            "title": "Category (optional)",
            "type": "string",
            "description": "The category part of an Avito link, e.g. avtomobili (cars), kvartiry (flats), telefony (phones), noutbuki (laptops), velosipedy (bicycles), vakansii (jobs). Leave empty to search every category."
          },
          "maxItems": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most listings to return for each link and for the search words, 1 to 5,000. A results page has 50 listings. Avito lets you page through 1,500 results in its default order and up to 5,000 when sorted by date.",
            "default": 50
          },
          "priceMin": {
            "title": "Min price, rubles (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or above this, in rubles. Applied to every search."
          },
          "priceMax": {
            "title": "Max price, rubles (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or below this, in rubles. Applied to every search."
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "default",
              "date",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "The order of the results. Newest first is the one to use with monitor mode, and it lets you page deeper (5,000 results). Keep the order of your link to leave it unchanged.",
            "default": "default"
          },
          "monitorMode": {
            "title": "Monitor mode (only new listings)",
            "type": "boolean",
            "description": "Deliver and charge only listings that earlier runs of this actor in your account have not delivered. Put the same input on a schedule, sorted by newest first, to get new listings as they appear.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Keep the default Apify Proxy (datacenter). In our tests Avito blocked the residential pool and direct connections with HTTP 439, while the datacenter pool returned the pages.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}