When was the last time the fuel filter(s) were replaced? What is the condition of the fuel lines? If the fuel lines are deteriorating, especially between the tank and the fuel pump, it can be pulling air into the system and that'll cause all kinds of problems. Sort of like you're experiencing, its possible for it to deliver enough fuel at idle, but then when there's a higher demand for fuel it can't keep up.
Other than that, the next thing would probably be to clean the carb.
There's a lot of things it can be, it makes sense to start with the things that are easy to inspect before you start throwing money at it.