{"id":10193,"date":"2026-04-29T17:30:56","date_gmt":"2026-04-29T17:30:56","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=10193"},"modified":"2026-04-29T17:30:56","modified_gmt":"2026-04-29T17:30:56","slug":"how-to-integrate-a-third-party-api-into-your-hostinger-horizons-website","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/how-to-integrate-a-third-party-api-into-your-hostinger-horizons-website\/","title":{"rendered":"How to integrate a third-party API into your Hostinger Horizons website"},"content":{"rendered":"<p><span style=\"font-weight: 400\">Connecting your website to external services allows you to add advanced features like payment processors, real-time data feeds, and automation tools.<\/span><\/p><p><span style=\"font-weight: 400\">Hostinger Horizons supports third-party API integrations by handling the backend code for you. Common use cases include:<\/span><\/p><ul>\n<li style=\"font-weight: 400\"><b>Payment processors<\/b><span style=\"font-weight: 400\">: Integrating services like PayPal or Stripe.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Content APIs<\/b><span style=\"font-weight: 400\">: Displaying live data such as weather, news, or specialized databases.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Automation<\/b><span style=\"font-weight: 400\">: Connecting to tools to sync user data.<\/span><\/li>\n<\/ul><h3><strong>Before you start<\/strong><\/h3><p><span style=\"font-weight: 400\">Before prompting Horizons, gather the following details from your API provider:<\/span><\/p><ul>\n<li style=\"font-weight: 400\"><b>API key or credentials<\/b><span style=\"font-weight: 400\">: Required to authenticate requests.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Documentation URL<\/b><span style=\"font-weight: 400\">: The specific endpoint structure and parameters.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Functional requirements<\/b><span style=\"font-weight: 400\">: A clear description of what the API should do (e.g., &ldquo;display data&rdquo; or &ldquo;trigger an action&rdquo;).<\/span><\/li>\n<\/ul><h3><strong>Step 1: Prompt Horizons to set up the integration<\/strong><\/h3><p><span style=\"font-weight: 400\">In the Horizons chat, describe the connection you want to establish. Provide the technical details directly in the chat.<\/span><\/p><p><b>Example prompt for a content API:<\/b><\/p><p><em><span style=\"font-weight: 400\">Integrate the Bible API (<\/span><span style=\"font-weight: 400\">https:\/\/scripture.api.bible<\/span><span style=\"font-weight: 400\">) into my website. My API key is: <\/span><span style=\"font-weight: 400\">[your API key]<\/span><span style=\"font-weight: 400\">. Display a random Bible verse on the homepage every time the page loads.<\/span><\/em><\/p><p><b>Example prompt for a payment API:<\/b><\/p><p><em><span style=\"font-weight: 400\">Integrate the PayPal API into my website. My client ID is: <\/span><span style=\"font-weight: 400\">[your client ID]<\/span><span style=\"font-weight: 400\">. Add a <\/span><b>Pay Now<\/b><span style=\"font-weight: 400\"> button to the checkout page.<\/span><\/em><\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\"><span style=\"font-weight: 400\">Hostinger Horizons adds credentials to your project&rsquo;s backend so they are not exposed in your site&rsquo;s frontend code. <\/span><span style=\"font-weight: 400\">Be as specific as possible regarding where the feature should appear and what happens after a user interacts with it.<\/span><\/div><h3><strong>Step 2: Test the integration<\/strong><\/h3><ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Once the integration is generated, click <\/span><b>Preview<\/b><span style=\"font-weight: 400\"> to open your site.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Trigger the feature, such as loading the page or clicking a button.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Confirm the <strong>expected result<\/strong>, such as data loading or a confirmation message appearing.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">If the feature does not work, <strong>describe the specific error to the Horizons chat and ask for a fix<\/strong>.<\/span><\/li>\n<\/ol><h3><strong>Step 3: Publish your website<\/strong><\/h3><p><span style=\"font-weight: 400\">Once the integration works correctly in the preview mode:<\/span><\/p><ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><b>Publish<\/b><span style=\"font-weight: 400\"> in the Horizons editor.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">If you used a sandbox or test key, prompt Horizons to replace it: &ldquo;<em>Replace the test API key with my live API key: <\/em><\/span><em><span style=\"font-weight: 400\">[your live key]<\/span><\/em><span style=\"font-weight: 400\">&ldquo;.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Republish the site to apply the live credentials.<\/span><\/li>\n<\/ol><p><span style=\"font-weight: 400\">Your Hostinger Horizons website is now connected to an external service, extending its functionality beyond standard features. You can continue to add more integrations as your site grows.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Integrate a third-party API into your Hostinger Horizons website<\/p>\n","protected":false},"author":591,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[293],"tags":[],"class_list":["post-10193","post","type-post","status-publish","format-standard","hentry","category-hostinger-horizons"],"hreflangs":[],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/10193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/591"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=10193"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/10193\/revisions"}],"predecessor-version":[{"id":10195,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/10193\/revisions\/10195"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=10193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=10193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=10193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}