A lot of sites have an API (Application Programming Interface) that allows for this. It’s how sites pull data from Strava and similar. If Allparts do have an API then there’ll be a few limitations, usually things like a maximum number of requests per hour/day/week.
Then your problems become:
1. How to formulate the request.
2. How to handle the response.
3. How to dynamically update your site with that information.
There’s a few ways to go about this, as ever, each comes with its own pros and cons. You could do it on the server just making a request every few hours then caching the response at your end and inserting the data into your pages. Alternatively you could do it from the browser side with JavaScript. Very lightweight in terms of programming but you have to get round the inbuilt security features of browsers that are there to prevent this cross-site access to begin with!
At its easiest it could be a couple of dozen of lines of code, at its worst it could be a lot. The following Javascript could do it:
fetch(“https://www.allparts.uk.com/stock” + query)
.then((response) => response.json())
.then((text) => filter(rules))
.then((data) => {
document.getElementById(‘stockLevels’).innerHTML = data.stockLevel;
});
You’d need to define “query”, rules and the other variables but in theory that should work.