Hi Zhen,
Thank you for reaching out. With regards your concern about getting keywords, you can use this code example here (available different language). You can find more information following this guide.
Let me know if you have any questions.
Thanks,
Nirmita Patel Google Ads Team