{
  "openapi": "3.0.1",
  "info": {
    "title": "Tayara Property Scraper - Tunisia Real Estate Listings",
    "description": "Scrape property ads from Tayara.tn, Tunisia's biggest classifieds site, by governorate or town: apartments, villas, land, offices and shops for sale or rent. Rows carry the price in TND, private or agency seller and photos, plus area, rooms and phone with full details.",
    "version": "1.0",
    "x-build-id": "bfTRaBKPsdMwRoNlG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~tayara-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-tayara-property-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/sian.agency~tayara-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-tayara-property-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/sian.agency~tayara-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-tayara-property-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": {
          "operation": {
            "title": "🎯 What do you want to scrape?",
            "enum": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "Search returns Tayara property ads for the Tunisian governorates or towns you name. Listing Details opens Tayara ad addresses you already have and returns the full record. Tick Add full details on a search to get both in one run.",
            "default": "search"
          },
          "locations": {
            "title": "📍 Governorates or towns",
            "type": "array",
            "description": "Tunisian governorates or towns, one per line: Tunis, Sousse, Ariana, Nabeul, or a town such as La Marsa, Hammamet, Ennasr or Sahloul. Accents are optional. For a town Tayara spells its own way, write the governorate first: Sousse / Khzema. Use tunisie for the whole country. Each line runs its own search. A place Tayara doesn't know gets an error row and isn't charged.",
            "default": [
              "La Marsa"
            ],
            "items": {
              "type": "string"
            }
          },
          "propertyType": {
            "title": "🏠 Property type",
            "enum": [
              "any",
              "apartment",
              "house",
              "land",
              "office",
              "commercial",
              "roomShare",
              "holidayRental",
              "other"
            ],
            "type": "string",
            "description": "Which Tayara Immobilier section to search. Apartments are the biggest, about a third of all property ads.",
            "default": "apartment"
          },
          "transaction": {
            "title": "🔑 For sale or rent",
            "enum": [
              "any",
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Sale or rent, as the seller marked the ad. Some ads carry no sale or rent marker and appear only under Both, and that is true of every Land and Other property ad, so those two types need Both.",
            "default": "any"
          },
          "maxResults": {
            "title": "🔢 Max listings",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many listings across all locations. The run stops exactly at this number. Free accounts stop at 25. Tayara shows at most 10,000 ads per search, so for more split the search by town or property type. Listing Details ignores it and returns every ad you pasted.",
            "default": 100
          },
          "includeDetails": {
            "title": "📄 Add full details",
            "type": "boolean",
            "description": "Opens each ad's own page and adds sale or rent, floor area, bedrooms, bathrooms, price per m², map position when the seller set one, and the advertiser's phone. Each listing also bills one Listing Details event.",
            "default": false
          },
          "minPrice": {
            "title": "💵 Min price (TND)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price in Tunisian dinars. For rentals this is the monthly rent. Ads without a price are left out when you set a price filter."
          },
          "maxPrice": {
            "title": "💰 Max price (TND)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price in Tunisian dinars. For rentals this is the monthly rent. Leave it empty for no ceiling."
          },
          "sellerType": {
            "title": "👤 Seller",
            "enum": [
              "any",
              "private",
              "professional"
            ],
            "type": "string",
            "description": "Who placed the ad. Professionals are sellers with a Tayara shop: agencies, developers and brokers. Private owners are everyone else, about half of all property ads.",
            "default": "any"
          },
          "listingUrls": {
            "title": "📄 Listing URLs",
            "type": "array",
            "description": "Tayara ad addresses, one per line, such as https://www.tayara.tn/item/appartements/tunis/la-marsa/a-vendre-appartement-s3/6ac10347cdf7e8adb5ed0e35/ or the short https://www.tayara.tn/item/6ac10347cdf7e8adb5ed0e35/.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}