J.K. Rowling received a screenwriter credit for the 2016 film Fantastic Beasts and Where to Find Them.
The film was written by Rowling and directed by David Yates. It is set in the wizarding world decades before the Harry Potter story and follows Newt Scamander, a British magizoologist whose magical creatures escape in New York City.
The film’s title resembles a Hogwarts textbook mentioned in the Harry Potter books. The movie expands that fictional textbook idea into a new narrative rather than adapting one of Rowling’s seven Harry Potter novels. It was also Rowling’s first produced screenplay.
A common mix-up is naming her as the film’s director. Yates directed the movie, while Rowling wrote the screenplay and served as a producer. The exact credit asked for here is therefore screenwriter, not author of a novel or film director.