minetest.spawn item

Description
This function spawns a  at pos and returns its object.

Examples
This will spawn 1000 apples or diamonds in a range from -1000 to 1000 blocks in x and z.