You asked

Which pentax k 3 mark iii portrait lens under 500 euros works for headshots?

For headshots on the K-3 Mark III, the guide's advice is to go longer than a standard lens, since standing further back keeps faces in proportion. The camera's APS-C sensor multiplies focal lengths by 1.5, so a 50mm lens frames like 75mm and works well for portraits. The portraits guide also suggests 135mm or 70-200mm f/2.8 for tight headshots with strong background blur.

Here are three picks from the lenses that fit this camera:

I can't check these against your 500 euro budget. This site's pages show prices in a "Price in France" section, with the date they were checked and shop links, and prices change, so look at each lens page for current figures. The 50mm f/1.8 is the most likely to fit a tight budget. If you want the longest framing, the 70mm is a good middle ground.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.