Getting started with the Porkbun API
Good news, hobbyists, tinkerers, hackers, and other assorted nerds: you can now manipulate Porkbun DNS programmatically via our RESTful API (documented here). This API also allows you to download SSL/TLS certificate bundles, and our basic price list.
⚠️️ Note
As of 2025, the host name for our API has changed from "porkbun.com" to "api.porkbun.com". If you're suddenly running into errors when using our API, check to make sure you're querying the new endpoints, which are outlined in our API documentation.
We're on Postman! Check out our public collection here.
To kick-start your API adventure, we built a few basic programs that already know how to talk to the API:
- Porkbun's Dynamic DNS client (Python edition)
- Porkbun's Dynamic DNS client (Java edition)
- Porkbun's SSL Certbot Alternative
Generating API Keys
Whether you're using one of our example apps or coding your own, the first thing you'll need to do is generate an API key and a Secret Key:
⚠️️ Note
Do not close or navigate away from the page with the SUCCESS! message until you have saved your Secret Key. It will only be visible to you this one time. If you close this page before you save your Secret Key, you'll have to delete the key and generate a new one.
Installing keys and enabling API access on specific domains
Congrats! You successfully generated API keys, installed the keys, and switched on access for at least one domain. You can now use the Dynamic DNS client or other Porkbun utilities that use the API. Or, if you're coding your own program from scratch, here's a link to the API reference.