Does Dune have an API?

Dune does currently not offer an API.

However, selected paid users can export results as CSV. Learn more and upgrade at dune.xyz/pricing.

Also note that anyone can embed Dune charts on their page for free. Simply click "Embed" on any query visualisation.