{
  "id": "ac0vYJdpc4ll3W0P",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "zillow",
  "tags": [
    {
      "id": "XcZuhml1MIWbrvpj",
      "name": "work",
      "createdAt": "2025-11-24T04:38:31.105Z",
      "updatedAt": "2025-11-24T04:38:31.105Z"
    }
  ],
  "nodes": [
    {
      "id": "457d1105-27ff-47dd-8226-ffecd242eb72",
      "name": "parsedInfo",
      "type": "n8n-nodes-base.set",
      "position": [
        1264,
        288
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "21d26317-c9bc-4a56-a3ca-962254a23329",
              "name": "parsedJson",
              "type": "array",
              "value": "={{ $json.result.json_content.replace(/\\\\/g, '') }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c5d8048c-9909-4d6e-9276-548edcff2d1b",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1456,
        288
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "parsedJson"
      },
      "typeVersion": 1
    },
    {
      "id": "f7634ebf-c19c-41e9-89e6-722626d312a2",
      "name": "Insert row",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1664,
        288
      ],
      "parameters": {
        "columns": {
          "value": {
            "url": "={{ $json.url }}",
            "price": "={{ $json.price }}",
            "location": "={{ $json.location }}"
          },
          "schema": [
            {
              "id": "price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "price",
              "defaultMatch": false
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "url",
              "defaultMatch": false
            },
            {
              "id": "location",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "location",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "2NjhLmZVrLPM3jf2",
          "cachedResultUrl": "/projects/11WujgBvYtgScH07/datatables/2NjhLmZVrLPM3jf2",
          "cachedResultName": "zillow places"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "51f1f04c-a3ea-46d7-8913-0267fc2b0db1",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        896,
        272
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "a8606542-a436-4a6e-ba66-dde7a9c0db44",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        544,
        272
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9cb88c80-de98-43d5-af5a-d3b9897ebe9b",
              "name": "counter",
              "type": "array",
              "value": "[1,2,3,4,5,6,7]"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "be4837b5-14a8-46aa-9699-a71173383264",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        688,
        272
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "counter"
      },
      "typeVersion": 1
    },
    {
      "id": "4c56c0ef-7de8-47e1-8023-a51d1d9460b5",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        208,
        272
      ],
      "parameters": {
        "options": {
          "appendAttribution": false
        },
        "formTitle": "Scrape Zillow With Olostep API",
        "formFields": {
          "values": [
            {
              "fieldLabel": "url",
              "placeholder": "https://www.zillow.com/san-francisco-ca/?category=RECENT_SEARCH&searchQueryState=%7B%22isMapVisible%22%3Atrue%2C%22mapBounds%22%3A%7B%22north%22%3A37.903808878284806%2C%22south%22%3A37.646551235446054%2C%22east%22%3A-122.22184268359375%2C%22west%22%3A-122.64481631640625%7D%2C%22filterState%22%3A%7B%22sort%22%3A%7B%22value%22%3A%22globalrelevanceex%22%7D%7D%2C%22isListVisible%22%3Atrue%2C%22mapZoom%22%3A11%2C%22usersSearchTerm%22%3A%22San%20Francisco%20CA%20homes%22%2C%22regionSelection%22%3A%5B%7B%22regionId%22%3A20330%2C%22regionType%22%3A6%7D%5D%2C%22category%22%3A%22cat1%22%7D",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Enter the search url you want to scrape"
      },
      "typeVersion": 2.3
    },
    {
      "id": "b3ec54b2-7f73-4c1d-af95-bef528cc0d4f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        176
      ],
      "parameters": {
        "color": 7,
        "width": 432,
        "height": 256,
        "content": "## Pagination  \nGenerates page numbers (1\u20137) to scrape multiple Zillow pages."
      },
      "typeVersion": 1
    },
    {
      "id": "0edbb080-10ca-4017-8bfb-df4acfc1db45",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        192
      ],
      "parameters": {
        "color": 7,
        "width": 384,
        "height": 288,
        "content": "##  Olostep Zillow Scrape  \nExtracts price, listing URL, and location from each page."
      },
      "typeVersion": 1
    },
    {
      "id": "92a4369f-bd37-4297-ae49-9fe8fa163d8b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        192
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 288,
        "content": "## Insert Row  \nSaves each property into Google Sheets / Data Table."
      },
      "typeVersion": 1
    },
    {
      "id": "d989ad34-ed4a-4500-9ccb-d59e58ac7823",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        0
      ],
      "parameters": {
        "width": 608,
        "height": 1024,
        "content": "# Zillow Property Scraper Using Olostep API  \n\nThis n8n template automates Zillow property data collection by scraping Zillow search results using the Olostep API.  \nIt extracts **property price, link to listing, and location**, removes duplicates, and stores everything in a Google Sheet or Data Table.\n\n## How it works / What it does  \n1. **Form Trigger**  \n   - User enters a Zillow search URL.  \n   - This becomes the base Zillow search URL.\n\n2. **Pagination Logic**  \n   - A list of page numbers (1\u20137) is generated.  \n   - Each number is used to load the next Zillow search page.\n\n3. **Scrape Zillow Pages with Olostep**  \n   - For each page, the Olostep API scrapes the Zillow results.  \n   - Olostep\u2019s LLM extraction schema extracts:  \n     - **price**  \n     - **url** (link to the Zillow listing)  \n     - **location**\n\n4. **Parse & Split Results**  \n   - Returned JSON is cleaned and converted into individual listing items.\n\n5. **Remove Duplicates**  \n   - Ensures each Zillow listing appears only once.\n\n6. **Insert into Google Sheet / Data Table**  \n   - Final cleaned listings are inserted row-by-row.  \n   - Perfect for filtering, exporting, or further analysis.\n\nThis workflow gives you a fast, scalable property scraper using Zillow + Olostep \u2014 no browser automation, no manual copy/paste.\n\n## How to set up  \n1. Import the template into n8n.  \n2. Add your **Olostep API key**.  \n3. Connect your **Google Sheet or n8n Data Table**.  \n4. Deploy the form and start scraping by entering a place name."
      },
      "typeVersion": 1
    },
    {
      "id": "dbbc78fc-1b4c-44a3-a971-671d89cabe68",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        176
      ],
      "parameters": {
        "color": 7,
        "width": 256,
        "height": 256,
        "content": "##  Form Trigger  \nEnter a Zillow search URL."
      },
      "typeVersion": 1
    },
    {
      "id": "c307280f-689c-42d9-94ec-745ac4038257",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        192
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 288,
        "content": "## Parse & Split  \nCleans the JSON and splits Zillow results into individual listings."
      },
      "typeVersion": 1
    },
    {
      "id": "47f7d1d8-2d78-40ba-b96f-9daa5733a0ed",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        496
      ],
      "parameters": {
        "color": 3,
        "width": 384,
        "height": 96,
        "content": "## WARNING\nIf the http request runs through a 504 gateway just try again or set the node settings to retry on failure."
      },
      "typeVersion": 1
    },
    {
      "id": "907c26f3-31e6-4d12-b1e6-9b90e3821ee2",
      "name": "scrape amazon products",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        1088,
        288
      ],
      "parameters": {
        "url": "https://api.olostep.com/v1/scrapes",
        "method": "POST",
        "options": {
          "allowUnauthorizedCerts": true
        },
        "jsonBody": "={\n  \"url_to_scrape\": \"{{ $('Edit Fields1').item.json.url }}%2C%22pagination%22%3A%7B%22currentPage%22%3A{{ $json.counter }}%7D%7D\",\n  \"formats\": [\n    \"json\"\n  ],\n  \"wait_before_scraping\": 6000,\n  \"remove_css_selectors\": \"default\",\n  \"llm_extract\": {\n    \"schema\": {\n      \"type\": \"array\",\n      \"description\": \"A list of properties listed on the search results page of Zillow.\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"price\": {\n            \"type\": \"string\",\n            \"description\": \"The price of the property.\"\n          },\n          \"location\": {\n            \"type\": \"string\",\n            \"description\": \"The location of the property.\"\n          },\n          \"url\": {\n            \"type\": \"string\",\n            \"description\": \"The url of the property.\"\n          }\n        }\n      }\n    }\n  },\n  \"screen_size\": {\n    \"screen_type\": \"desktop\",\n    \"screen_width\": 1920,\n    \"screen_height\": 1080\n  }\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer <token>"
            }
          ]
        }
      },
      "retryOnFail": false,
      "typeVersion": 4.2
    },
    {
      "id": "ea28222e-b6c3-4332-a443-ee50333ade44",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        400,
        272
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "31efce50-54b3-472f-8979-7a968e2e375e",
              "name": "url",
              "type": "string",
              "value": "={{ $json.url.slice(0,-3) }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a64624b8-91df-48bf-82a7-f16af3be284f",
  "connections": {
    "Split Out": {
      "main": [
        [
          {
            "node": "Insert row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert row": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "parsedInfo": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "scrape amazon products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "scrape amazon products": {
      "main": [
        [
          {
            "node": "parsedInfo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}