The quake was centered just northeast of the capital city in Ibaragi prefecture, about 40 kilometers (24 miles) underground, the agency said. There was no danger of tsunami waves, it said.
With some 35 million residents, Tokyo's metropolitan area is home to about a quarter of Japan's population.
A quake with an estimated magnitude of 8.3 hit Tokyo in 1923, killing 142,000 people. Powerful quakes in 1703, 1782, 1812 and 1855 also caused vast damage in the capital.
Japan is one of the world's most earthquake-prone countries because it sits atop four tectonic plates. Since the late 1970s, the government has taken measures to strengthen its monitoring of seismic activity, and to coordinate steps with local governments on how to cope with earthquakes, AP reports.
Putin made his first public comment on the subject of the recent decision of US President Donald Trump to recognise Jerusalem as the capital of Israel