{
  "openapi": "3.0.1",
  "info": {
    "title": "Milanuncios Scraper: Spanish Classified Ads Search",
    "description": "Search Milanuncios, the Spanish classified ads site, by keyword, category, province, city or map radius. Each ad has title, price, photos, category, place, date and seller type. Also price drops, ads of one seller or shop, and place and category lookups.",
    "version": "1.0",
    "x-build-id": "UuCM6ONnQRS8l9jHh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/happyendpoint~milanuncios-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-happyendpoint-milanuncios-search-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/happyendpoint~milanuncios-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-happyendpoint-milanuncios-search-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/happyendpoint~milanuncios-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-happyendpoint-milanuncios-search-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",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "listCategories",
              "searchCategories",
              "getCategoryFilters",
              "searchLocations",
              "listCityZones",
              "searchAddresses",
              "geocodePlace",
              "reverseGeocode",
              "searchListings",
              "searchListingsByUrl",
              "getSearchCategoryCounts",
              "searchPriceDrops",
              "listSellerListings",
              "listStoreListings"
            ],
            "type": "string",
            "description": "Which data to fetch. Each option is one kind of request."
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most results to return. The run stops once it has this many.",
            "default": 100
          },
          "query": {
            "title": "Search words",
            "maxLength": 200,
            "type": "string",
            "description": "Words to look for in the ads. Leave it empty on a search to list every ad that fits the other filters. Find categories and Ad counts by category cannot run without it. Used by: Find categories, Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "category": {
            "title": "Category number",
            "minimum": 1,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Only ads in this category. The numbers come from Category tree and Find categories. Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "categoryId": {
            "title": "Category ID (text)",
            "maxLength": 50,
            "type": "string",
            "description": "The category that Category filters describes, taken from the category ID of a Category tree row. Used by: Category filters."
          },
          "parentCategoryId": {
            "title": "Parent category ID",
            "maxLength": 50,
            "type": "string",
            "description": "Show only the children of this category in Category tree. Leave it empty to start at the top. Used by: Category tree."
          },
          "categoryFormat": {
            "title": "Category layout",
            "enum": [
              "tree",
              "flat"
            ],
            "type": "string",
            "description": "Whether Category tree nests the children inside their parents or returns one flat list. The nested layout is the default. Used by: Category tree."
          },
          "locationId": {
            "title": "Place ID",
            "maxLength": 1000,
            "type": "string",
            "description": "The place that Coordinates of a place resolves, taken from the place ID of a Find addresses row. Used by: Coordinates of a place."
          },
          "sellerId": {
            "title": "Seller ID",
            "maxLength": 100,
            "type": "string",
            "description": "The seller whose ads Ads of a seller lists, as shown on ad rows. Used by: Ads of a seller."
          },
          "storeId": {
            "title": "Shop ID",
            "maxLength": 100,
            "type": "string",
            "description": "The professional shop whose ads Ads of a shop lists. Used by: Ads of a shop."
          },
          "url": {
            "title": "Results page link",
            "type": "string",
            "description": "A link to a Milanuncios results page, copied from your browser. Search by page link reads the filters from it. Used by: Search by page link."
          },
          "location": {
            "title": "Place name",
            "maxLength": 200,
            "type": "string",
            "description": "The first letters of a town, district or street. Used to look places up, never to filter ads. Used by: Find locations, Find addresses."
          },
          "zoneCityId": {
            "title": "City ID for zones",
            "maxLength": 50,
            "type": "string",
            "description": "The town whose districts City zones lists. Use the city number from a Find locations result. Used by: City zones."
          },
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "North-south position of a map point, as a decimal number. A search around a point needs this, Longitude and Radius (meters) all filled in. Place at coordinates needs it too. Used by: Place at coordinates, Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "East-west position of a map point, as a decimal number; places west of Greenwich are negative. Give it with Latitude. Used by: Place at coordinates, Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "radiusMeters": {
            "title": "Radius (meters)",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "How far from the map point an ad may be, in meters. It works only when Latitude and Longitude are filled in as well. Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "provinceId": {
            "title": "Province number",
            "minimum": 1,
            "maximum": 52,
            "type": "integer",
            "description": "Only ads in this Spanish province. Find locations returns the numbers. Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "cityId": {
            "title": "City number",
            "minimum": 1,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Only ads in this city. Find locations returns the numbers. Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "districtId": {
            "title": "District number",
            "minimum": 1,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Only ads in this district of a city. City zones returns the numbers. Needs City number too. Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "minPrice": {
            "title": "Lowest price",
            "minimum": 0,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Only ads priced at or above this amount. Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "maxPrice": {
            "title": "Highest price",
            "minimum": 0,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Only ads priced at or below this amount. Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "sellerType": {
            "title": "Kind of seller",
            "enum": [
              "private",
              "professional"
            ],
            "type": "string",
            "description": "Only ads from this kind of seller. Leave it empty for both kinds. Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "adType": {
            "title": "Kind of ad",
            "enum": [
              "offer",
              "wanted"
            ],
            "type": "string",
            "description": "Whether to list ads that offer something or ads that look for something. Leave it empty to keep the site default. Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "listedWithinDays": {
            "title": "Published within (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only ads that appeared in the last number of days given here. Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "minYear": {
            "title": "Earliest year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Oldest model year to include (vehicles). Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "maxYear": {
            "title": "Latest year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Newest model year to include (vehicles). Used by: Search ads, Ad counts by category, Price drops, Ads of a seller, Ads of a shop."
          },
          "sort": {
            "title": "Order of results",
            "enum": [
              "recent",
              "relevance",
              "price_asc",
              "price_desc",
              "year_desc",
              "year_asc",
              "mileage_asc",
              "surface_desc",
              "length_desc",
              "distance"
            ],
            "type": "string",
            "description": "How to order the ads. Closest first needs a map point and a radius. Used by: Search ads, Price drops, Ads of a seller, Ads of a shop."
          },
          "advancedFilters": {
            "title": "Advanced filters",
            "type": "object",
            "description": "More filters as one JSON object. The README lists every accepted key; any other key is refused."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}