Reading Pi Hole log to do external tasks on pi

Dear community!

I'm looking for the way to read on live all the querys. I need to visualize physically some kinds of querys with python(example: check the Clickbait tipology ads and trigger a servomotor) and i thought that maybe is easy to read the pi-hole logs.

How can acces to this log? Where is on the root folder?...pihole-FTL.log?

Thanks in advance for the tips :wink:

The DNS log is located at /var/log/pihole.log

Thanks!! ;))