Tim Cahill has retired from international football, ending a 107-cap Socceroos career as Australia's all-time leading goalscorer.

The 38-year-old made his final appearance for Australia in a 2-0 defeat to Peru at the World Cup, coming on as a second-half substitute after a frustrating period of limited game time for club and country.

Cahill will perhaps go down as the Socceroos' greatest ever player, having scored 50 times for the national team, and appearing in four World Cup tournaments.

"Today's the day that I'm officially hanging up my boots on my international career with the Socceroos," Cahill tweeted on Tuesday.

"No words can describe what it has meant to represent my country.

"Massive thank you to everyone for the support throughout all my years wearing the Australian badge."

Cahill is perhaps best known for his time at Everton, where he spent eight seasons and became one of the Premier League's most dangerous goal-scoring midfielders.

Among a long list of achievements, Cahill made history when he scored Australia's first two World Cup goals in a 3-1 win over Japan in 2006, and later helped the Socceroos to the 2015 Asian Cup title with three goals in the tournament.

He had a knack of scoring important, and sometimes spectacular, goals for his country, with a volley against Netherlands at the 2014 World Cup recognised as one of the showpiece tournament's great strikes.

Most recently, Cahill played in MLS with New York Red Bulls before spells in China, Australia and England, and he is yet to confirm his club future.