There is a database located in a single Google Sheets document. In this Google Sheets document, there are the following sheets (1 room sale, 2 room sale, 3 room sale, 4 room sale, 5 room sale, Room sale, Houses sale, New buildings sale, Land sale, 1 room rent, 2 room rent, 4 room rent, 5 room rent, Room rent, Houses rent, Land rent)
In these sheets, there are identical columns (a - text, b-title, c-url, d-date, e-city, f-neighborhood, g-deal, h-property, i-price, j-area, k-kitchen, l-floor, m-number_of_floors, n-room, o-author, p-url_author, q-id, r-type_author, s-land, t-type_object, u-phone, v-type_walls, w-repair, x-custom, y-photo, z-status)
Problem: Over time, as the number of real estate objects in the entire document exceeded 4,000, the table began to lag. And I understand that it will only get worse.
Solution: Transfer the existing ready-made, working solution from Google Sheets to the database of the WordPress site.
How it works now: In each sheet of the Google Sheets document, there are several fixed links to the OLX website listing real estate ads (for example https://www.olx.ua/uk/nedvizhimost/kvartiry/prodazha-kvartir/cherkassy/?currency=USD&search%5Bfilter_enum_apartments_object_type%5D%5B0%5D=secondary_market&search%5Bfilter_enum_number_of_rooms_string%5D%5B0%5D=odnokomnatnye&search%5Border%5D=created_at%3Adesc&search%5Bprivate_business%5D=business)
Three times a day, a ready script page_parser.js in Google Sheets App Script sends these links to our ready parser page_parser.php on the site, which processes this link and we receive an array of text, here is an example of the text array:
Array
(
[0] => Array
(
[id] => 895233733
[url] => https://www.olx.ua/d/uk/obyavlenie/1-kmnatno-kvartiri-dealniy-varant-dlya-nvestora-pd-orendu-IDYAjbL.html
[title] => 1-room apartment - an ideal option for an investor for rent.
[location_date] => Cherkasy - August 21, 2025.
[price] => 38000.1194279799100100
[area] => .1566161680228224
)
[1] => Array
(
[id] => 892557014
[url] => https://www.olx.ua/d/uk/obyavlenie/vrodvushka-u-tsentr-msta-z-gazovim-avtonomnim-opalennyam-IDYp4QS.html
[title] => Euro two-room apartment in the city center with gas autonomous heating
[location_date] => Cherkasy - August 21, 2025.
[price] => 71500
[area] => 42
)
[2] => Array
(
[id] => 889724395
[url] => https://www.olx.ua/d/uk/obyavlenie/prodam-1k-kvartiru-zhk-svyatotrotskiy-bul-shevchenka-202-IDYdbXt.html
[title] => Selling 1-room apartment in the residential complex SVYATOTROITSKY | Shevchenko Blvd, 202 |
[location_date] => Cherkasy - August 22, 2025.
[price] => 58821
[area] => 62.31
)
and so on.
)
This text array is sent back to Google Sheets where it is awaited and processed through our script page_parser.js as follows:
The ID of each ad is checked for existence with the ID in the database of the table. If a match is found by ID, the price in the database table is updated to the price that is in the text array. If no match is found by ID, it means that a new ad has appeared on the OLX website that is not in our database and it needs to be added to the database.
This action is handled by another ready script single_property.js in App Script, which takes the OLX link to a specific apartment (which is not in the database of the table) and sends this link to another PHP script on the site single_property.php and parses the data for this ad, where we get the following text as an example:
"https://www.olx.ua/d/uk/obyavlenie/prodam-smart-kvartiru-chehova-56-IDYK426.html
897558754
Private individual
Ruslan
https://www.olx.ua/uk/list/user/22BbN/
Option X: Selling smart apartment Chekhova 56
Location: Cherkasy
Type of object: Secondary market
Type of building: Hostel
Floor: 9
Number of floors: 9
Total area: 21 m²
Kitchen area: 4 m²
Wall type: Brick
Housing class: Economy
Number of rooms: 1 room
Furnishing: Yes
Appliances: Refrigerator, Microwave, Oven, Stove, Washing machine
Multimedia: High-speed internet
Comfort: Air conditioning, Balcony, Loggia, Kitchen furniture, Shower cabin, Wardrobe
Communications: Central sewage, Electricity, Gas, Central water supply
Infrastructure (up to 500 meters): Kindergarten, School
Description:
The apartment is fully furnished and electrified: air conditioning, refrigerator, microwave, boiler, washing machine, electric towel dryer, internet (just move in and live). The balcony is glazed. Water and gas meters are installed. Windows and balcony block are made of metal-plastic. Total area 21 m². 9th floor. Very convenient location (all necessary infrastructure nearby). Please, if you are interested in the apartment, write to Viber (I may not always be able to answer the call) 09*********59
Price: 25,000 $
Photo: https://chempion-agency.com/gallery.php?gallery_id=gallery_68a97fa73e1f0"
single_property.js awaits this text from the site script single_property.php and this received text is sent back to Google Sheets and sent to the corresponding ID of our database, and if such an ID does not exist, it creates a new row in the database where this data is automatically distributed across the columns of the table.
The task of the script page_parser.js is also to set in column z-status, "active" or "inactive". The logic is built in such a way that if there is a match by a specific ID from the text array and the ID in the database of the table, then status=active, if there are no matches from the text array, it means that the ad on the OLX website no longer exists and it is inactive, meaning the status in our database table will change to status=inactive.
Requirements: speed, simplicity, and conciseness.
I spoke with Gemini Pro and she said that the solution with ACF will not work because when there are more than 10,000 ads, the site with the database will also lag. Screenshot 1
One of the solutions will probably be Screenshot 2.
For clarity, we created a visual mockup of the site as it should look with a filter and a list of real estate objects (screenshot 4) and a landing page for a single ad (screenshot 3).
Details on PHP and JS scripts can be sent if needed.
If you have your own approach and vision, that is also welcome.