Satyaveer Yadav said he had kidnapped the child for ransom to make a quick buck as he was unemployed, said Deputy Commissioner of Police (northeast) A K Singla.
On February 6, a woman told police that her grandson, who was playing in front of the house, went missing. When she came out of her house, she found him missing, the officer said.
"During investigation, efforts were made to trace the child at bus terminals, railway stations, metro stations, night shelters, taxi stand, hotels in Delhi. A message was also sent on social media platforms like Whatsapp, Facebook," said Singla.
The accused, a resident of Bareilly, has been living in Delhi for four to five years.