Note, all the lumber yds in my area have piles of pallets sitting somewhere on site, they get left there by the shippers. Most of the pallets are pine, (minimum cost) sometimes there's a couple oak pallets.
In general, (ask 1st) they let customers walk away with them for free, it's cheaper than busting them up and transporting it to the landfill or incinerator. I pick up a couple 3 pine pallets every few yrs for my compose bins, they're great.
17 yrs ago I built this doll crib frame for my youngest daughter out of an oak pallet, I got for free at the Lumb yd. she was 4 then and played with it for many yrs.
One might also consider checking into their local landfill or stump dump, many have mulch areas that also take downed trees to grind into chips for municipal projects.
Our local DPW has their own area where the tree wardens take trees removed for whatever reason. They burn them late in the winter or bury them if the public doesn't cut them up for fire wood or furniture.