Here's a quick script to download your YNAB budget. I plan to migrate to Actual Budget because YNAB has made things terrible lately.
TOKEN=""
BUDGET_ID=$(curl -H "Authorization: Bearer $TOKEN" https://api.youneedabudget.com/v1/budgets | jq -r '.data.budgets[0].id')
curl -H "Authorization: Bearer $TOKEN" https://api.youneedabudget.com/v1/budgets/$BUDGET_ID --output budget.json