{"id":2320,"date":"2025-04-01T00:54:28","date_gmt":"2025-04-01T00:54:28","guid":{"rendered":"https:\/\/madlysane.com\/?page_id=2320"},"modified":"2025-12-28T20:33:40","modified_gmt":"2025-12-29T02:33:40","slug":"search","status":"publish","type":"page","link":"https:\/\/madlysane.com\/en\/search\/","title":{"rendered":"Search"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>PsychQuery &#8211; Enhanced Experience<\/title>\n    <script async src=\"https:\/\/cse.google.com\/cse.js?cx=a01cca32846d24c8b\"><\/script>\n    <style>\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #f0f8ff;\n            color: #333;\n            text-align: center;\n            margin: 0;\n            padding: 0;\n        }\n        h1 {\n            color: #4b88a2;\n            margin-top: 20px;\n        }\n        #results {\n            margin: 20px auto;\n            width: 80%;\n            max-width: 600px;\n            text-align: left;\n            background-color: #fff;\n            border: 1px solid #ccc;\n            border-radius: 10px;\n            padding: 15px;\n            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n        }\n        .gcse-search {\n            margin-bottom: 20px;\n        }\n        iframe {\n            width: 100%;\n            height: 500px;\n            border: none;\n        }\n    <\/style>\n<\/head>\n<body>\n   \n    <!-- Tawk.to Chat Widget inside iframe -->\n    <iframe src=\"https:\/\/tawk.to\/chat\/6738d1a84304e3196ae3a113\/1icqv5uoc\" allow=\"cross-origin\"><\/iframe>\n\n    <!-- Script for Handling Search and Sending to Tawk.to -->\n    <script>\n        \/\/ Your Google Custom Search API key and engine ID\n        const API_KEY = \"AIzaSyA1q0-OP4sZXmM143-HUcPX3Nq63qvVCIQ\"; \/\/ Replace with your API key\n        const CX_ID = \"a01cca32846d24c8b\"; \/\/ Replace with your Custom Search Engine ID\n\n        \/\/ Listen for the search form submission\n        document.addEventListener(\"DOMContentLoaded\", function () {\n            const searchInput = document.querySelector(\".gcse-search input[name='q']\");\n            \n            \/\/ Event listener for search input submission\n            searchInput?.addEventListener(\"input\", (event) => {\n                const query = event.target.value;\n                if (query) {\n                    fetchResults(query);\n                }\n            });\n        });\n\n        \/\/ Fetch search results from Google API\n        async function fetchResults(query) {\n            const url = `https:\/\/www.googleapis.com\/customsearch\/v1?q=${encodeURIComponent(query)}&key=${API_KEY}&cx=${CX_ID}`;\n            try {\n                const response = await fetch(url);\n                const data = await response.json();\n                displayResults(data.items); \/\/ Display results on the page\n                sendToTawk(data.items); \/\/ Send results to Tawk.to\n            } catch (error) {\n                console.error(\"Error fetching search results:\", error);\n            }\n        }\n\n        \/\/ Display search results on the page\n        function displayResults(items) {\n            const resultsDiv = document.getElementById(\"results\");\n            resultsDiv.innerHTML = \"\"; \/\/ Clear previous results\n            if (items && items.length > 0) {\n                items.forEach(item => {\n                    const result = document.createElement(\"div\");\n                    result.innerHTML = `<h3><a href=\"${item.link}\" target=\"_blank\">${item.title}<\/a><\/h3>\n                                        <p>${item.snippet}<\/p>`;\n                    resultsDiv.appendChild(result);\n                });\n            } else {\n                resultsDiv.innerHTML = \"<p>No results found.<\/p>\";\n            }\n        }\n\n        \/\/ Send search results to Tawk.to\n        function sendToTawk(items) {\n            const results = items.map(item => `${item.title}: ${item.link}`).join(\"\\n\");\n            if (typeof Tawk_API !== \"undefined\") {\n                Tawk_API = Tawk_API || {};\n                Tawk_API.addEvent(\"custom-search-results\", {\n                    results: results\n                });\n            }\n        }\n    <\/script>\n<\/body><script>\n    \/\/ Tawk.to Integration\n    var Tawk_API = Tawk_API || {};\n    Tawk_API.onLoad = function () {\n        console.log(\"Tawk.to Widget Loaded!\");\n    };\n\n    \/\/ Custom Search and Integration Logic\n    const API_KEY = \"AIzaSyA1q0-OP4sZXmM143-HUcPX3Nq63qvVCIQ\"; \/\/ Replace with your API key\n    const CX_ID = \"a01cca32846d24c8b\"; \/\/ Replace with your Custom Search Engine ID\n\n    \/\/ Fetch search results from Google API\n    async function fetchResults(query) {\n        const url = `https:\/\/www.googleapis.com\/customsearch\/v1?q=${encodeURIComponent(query)}&key=${API_KEY}&cx=${CX_ID}`;\n        try {\n            const response = await fetch(url);\n            const data = await response.json();\n            displayResults(data.items); \/\/ Display results on the page\n            sendToTawk(data.items); \/\/ Send results to Tawk.to\n        } catch (error) {\n            console.error(\"Error fetching search results:\", error);\n            if (typeof Tawk_API !== \"undefined\") {\n                Tawk_API.addEvent(\"custom-search-results\", {\n                    results: \"An error occurred while fetching search results.\"\n                });\n            }\n        }\n    }\n\n    \/\/ Display search results on the page\n    function displayResults(items) {\n        const resultsDiv = document.getElementById(\"results\");\n        resultsDiv.innerHTML = \"\"; \/\/ Clear previous results\n        if (items && items.length > 0) {\n            items.forEach(item => {\n                const result = document.createElement(\"div\");\n                result.innerHTML = `<h3><a href=\"${item.link}\" target=\"_blank\">${item.title}<\/a><\/h3>\n                                    <p>${item.snippet}<\/p>`;\n                resultsDiv.appendChild(result);\n            });\n        } else {\n            resultsDiv.innerHTML = \"<p>No results found.<\/p>\";\n        }\n    }\n\n    \/\/ Send search results to Tawk.to\n    function sendToTawk(items) {\n        const results = items.map(item => `${item.title}: ${item.link}`).join(\"\\n\");\n        if (typeof Tawk_API !== \"undefined\") {\n            Tawk_API.addEvent(\"custom-search-results\", {\n                results: results\n            });\n        } else {\n            console.error(\"Tawk.to is not loaded or available.\");\n        }\n    }\n\n    \/\/ Listen for form submissions or search input\n    document.addEventListener(\"DOMContentLoaded\", function () {\n        const searchInput = document.querySelector(\".gcse-search input[name='q']\");\n        searchInput?.addEventListener(\"input\", (event) => {\n            const query = event.target.value;\n            if (query) {\n                fetchResults(query);\n            }\n        });\n    });\n<\/script>\n<p><strong>Please note:<\/strong> Synapse is an AI-powered support coach created by MadlySane.com\u00ae. Synapse\u00ae is not a licensed therapist and does not provide medical or crisis support. If you are in crisis or need immediate help, please contact a mental health professional or emergency services.<\/p>\n\n<\/html>\n\n\n\n<?php\n\/\/ Check if the current page is not the Synapse page\nif (!is_page('synapse-page')) {\n    ?>\n    <script src=\"\/\/code.tidio.co\/your-tidio-script.js\" async><\/script>\n    <?php\n}\n?>\n","protected":false},"excerpt":{"rendered":"<p>PsychQuery &#8211; Enhanced Experience Please note: Synapse is an AI-powered support coach created by MadlySane.com\u00ae. Synapse\u00ae is not a licensed therapist and does not provide medical or crisis support. If you are in crisis or need immediate help, please contact a mental health professional or emergency services.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-2320","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Search - MadlySane.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/madlysane.com\/en\/search\/\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:locale\" content=\"en_US\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:type\" content=\"article\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:title\" content=\"Search\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:description\" content=\"PsychQuery &#8211; Enhanced Experience Please note: Synapse is an AI-powered support coach created by MadlySane.com\u00ae. Synapse\u00ae is not a licensed therapist and does not provide medical or crisis support. If you are in crisis or need immediate help, please contact a mental health professional or emergency services.\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:url\" content=\"https:\/\/madlysane.com\/en\/search\/\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:site_name\" content=\"MadlySane.com\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-29T02:33:40+00:00\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" class=\"yoast-seo-meta-tag\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/madlysane.com\\\/search\\\/\",\"url\":\"https:\\\/\\\/madlysane.com\\\/search\\\/\",\"name\":\"Search - MadlySane.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#website\"},\"datePublished\":\"2025-04-01T00:54:28+00:00\",\"dateModified\":\"2025-12-29T02:33:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/madlysane.com\\\/search\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/madlysane.com\\\/search\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/madlysane.com\\\/search\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Search\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#website\",\"url\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/\",\"name\":\"MadlySane.com\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#organization\",\"name\":\"MadlySane.com LLC\",\"url\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/madlysane.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/profile_logo_e0516ebb-57a8-447d-9489-b48962f2e18e-2-e1753881599226.jpg\",\"contentUrl\":\"https:\\\/\\\/madlysane.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/profile_logo_e0516ebb-57a8-447d-9489-b48962f2e18e-2-e1753881599226.jpg\",\"width\":60,\"height\":60,\"caption\":\"MadlySane.com LLC\"},\"image\":{\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/madlysane.com\\\/yoast\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Search - MadlySane.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/madlysane.com\/en\/search\/","og_locale":"en_US","og_type":"article","og_title":"Search","og_description":"PsychQuery &#8211; Enhanced Experience Please note: Synapse is an AI-powered support coach created by MadlySane.com\u00ae. Synapse\u00ae is not a licensed therapist and does not provide medical or crisis support. If you are in crisis or need immediate help, please contact a mental health professional or emergency services.","og_url":"https:\/\/madlysane.com\/en\/search\/","og_site_name":"MadlySane.com","article_modified_time":"2025-12-29T02:33:40+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/madlysane.com\/search\/","url":"https:\/\/madlysane.com\/search\/","name":"Search - MadlySane.com","isPartOf":{"@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#website"},"datePublished":"2025-04-01T00:54:28+00:00","dateModified":"2025-12-29T02:33:40+00:00","breadcrumb":{"@id":"https:\/\/madlysane.com\/search\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/madlysane.com\/search\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/madlysane.com\/search\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/"},{"@type":"ListItem","position":2,"name":"Search"}]},{"@type":"WebSite","@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#website","url":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/","name":"MadlySane.com","description":"","publisher":{"@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#organization","name":"MadlySane.com LLC","url":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#\/schema\/logo\/image\/","url":"https:\/\/madlysane.com\/wp-content\/uploads\/2025\/05\/profile_logo_e0516ebb-57a8-447d-9489-b48962f2e18e-2-e1753881599226.jpg","contentUrl":"https:\/\/madlysane.com\/wp-content\/uploads\/2025\/05\/profile_logo_e0516ebb-57a8-447d-9489-b48962f2e18e-2-e1753881599226.jpg","width":60,"height":60,"caption":"MadlySane.com LLC"},"image":{"@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/madlysane.com\/yoast"]}]}},"jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/pages\/2320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/comments?post=2320"}],"version-history":[{"count":5,"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/pages\/2320\/revisions"}],"predecessor-version":[{"id":6958,"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/pages\/2320\/revisions\/6958"}],"wp:attachment":[{"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/media?parent=2320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}