Facebook rolled out the red carpet for Michael Sayman when the social network hired him for a job that started last month, including flying him out to meet Chief Executive Officer Mark Zuckerberg.

Sayman, 17, brought his mom along on the trip. The position Facebook recruited him for: summer intern.

“When I got the e-mail saying – oh my god – Mark Zuckerberg wants to meet you, I had to make sure nobody was playing a prank on me,” Sayman, who wears braces and recently graduated from high school in Miami, said in an interview. “It was just incredible to be able to meet him.”

Landing top talent is getting so tough in Silicon Valley that technology companies are trying anything for an edge – including hiring interns out of high school and boosting new recruits’ perks. Facebook said it just started wooing interns before their freshman year of college, while LinkedIn Corp. opened its summer program to high schoolers two years ago. Startups including Airbnb Inc. have also nabbed interns as young as 16 years old.

For the companies, it’s all about keeping up with Silicon Valley’s youth-oriented culture, especially as the young and technically inclined are sometimes encouraged to create their own startups instead of joining large organizations. Early Facebook investor Peter Thiel pays people under 20 years old $100,000 to quit school to pursue their passions. Others aspire to follow the path of Summly Ltd. founder Nick D’Aloisio, who became a millionaire at 17 last year when Yahoo! Inc. acquired his mobile application.

The importance of young hires is recognized at the very top. On an earnings call in May, LinkedIn CEO Jeff Weiner gave a shout-out to his 2014 intern class, saying “talent is our number one operating priority and our most important asset, and this incoming group will continue to add to our team.”

The drive for youth is being spurred by more people getting into technology at a younger age. With online coding tutorials and Web communities for collaborating on software, high schoolers don’t have to get a computer science degree before producing their own mobile apps. Many find their way to events such as hackathons and contests to find bugs in software, which attract whoever has the skills to compete.

James Anderson got his internship at Portland, Oregon-based Web startup Planet Argon LLC last year through just this route. At age 13, he went to a conference focused on the Ruby on Rails programming language and met Planet Argon’s founders on a company hike. He later asked for – and got – a summer internship before starting high school.

“I felt like age shouldn’t hold me back as long as I can code,” said Anderson, now 15 and a soon-to-be sophomore at Flintridge Preparatory School in La Caada, California, who taught himself several programming languages and built apps based on online tutorials.

In the push for candidates, summer interns are getting treated better, too. It’s become standard for engineering interns to snag free housing, transportation and salaries of more than $6,000 a month, according to job-search site Glassdoor Inc. That compares with the $4,280 average monthly income for U.S. households in 2012, according to the U.S. Census Bureau. Of the top 10 companies paying the most for interns, all are technology companies except for Exxon Mobil Corp., Glassdoor said in February.

“It’s kind of insane that as a 19- or 20-year-old, you can make more than the U.S. average income in a summer,” said Daniel Tahara, 21, who interned at big data startup Hadapt Inc. last summer and mobile-security startup Lookout Inc. the year before. Tahara, who declined to say how much he was paid, started a job with online storage startup Dropbox Inc. this month.

Other perks abound. Microsoft Corp. puts on a free concert for summer interns, last year booking Macklemore & Ryan Lewis and Deadmau5. Dropbox pays for interns’ parents to fly to San Francisco and learn about the company. Google Inc. provides standard workplace benefits to interns, including on-site massages and laundry service.

Yet underage interns can sometimes present hurdles for companies. Consider the extra paperwork that Airbnb, the San Francisco-based online room-rental service, had to take on last year when recruiters stumbled upon the Twitter profile of Conrad Kramer, who was 16.

“We actually had to get a work permit for him,” said Bern Coh, Airbnb’s head of intern recruiting, to comply with California law that requires permits for workers under 18. Kramer interned last summer, she said, and since then the company has “been keeping in touch with him various ways.”

Kramer didn’t respond to requests for comment.

Young interns also bring more parents into the picture. Doris Tong, senior manager of LinkedIn’s global campus recruiting, said she once met a contestant at a company hackathon who she recalls “was 12 or 15.”

“I remember needing to get a parental release because we hadn’t ever had that young a person participate,” Tong said.

Not all companies want younger interns. Google requires interns to be at least college freshmen and encourages them to finish their degrees. The Mountain View, California-based company finds other ways to look for recruits, said Kyle Ewing, Google’s head of global staffing.

“We do have a former professional ballerina, a former professional baseball player who used to throw a 90-mile-per- hour fastball, a student who raps in Chinese competitively,” Ewing said of the company’s interns. “Someone after their freshman year could have been programming since they were 10 and they may be ready for a technical internship, some may need more development and might not have been as self-trained as others, and come in for a different kind of program.”

Facebook found Sayman last year because the teen was using the social network’s Parse developer tools to build a mobile game called 4Snaps. The game, which involves people taking four pictures and sending them to friends as clues for guessing a word, has more than 500,000 players.

Sayman taught himself to make mobile apps at 13, partly to help his mother, a driver for Lyft Inc., and father, an audio engineer, to pay the bills after a foreclosure four years ago.

“He was the one paying for everything in the house, at 13, 14, 15,” his mother, Cristina Sayman, said in a phone interview.

As downloads of 4Snaps climbed last year – at one point becoming the top word game in Apple Inc.’s App Store – Facebook’s Parse team contacted Sayman to feature the app on the company blog. They also asked him to make a video explaining how the app was built.

The video, which Sayman made in his pajamas, was shown to Facebook’s entire staff in September. It got the attention of the intern recruiter, who told the teen about the summer program.

Facebook’s head of global recruiting, Miranda Kalinowski, said there’s “no hard and fast rule” on intern ages at the Menlo Park, California-based company, though it typically tries to meet college freshmen and recruit from universities.

“The point is we’re always on the lookout for really top talent,” she said.

In November, Facebook flew Sayman out to meet Zuckerberg. The two discussed 4Snaps, while his mother marveled at the Web company’s headquarters where her son could get his hair cut, his laundry done and eat whenever he wanted for free.

“They have plenty of food, everything for free, they just have to focus and work,” Cristina Sayman said.

Sayman, who’s working with the Parse team this summer, said he isn’t sure if he’ll go to college. He’s getting into his life in Silicon Valley, including snapping a selfie last month with Apple CEO Tim Cook.

“If Facebook were to extend my offer for a full-time position I would definitely take that,” Sayman said. “It’s my dream job.”