The filament was carbon. Edison's people had spent months on platinum, which has low resistance and kept melting, before deciding that cheap carbon worked fine as long as no oxygen could get at it, and the good vacuum pump built for the platinum work was repurposed for that. The version that worked used a coil of cotton thread baked until nothing but carbon was left, sealed into a glass bulb exhausted to something near a millionth of an atmosphere.
He had not started from nothing. Sir Humphry Davy had made wire glow in 1808 using a battery, and by the late 1870s arc lights were lighting stretches of street in Paris and Philadelphia, though the light was harsh, smelled terrible, and could not be switched on one lamp at a time. Edison set out instead to copy the gas industry rather than replace it, which meant the whole system rather than the bulb alone.
What separated his lamp from the decades of failed attempts before it was not clever illumination but the whole picture running behind it, since a bulb that lasts needs good vacuum, and Edison's wandering attention among generators, meters and filament materials turned out to be the most practical thing about him. Parallel wiring let each lamp run on its own, high resistance kept current low enough to be economical, and a central station could then feed thousands of points the way a gasworks fed jets.
Gas companies panicked. Edison had announced success prematurely in 1878 and gas shares had dropped on the news, which soured some investors on him and made each delay more expensive than the last. The final push took fourteen months and roughly twelve hundred experiments, and it was the carbon thread that ended the search.
Publicity followed by habit rather than by design. Several thousand visitors came to Menlo Park on New Year's Eve that same year, walking up a plank road to see about forty bulbs lit and switched on and off at will, and later versions burning through bamboo filaments lasted hundreds of hours. The price followed later, and only when the Pearl Street station in lower Manhattan threw its switch in September 1882 did four hundred lamps begin serving paying customers, among them the printing house of the financier who had backed the work.