Track Product Prices in Google Sheets
Schedule an Apify scrape and track AliExpress category prices in Google Sheets.
Introduction
30 Second Summary
Online prices can change between one visit and the next. A browser tab cannot show whether a whole category is getting cheaper over time.
In this project, you will build an automated price tracker for one AliExpress category using Apify plus Google Sheets. Each scheduled run adds a dated price snapshot to a spreadsheet you own.
What You'll Build
After a few scheduled runs, your tracker shows whether prices in your chosen category are rising or falling.
By the end of this project, you'll have:
- A repeatable category scan that uses the E-commerce Scraping Tool to collect up to 20 products in one results table.
- An automatic daily history that appends clean numeric rows to price_log after every scheduled run.
- A tracker summary that shows product count, median price, lowest price, plus median price change for each run date.
- Secret Mission: An optional challenge to push your price-tracking skills further.
Are there any prerequisites?
You'll need a browser. You'll also need an Apify account plus a Google account. No local toolchain is required.
Before We Start
A scheduled price tracker needs somewhere to run its scraper. It also needs a spreadsheet that keeps every run.
Apify Console manages the scraper runs. Apify Store provides the ready-to-use scraping tool.
Google Sheets stores the price history you will analyze. This step makes sure your browser can reach all three workspaces.
In this step, get ready to:
- Open a web browser for the project.
- Confirm your Google Account can access Google Sheets.
- Create your Apify account.
Open your web browser
Every part of this project runs in your browser. Keeping the services in separate tabs makes it easy to move between scraping results and your spreadsheet.
- Press Cmd+Space on macOS or the Windows key on Windows to open your computer search.
- Type the name of your preferred web browser into the search field.
- Select the browser from the search results.
You should see a browser window with an address bar. Keep this window open for the rest of the project.
Confirm your Google Sheets access
Your Google Account gives the tracker permission to write its price history into a spreadsheet. You only need to confirm that Sheets opens under the account you plan to use.
- Visit the official Google Sheets home page in your browser.
✔️ I see the Sheets home screen
Good start. Your Google Account already reaches the spreadsheet workspace this tracker needs.
ⓧ I see the sign-in screen
Google needs to confirm which account owns the future tracker spreadsheet. Your credentials stay inside Google's sign-in flow.
- Enter your Google Account email address or phone number in the Email or phone field.
- Click Next.
- Enter your password in the password field.
- Click Next.
- Complete any verification prompt shown by Google.
ⓧ I need a Google Account
You will choose your own sign-in details on Google's page. Keep those details private.
- Click Create account on the Google sign-in screen.
- Complete Google's account form using your own details.
- Finish any verification requested by Google.
- Return to the Google Sheets home page.
You should see the Sheets home screen under your Google profile. This confirms that the account can reach the spreadsheet service.
Stuck on the Google sign-in screen?
- Check that your browser accepts cookies from Google.
- Use help me resolve my Google Sheets sign-in problem without sharing your password or verification codes.
- Share only non-sensitive error details in the NextWork community if you still need help.
Create your Apify account
Your Apify account unlocks the Console where you manage runs. It also gives you access to the Store catalog.
Apify redirects you to Google while it confirms your identity. This account setup does not require a credit card.
- Visit the official Apify sign-up page in a new browser tab.
- Click Continue with Google.
- Choose the Google Account you confirmed earlier.
- Complete Google's authorization screen to return to Apify Console.
- Select Apify Store from the left-side panel.
You should see a searchable catalog of scraping tools. This confirms that your Apify account can reach the Store.
Apify did not open after authorization?
- Check whether your browser blocked the Google authorization window.
- Return to the Apify sign-up page after completing the Google prompt.
- Use help me troubleshoot my Apify account setup without sharing your password or verification codes.
Before the final check, which signed-in workspace do you expect to see in each browser tab?
- Switch to the Apify browser tab.
- Confirm the Apify Store catalog is visible under your signed-in session.
- Switch to the Google Sheets browser tab.
- Confirm the Sheets home screen shows your Google profile.
You have cleared the setup hurdle. Your browser now reaches the Apify Store through your Apify account.
Your Google Account can also reach the Sheets home screen. Both services are ready for the tracker.
Your account access is ready. Next, you will choose an AliExpress category page and turn its address into a clean tracking URL.
Choose a Product Category
A useful price history depends on every run checking the same group of products. A category or search-results page gives your tracker that consistent target.
Your future Apify task needs one clean AliExpress URL. Session parameters can clutter the copied address.
In this step, you will keep the stable part through .html. The finished URL becomes your category listing input.
In this step, get ready to:
- Select an AliExpress category or search-results page to monitor.
- Remove the session parameters from its URL.
- Confirm the clean URL still loads the chosen products.
Choose a page to track
The selected page defines which products appear in every run. A focused category makes later price changes easier to compare.
- Open AliExpress in a new browser tab.
- Use the category menu or search bar to find a group of products you want to monitor.
- Open the category or search-results page containing those products.
You should see a full list of products that share the category or search theme.
Remove the session parameters
For this project, .html is the cut-off point for the clean address. The characters after it contain session parameters that the tracker does not need.
- Click the browser's address bar.
- Find the first .html in the URL.
- Select every character after .html.
- Delete the selected session parameters.
- Press Enter to reload the cleaned address.
You should see the same group of products after the page reloads. The address is now shorter.
- Click the browser's address bar again.
- Press Cmd+C (macOS) or Ctrl+C (Windows) to copy the clean URL.
- Store the copied address here for the next step: your clean AliExpress category URL.
Confirm the clean URL works
A clean URL should reopen the selected product group in a fresh browser tab. This check proves the tracker input is stable.
Before you test it, do you think removing the session details changed which products the page can show?
- Open a new browser tab.
- Paste your clean AliExpress category URL into the address bar.
- Press Enter to load the page.
You should see the same category or search results. The address should end at .html.
Good work. Your price tracker now has a stable category input that is ready for repeated runs.
Does the page fail to reload?
- Return to the original category or search-results page.
- Repeat the edit while keeping every character through .html.
- Open another AliExpress category or search-results page if the address has no .html.
Help me check where to trim my AliExpress category URL.
Your category target is clean and ready. Next, you will give this URL to the E-commerce Scraping Tool for its first product run.
Create Your Apify Scraping Task
The clean AliExpress URL from the previous step is ready. Now you need a repeatable way to collect a comparable product sample from it.
Apify runs the E-commerce Scraping Tool as an Actor. A fixed 20-product cap keeps each run focused on the same sample size.
In this step, get ready to:
- Configure a fixed 20-product category scrape from the clean URL.
- Verify the run through its product results table.
- Save the configuration as a reusable Apify task.
Configure the category scrape
The Category listing URLs field tells the scraper which collection page to read. Total maximum products limits the sample that one run can return.
- Open the E-commerce Scraping Tool through its official Apify Store page.
- Click Try for free.
- Sign in to Apify if the browser asks you to authenticate.
- Select Input in Apify Console.
- Paste the clean AliExpress URL from the previous step into Category listing URLs.
- Enter 20 in Total maximum products.
Run and inspect the results
Each Actor run writes structured records to a Dataset. Apify displays those records as a table in the Output tab.
A run can take a few minutes while the Actor reads the category pages. That pause is expected.
- Start the scrape by clicking Save & Start.
- Wait for the run to finish.
- Open the Output tab.
You should see one row per scraped product. The table includes name values.
The offers/price column shows prices. The rating column shows product ratings.
That collection loop is working. Your category URL now produces a structured product table.
No Product Rows?
- Return to the Input tab.
- Confirm the selected URL still ends at .html.
- Remove any session parameters that appear after .html.
- Retry the run by clicking Save & Start.
If the table remains empty, ask for help diagnosing the Actor run.
Save the configuration as a task
An Apify task stores reusable Actor input. It lets later runs reuse the chosen URL without rebuilding the configuration.
- Save the finished run's configuration by clicking Save as a new task.
Before you verify the task, which two input values do you expect it to retain?
- Select Input on the task page.
- Confirm Category listing URLs contains the clean AliExpress URL from earlier.
- Confirm Total maximum products displays 20.
- Locate Start in the top-right corner.
You should see the clean URL and 20 retained. The Start button confirms that the saved task is ready to rerun.
You now have the reusable core of your tracker. It is ready for the spreadsheet connection in the next step.
Next, you'll connect the task's output to Google Sheets so every successful run adds to a price history.
Send Results to Google Sheets
Your saved E-commerce Scraping Tool task already collects product details from one AliExpress category. A finished run proves the source is working.
Now each run needs a permanent home so you can compare prices over time. The Google Sheets Import & Export integration in Apify appends each successful result to a Google Sheet.
A transform function adds the run date. It also converts prices into numbers that spreadsheet formulas can calculate.
In this step, get ready to:
- Prepare price_log and tracker tabs in a blank Google Sheet.
- Connect the saved task to the Google Sheets Import & Export integration.
- Transform the task results into dated rows with numeric prices.
Prepare the spreadsheet tabs
Raw product rows need their own worksheet tab. The summary formulas you add later need a separate tab so each new export leaves them intact.
- Create a blank spreadsheet from the Google Sheets home page.
- Rename the first worksheet tab to price_log.
- Add a second worksheet tab using the plus control at the bottom of the spreadsheet.
- Rename the second worksheet tab to tracker.
You should see price_log and tracker as two separate tabs at the bottom of the spreadsheet.
Why keep the tabs separate?
The integration controls the layout of the tab that receives its output. Keeping tracker separate protects its formulas whenever a new run writes rows to price_log.
Connect the task to Google Sheets
The integration starts after a successful task run. Append mode keeps each run's rows beneath the history already stored in price_log.
- Return to the saved E-commerce Scraping Tool task in Apify Console.
- Select the Integrations tab.
- Click Add integration.
- Search for Google Sheets.
- Select Google Sheets Import & Export.
The authorization request can feel sensitive. It lets the integration write to spreadsheets in the Google account you approve.
- Set Start when to Run succeeded.
- Use Google Account to authorize the Google account that owns your spreadsheet.
- Complete Google's permission screen by approving spreadsheet access.
- Choose your new spreadsheet in Select file from Google Drive.
- Set Mode to append.
- Enter price_log!A:G in the Range field.
You should now see your spreadsheet selected with append mode and the price_log!A:G range.
Why use append mode?
Append mode preserves the rows from previous runs. The replace mode clears the existing snapshot each time, which removes the history you need for price comparisons.
Transform and verify the rows
Some product prices can arrive as text that includes a currency symbol. The transform function converts them into numbers while adding one date to every row from the run.
- Locate the Transform function field in the integration settings.
- Replace the field contents with this function:
({ spreadsheetData, datasetData }) => {
var scrapedAt = new Date().toISOString().slice(0, 10);
var pick = function (item, nested, flat) {
if (item[flat] !== undefined && item[flat] !== null) return item[flat];
var o = item.offers;
if (o && o[nested] !== undefined && o[nested] !== null) return o[nested];
return '';
};
var toNumber = function (v) {
var n = parseFloat(String(v).replace(/[^0-9.]/g, ''));
return isNaN(n) ? '' : n;
};
var rows = datasetData.map(function (item) {
return {
url: String(item.url || '').split('?')[0],
name: item.name || '',
'offers/price': toNumber(pick(item, 'price', 'offers/price')),
'offers/priceCurrency': pick(item, 'priceCurrency', 'offers/priceCurrency'),
rating: item.rating === undefined ? '' : item.rating,
reviewCount: item.reviewCount === undefined ? '' : item.reviewCount,
scrapedAt: scrapedAt,
};
});
return spreadsheetData.concat(rows);
}
What does this function do?
- The scrapedAt value records the current run date in year-month-day format.
- The pick helper reads the price from either supported result structure.
- The toNumber helper removes currency characters before converting the price into a number.
- The returned row keeps seven fields for columns A:G in price_log.
- The final line joins the transformed rows to the spreadsheet data already present.
Here is a final checkpoint for the complete transform function.
✔️ Awesome, I've got everything!
Your transform function matches the complete version and is ready to save.
ⓧ I'd like to double check the full code
- Compare the complete function below with the contents of the Transform function field.
({ spreadsheetData, datasetData }) => {
var scrapedAt = new Date().toISOString().slice(0, 10);
var pick = function (item, nested, flat) {
if (item[flat] !== undefined && item[flat] !== null) return item[flat];
var o = item.offers;
if (o && o[nested] !== undefined && o[nested] !== null) return o[nested];
return '';
};
var toNumber = function (v) {
var n = parseFloat(String(v).replace(/[^0-9.]/g, ''));
return isNaN(n) ? '' : n;
};
var rows = datasetData.map(function (item) {
return {
url: String(item.url || '').split('?')[0],
name: item.name || '',
'offers/price': toNumber(pick(item, 'price', 'offers/price')),
'offers/priceCurrency': pick(item, 'priceCurrency', 'offers/priceCurrency'),
rating: item.rating === undefined ? '' : item.rating,
reviewCount: item.reviewCount === undefined ? '' : item.reviewCount,
scrapedAt: scrapedAt,
};
});
return spreadsheetData.concat(rows);
}
- Click Save to store the integration.
This rerun can take a few minutes while the E-commerce Scraping Tool collects the latest products. A short wait here is expected.
Before you rerun the task, what do you expect to appear in the price and date columns?
- Rerun the saved task from its task page.
- Wait for the task run to finish.
The task run should finish successfully. That success triggers the connected integration.
- Switch back to the Google Sheet from earlier.
- Select the price_log tab.
You should see a header row plus product rows across columns A:G.
Column C contains prices without currency symbols. Column G contains the run date.
No clean rows in price_log?
- Confirm the integration points to the Google Sheet you created.
- Confirm Mode is set to append with price_log!A:G in the Range field.
- Paste the complete transform function again if the prices still include currency symbols.
Ask for help with troubleshooting the Google Sheets integration.
You have closed the loop. Each successful task run can now add a dated price snapshot to your spreadsheet.
Your spreadsheet is collecting dated product prices. Next, you will schedule the task so the history grows automatically.
Schedule Daily Price Checks
Your clean price rows are already landing in Google Sheets after each task run. The price history only grows when you start that task yourself.
An Apify Console schedule removes that manual gap by launching the saved E-commerce Scraping Tool task every day. Each run can append a fresh dated batch from the same AliExpress page.
In this step, get ready to:
- Create a schedule in Apify Console.
- Assign the saved E-commerce Scraping Tool task to a daily frequency.
- Enable the schedule.
Create the schedule
A schedule stores the timing for an automated task. New schedules begin disabled so you can finish configuring them before any runs start.
- Return to Apify Console from earlier.
- Select Schedules in the navigation menu.
- Click Create new.
Good start. Your schedule now exists in Apify Console in a disabled state.
Add the saved task
The schedule needs an action that tells it what to run. Your saved task already contains the clean category URL plus the 20-product limit plus the spreadsheet integration.
- Click the Add dropdown on the schedule detail page.
- Choose the option for a saved task.
You'll see a selector containing the tasks saved in your Apify account.
- Select the saved E-commerce Scraping Tool task from earlier.
The saved task now appears as an action on the schedule.
Enable daily runs
The frequency controls when Apify launches the task. A daily frequency gives your tracker one new batch of prices each day.
- Click the Schedule setup card.
- Configure the schedule to run daily.
- Confirm the Next runs section lists one upcoming run per day.
Before you enable it, predict what status details should change on the schedule page.
- Click Enable on the schedule detail page.
That's the manual work handled. Your schedule now shows an enabled state.
The Next runs section displays the upcoming time for the daily task run.
No next run listed?
- Confirm the schedule shows an enabled state.
- Confirm Schedule setup is configured for daily runs.
- Confirm the saved E-commerce Scraping Tool task still appears as a schedule action.
Help me troubleshoot why my enabled Apify schedule does not show a next run time.
Your price history can now grow on its own. Next, you'll turn the dated rows in price_log into a tracker that reveals how prices change over time.
Build the Price Tracker Summary
Your daily Apify schedule is enabled. Each successful run keeps expanding price_log with fresh product data.
Raw product rows make the price trend hard to spot. Google Sheets formulas will collapse each run date into one row on the tracker tab.
In this step, get ready to:
- Create the tracker headings.
- Calculate a dated summary for every scraper run.
- Compare each run's median price with the previous run.
Why summarize each run?
The products returned by the scraper can change between runs. A median describes the middle price across the available products for one date.
A dated summary keeps the category trend comparable as individual listings rotate.
Lay out the tracker columns
The tracker needs one column for each measurement. The first formula will generate the list of run dates automatically.
- Return to the Google Sheet connected earlier.
- Select the tracker tab at the bottom of the sheet.
- Enter run date in cell A1.
- Enter products priced in cell B1.
- Enter median price in cell C1.
- Enter cheapest in cell D1.
- Enter median change % in cell E1.
You now have five headings across the first row of tracker.
- Add the date-list formula to cell A2 by pasting:
=UNIQUE(FILTER(price_log!$G$2:$G$5000, price_log!$G$2:$G$5000<>""))
How Does the Date List Work?
- The FILTER function keeps non-empty run dates from column G in price_log.
- The UNIQUE function keeps one copy of each run date.
- The results spill down column A as new dates arrive.
- Press Enter to apply the formula.
You should see each distinct date from column G of price_log appear once in column A.
No Run Dates Appearing?
Check that price_log contains dates in column G. Confirm that you pasted the formula into A2.
Ask for help if the dates are present but the formula stays blank: help me troubleshoot why my Google Sheets date formula is not returning values from price_log column G.
Calculate each run's price summary
Each date now needs measurements drawn from the matching rows in price_log. The product count includes only rows with a usable price.
- Add the product-count formula to cell B2 by pasting:
=IF($A2="","",COUNTIFS(price_log!$G$2:$G$5000,$A2,price_log!$C$2:$C$5000,"<>"))
How Does the Product Count Work?
The COUNTIFS function counts rows whose date matches A2. It also requires a non-empty price in column C.
This gives you the sample size used by the price calculations.
- Press Enter to apply the formula.
You should see the number of products with usable prices for the first run date. The result should be at or below 20.
Product Count Looks Wrong?
Confirm that dates are in column G of price_log. Check that numeric prices are in column C.
Ask for help if the count does not match the priced rows: help me troubleshoot a COUNTIFS formula that counts priced products by run date.
- Add the median-price formula to cell C2 by pasting:
=IF($A2="","",IFERROR(MEDIAN(FILTER(price_log!$C$2:$C$5000,price_log!$G$2:$G$5000=$A2,price_log!$C$2:$C$5000<>"")),""))
How Does the Median Work?
The FILTER function selects numeric prices recorded on the date in A2. The MEDIAN function returns the middle price from that set.
Blank prices stay outside the calculation.
- Press Enter to apply the formula.
You should see a numeric median price in cell C2.
Median Price Staying Blank?
Inspect column C of price_log for numeric prices. Text prices cannot produce the expected median.
Ask for help if the source prices are numeric: help me troubleshoot a blank MEDIAN and FILTER result in Google Sheets.
- Add the lowest-price formula to cell D2 by pasting:
=IF($A2="","",IFERROR(MIN(FILTER(price_log!$C$2:$C$5000,price_log!$G$2:$G$5000=$A2,price_log!$C$2:$C$5000<>"")),""))
How Does the Lowest Price Work?
The FILTER function selects prices from the date in A2. The MIN function returns the smallest value.
This shows the cheapest priced listing captured in that run.
- Press Enter to apply the formula.
You should see the lowest numeric price in cell D2. It should be less than or equal to the median in C2.
Lowest Price Missing?
Confirm that the run date in A2 appears in column G of price_log. Confirm that the same rows have numeric values in column C.
Ask for help if both source columns look correct: help me troubleshoot a blank MIN and FILTER result in Google Sheets.
Compare runs and verify the tracker
The final formula measures how far the median moved from the previous run. It returns the change as a percentage rounded to one decimal place.
- Add the median-change formula to cell E2 by pasting:
=IF($A2="","",IFERROR(ROUND(($C2-$C1)/$C1*100,1),""))
How Does the Price Change Work?
The formula compares the current median with the median in the row above. The ROUND function keeps one decimal place.
The first run has no earlier median to compare against. Its change cell remains blank.
- Press Enter to apply the formula.
Cell E2 should stay blank because the first run has no previous run.
The fill handle is small, so this part can feel fiddly.
- Select the formula cells from B2 through E2.
- Drag the small blue square at the bottom-right of the selection down twenty rows.
Rows beside a spilled date should show summary values. Rows without a date should remain blank.
Formulas Not Filling Correctly?
Start the selection at B2. Include every formula through E2 before dragging the fill handle.
Ask for help if copied formulas show unexpected values: help me check whether my Google Sheets formulas adjusted their row references correctly.
Before you inspect the completed summary, do you expect one row or multiple rows for each distinct run date?
- Select the price_log tab.
- Scan column G for distinct run dates.
- Return to the tracker tab.
You should see one populated summary row for each distinct run date. Each row should show a product count in column B.
You should also see a median price in column C. Column D should show the lowest price.
Column E stays blank for the first date. It shows the median price change once a later run date exists.
You did it. Your raw price log is now a dated tracker that reveals how the category changes across runs.
Secret mission
Color-Code Price Changes
Highlight median price decreases in green. Mark increases in red so price movement stands out at a glance.
Clean Up Your Resources
Clean Up Your Resources
Your ongoing usage depends on whether the daily schedule stays enabled. Each scheduled run continues using your Apify account's usage allowance.
Resources you used:
- An enabled daily schedule in Apify Console.
- A saved E-commerce Scraping Tool task capped at 20 products for the selected clean AliExpress URL.
- A Google Sheets Import & Export integration attached to the task in append mode for price_log!A:G.
- A connected spreadsheet in Google Sheets containing price_log and tracker.
Keep everything running
No action is needed while the tracker stays active. This option suits a price history that should keep growing.
- Keep the daily schedule enabled in Apify Console.
- Leave Total maximum products at 20 on the saved task.
- Review tracker after future runs to compare prices across run dates.
Each daily run adds another snapshot to price_log. Your tracker gains a longer price history over time.
Pause - I'll come back to this later
Pausing stops recurring runs from using more of your allowance. Your existing automation setup remains available.
- Return to the enabled daily schedule in Apify Console from earlier.
- Turn off the schedule's enabled setting.
- Confirm the daily schedule is marked as disabled.
- Leave the saved E-commerce Scraping Tool task unchanged.
- Leave the Google Sheets Import & Export integration unchanged.
- Keep the connected Google Sheet with its existing price history.
You now have a clean stopping point. Your existing rows and formulas remain ready for the next run.
Delete - I don't want to use this again
This option removes the recurring automation plus its saved price history. Rebuilding the tracker later requires repeating the project.
Your Price History Will Be Removed
These actions remove the data in price_log plus the summaries in tracker. The pause option preserves both tabs for a future return.
Remove the automation:
- Return to the enabled daily schedule in Apify Console from earlier.
- Turn off the schedule's enabled setting.
- Use the deletion control on the schedule page to delete the schedule.
- Confirm the schedule deletion when prompted.
- Return to the saved E-commerce Scraping Tool task from earlier.
- Use the task's integration settings to remove the Google Sheets Import & Export integration.
- Use the task's deletion control to delete the saved task.
That's the recurring automation cleared. The spreadsheet still holds your existing history.
Remove the spreadsheet:
- Switch back to the connected Google Sheet from earlier.
- Use the spreadsheet's file menu to move the sheet to trash.
- Check your trash to confirm the connected spreadsheet is listed there.
Everything created for the tracker is now removed. Your Apify account stays intact.
Your Google account also stays intact.
Nice Work!
Nice Work!
You made it. Your Apify price tracker now sends daily AliExpress product snapshots to Google Sheets. Your tracker turns those snapshots into a clear view of category price movement.
You've learned how to:
- Run a saved E-commerce Scraping Tool task against a clean AliExpress category URL with a 20-product cap.
- Build an automated price history with dated numeric rows from a daily Apify schedule.
- Summarize each run date with tracker formulas for product count, median price, lowest price, and median price change.
- Secret Mission: Extend your price tracker through an optional challenge that pushes your skills further.
Your spreadsheet is ready to reveal how prices move as its daily history grows.
Ready to quiz yourself?