If it's surging, it's possible it has a vacuum leak. The fastest way to check that is check for a lean mixture by removing the air cleaner, then cover the air horn with a rag while it's idling. Try to cut off as much air as you can before it dies cause it should die. If it actually runs better cutting off the air just a little bit and refuses to die when all the air is shut off, then it must be getting air from somewhere else and that indicates a vacuum leak somewhere. First thing is grab the carb with both hands while it's idling and try to shake it to check if it is tight. If the idle rpm changes any at all while shaking the carb, the bolts are loose or the base gasket is leaking. Now check for a stuck open EGR by purposely reaching in or under the EGR and pushing it open with your finger. The engine should stumble or stall, if not the EGR is stuck open or the gasket is leaking. Now if cutting off the air in carb did cause it to run better, take a can of starting fluid and spray around the carb base gasket, all along the intake manifold gasket on both sides and any and all vacuum hoses, lines and connections listening for the RPM to change indicating a vacuum leak.
Next if it's not running lean, make sure it's not running too rich and flooding out. Look down the carb air horn with a flashlight and mirror, (so it don't backfire in your face) and look for gas dripping on the throttle plates. If so, then first of all check and make sure the fuel pressure isn't too high, then if it's flooding it could be a dirty needle and seat of the float, a hole in the float or a float that needs adjusted.
It's possible. My lawn mower does it every winter. The gas evaporates then leaves varnish behind in the float bowl which clogs everything up in the spring. Now, I just get used to it and clean it out every spring.
You can try to clean out those idle circuits a couple of ways without doing a rebuild. Start the engine, let it warm up then grab the choke with one hand and the throttle with the other hand and snap the throttle open and immediately close the choke. It will sound like it's going to stall so don't let it stall, open the choke quickly back open, so it will not stall and back off to idle on the throttle untill the engine recovers, then do it again, snap the throttle open and close the choke. Save the engine from stalling. Do this again. Do it 3-5 times and see how it idles now. What this does it push air into the idle circuits backwards to push out any dirt or clog.
If that don't work then it's really clogged, so remove both fuel/air mixture screws and take a can of starting fluid and put the straw on the can and shoot a few shots into one hole, then start the engine just for a few seconds and listen for a pop. It will pop out any dirt as soon as the starting fluid hits the hot air. Now do the other fuel/air mixture hole.
See how it idles now. If still no good, rebuild the carb and install a new fuel filter.