We report recent progress toward on-chip single photon emission and detection in the near infrared utilizing semiconductor nanowires. Our single photon emitter is based on a single InAsP quantum dot embedded in a junction defined along the growth axis of an InP nanowire. Under forward bias, light is emitted from the single quantum dot by electrical injection of electrons and holes. The optical quality of the quantum dot emission is shown to improve when surrounding the dot material by a small intrinsic section of InP. Finally, we report large multiplication factors in excess of 1000 from a single-Si-nanowire avalanche photodiode comprised of p-doped, intrinsic, and n-doped sections. The large multiplication factor obtained from a single Si nanowire opens up the possibility to detect a single photon at the nanoscale.