Use the seobot npm package
Read documentation: https://github.com/MarsX-dev/seobot
Check out the Next.js integration example at the sexbot-next-blog repository.
Your API key can be found in the Menu -> Connect my Blog -> REST API / Next.js / UnicornPlatform.
NOTE: This menu item is available only for websites with at least one article credit. You can use the demo API key to build integration.