{"id":2722,"date":"2022-08-09T20:47:44","date_gmt":"2022-08-09T15:47:44","guid":{"rendered":"https:\/\/www.edopedia.com\/blog\/?p=2722"},"modified":"2022-08-09T20:47:46","modified_gmt":"2022-08-09T15:47:46","slug":"python-elasticsearch-autocomplete-input-example-source-code","status":"publish","type":"post","link":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/","title":{"rendered":"Python Elasticsearch Autocomplete Input Example Source Code"},"content":{"rendered":"\n<p>In this tutorial, you&#8217;ll learn how to create an autocomplete functionality for search engines. Just like Google or Bing has implemented on their websites.<\/p>\n\n\n\n<p>The frontend is developed using Python Flask and HTML5 whereas the backend is powered by Elasticsearch.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Folder Structure<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Backend<\/strong><ul><li>api.py<\/li><\/ul><\/li><li><strong>Frontend<\/strong><ul><li><strong>templates<\/strong><ul><li>home.html<\/li><\/ul><\/li><li>app.py<\/li><\/ul><\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Backend\/api.py<\/h2>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">try:\n    from flask import app,Flask\n    from flask_restful import Resource, Api, reqparse\n    import elasticsearch\n    from elasticsearch import Elasticsearch\n    import datetime\n    import concurrent.futures\n    import requests\n    import json\nexcept Exception as e:\n    print(&quot;Modules Missing {}&quot;.format(e))\n\n\napp = Flask(__name__)\napi = Api(app)\n\n#------------------------------------------------------------------------------------------------------------\n\nNODE_NAME = 'myelkfirst'\nes = Elasticsearch([{'host': 'localhost', 'port': 9200}])\n\n#------------------------------------------------------------------------------------------------------------\n\n\n&quot;&quot;&quot;\n{\n&quot;wildcard&quot;: {\n    &quot;title&quot;: {\n        &quot;value&quot;: &quot;{}*&quot;.format(self.query)\n    }\n}\n}\n\n&quot;&quot;&quot;\n\n\nclass Controller(Resource):\n    def __init__(self):\n        self.query = parser.parse_args().get(&quot;query&quot;, None)\n        self.baseQuery ={\n            &quot;_source&quot;: [],\n            &quot;size&quot;: 0,\n            &quot;min_score&quot;: 0.5,\n            &quot;query&quot;: {\n                &quot;bool&quot;: {\n                    &quot;must&quot;: [\n                        {\n                            &quot;match_phrase_prefix&quot;: {\n                                &quot;title&quot;: {\n                                    &quot;query&quot;: &quot;{}&quot;.format(self.query)\n                                }\n                            }\n                        }\n                    ],\n                    &quot;filter&quot;: [],\n                    &quot;should&quot;: [],\n                    &quot;must_not&quot;: []\n                }\n            },\n            &quot;aggs&quot;: {\n                &quot;auto_complete&quot;: {\n                    &quot;terms&quot;: {\n                        &quot;field&quot;: &quot;title.keyword&quot;,\n                        &quot;order&quot;: {\n                            &quot;_count&quot;: &quot;desc&quot;\n                        },\n                        &quot;size&quot;: 25\n                    }\n                }\n            }\n        }\n\n    def get(self):\n        res = es.search(index=NODE_NAME, size=0, body=self.baseQuery)\n        return res\n\n\nparser = reqparse.RequestParser()\nparser.add_argument(&quot;query&quot;, type=str, required=True, help=&quot;query parameter is Required &quot;)\n\napi.add_resource(Controller, '\/autocomplete')\n\n\nif __name__ == '__main__':\n    app.run(debug=True, port=4000)<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Frontend\/templates\/home.html<\/h2>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;\n&lt;head&gt;\n\n    &lt;title&gt;&lt;\/title&gt;\n\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.3.1\/css\/bootstrap.min.css&quot; integrity=&quot;sha384-ggOyR0iXCbMQv3Xipma34MD+dH\/1fQ784\/j6cY\/iJTQUOhcWr7x9JvoRxT2MZw1T&quot; crossorigin=&quot;anonymous&quot;&gt;\n\n    &lt;script src=&quot;https:\/\/code.jquery.com\/jquery-3.3.1.slim.min.js&quot; integrity=&quot;sha384-q8i\/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;\/script&gt;\n    &lt;script src=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/popper.js\/1.14.7\/umd\/popper.min.js&quot; integrity=&quot;sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;\/script&gt;\n    &lt;script src=&quot;https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.3.1\/js\/bootstrap.min.js&quot; integrity=&quot;sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf\/nJGzIxFDsf4x0xIM+B07jRM&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;\/script&gt;\n\n    &lt;script src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.4.1\/jquery.min.js&quot;&gt;&lt;\/script&gt;\n\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;\/\/code.jquery.com\/ui\/1.12.1\/themes\/base\/jquery-ui.css&quot;&gt;\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;\/resources\/demos\/style.css&quot;&gt;\n    &lt;script src=&quot;https:\/\/code.jquery.com\/jquery-1.12.4.js&quot;&gt;&lt;\/script&gt;\n    &lt;script src=&quot;https:\/\/code.jquery.com\/ui\/1.12.1\/jquery-ui.js&quot;&gt;&lt;\/script&gt;\n&lt;body&gt;\n\n&lt;div style=&quot;height: 55vh;&quot; class=&quot;jumbotron ui-widget&quot;&gt;\n    &lt;h4 style=&quot;text-align: center;padding: 20px;&quot;&gt;Search as you Type with Elastic Search&lt;\/h4&gt;\n    &lt;div style=&quot;position:absolute; left: 40%;top: 30%&quot;&gt;\n        &lt;input id=&quot;source&quot; \/&gt;\n        &lt;div id=&quot;result&quot;&gt;&lt;\/div&gt;\n        &lt;a onclick=&quot;btn_submit()&quot; style=&quot;position: absolute; top: 0%;left: 120%&quot; class=&quot;btn btn-primary&quot;&gt;Submit&lt;\/a&gt;\n    &lt;\/div&gt;\n&lt;\/div&gt;s\n\n\n&lt;script&gt;\n    const $source = document.querySelector('#source');\n    const $result = document.querySelector('#result');\n\n    const typeHandler = function(e) {\n        $result.innerHTML = e.target.value;\n        console.log(e.target.value);\n\n        $.ajax({\n            url: &quot;\/pipe&quot;,\n            type : 'POST',\n            cache: false,\n            data:{'data': e.target.value},\n            success: function(html)\n            {\n                console.log(html)\n                var data = html.aggregations.auto_complete.buckets\n                var _ = []\n\n                $.each(data, (index, value)=&gt;{\n                    _.push(value.key)\n                });\n                console.log(_)\n                $( &quot;#source&quot; ).autocomplete({\n                    source: _\n                });\n            }\n        });\n    }\n\n    $source.addEventListener('input', typeHandler) \/\/ register for oninput\n    $source.addEventListener('propertychange', typeHandler) \/\/ for IE8\n\n    function btn_submit()\n    {\n        sessionStorage.setItem('title', $(&quot;#source&quot;).val() )\n    }\n\n\n    $( document ).ready(function() {\n\n        var data = sessionStorage.getItem('title')\n        $(&quot;#source&quot;).val(data);\n    });\n\n\n\n&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Frontend\/app.py<\/h2>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">from flask import Flask\nfrom flask import request,redirect,render_template,session\nimport requests\nimport base64\nimport requests\n\napp = Flask(__name__)\n\n\n@app.route('\/', methods=[&quot;GET&quot;, &quot;POST&quot;])\ndef index():\n    return render_template(&quot;home.html&quot;)\n\n\n@app.route('\/pipe', methods=[&quot;GET&quot;, &quot;POST&quot;])\ndef pipe():\n    data = request.form.get(&quot;data&quot;)\n    payload = {}\n    headers= {}\n    url = &quot;http:\/\/127.0.0.1:4000\/autocomplete?query=&quot;+str(data)\n    response = requests.request(&quot;GET&quot;, url, headers=headers, data = payload)\n    return response.json()\n\n\n\nif __name__ == &quot;__main__&quot;:\n    app.run(debug=True, port=5000)<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you&#8217;ll learn how to create an autocomplete functionality for search engines. Just like Google or Bing has implemented on their websites. The frontend is developed using Python Flask and HTML5 whereas the backend is powered by Elasticsearch. Folder Structure Backend api.py Frontend templates home.html app.py Backend\/api.py Frontend\/templates\/home.html Frontend\/app.py<\/p>\n","protected":false},"author":1,"featured_media":2728,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[112],"tags":[],"class_list":["post-2722","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Elasticsearch Autocomplete Input Example Source Code<\/title>\n<meta name=\"description\" content=\"In this tutorial, you&#039;ll learn how to create an autocomplete functionality for search engines. Just like Google or Bing has implemented on their websites.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Elasticsearch Autocomplete Input Example Source Code\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you&#039;ll learn how to create an autocomplete functionality for search engines. Just like Google or Bing has implemented on their websites.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Edopedia\" \/>\n<meta property=\"article:author\" content=\"trulyfurqan\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-09T15:47:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-09T15:47:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/08\/Python_Elasticsearch_Autocomplete_Input.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"880\" \/>\n\t<meta property=\"og:image:height\" content=\"495\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Furqan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Furqan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Elasticsearch Autocomplete Input Example Source Code","description":"In this tutorial, you'll learn how to create an autocomplete functionality for search engines. Just like Google or Bing has implemented on their websites.","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:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/","og_locale":"en_US","og_type":"article","og_title":"Python Elasticsearch Autocomplete Input Example Source Code","og_description":"In this tutorial, you'll learn how to create an autocomplete functionality for search engines. Just like Google or Bing has implemented on their websites.","og_url":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/","og_site_name":"Edopedia","article_author":"trulyfurqan","article_published_time":"2022-08-09T15:47:44+00:00","article_modified_time":"2022-08-09T15:47:46+00:00","og_image":[{"width":880,"height":495,"url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/08\/Python_Elasticsearch_Autocomplete_Input.jpg","type":"image\/jpeg"}],"author":"Furqan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Furqan","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/#article","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/"},"author":{"name":"Furqan","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339"},"headline":"Python Elasticsearch Autocomplete Input Example Source Code","datePublished":"2022-08-09T15:47:44+00:00","dateModified":"2022-08-09T15:47:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/"},"wordCount":68,"commentCount":0,"publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/08\/Python_Elasticsearch_Autocomplete_Input.jpg","articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/","url":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/","name":"Python Elasticsearch Autocomplete Input Example Source Code","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/#primaryimage"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/08\/Python_Elasticsearch_Autocomplete_Input.jpg","datePublished":"2022-08-09T15:47:44+00:00","dateModified":"2022-08-09T15:47:46+00:00","description":"In this tutorial, you'll learn how to create an autocomplete functionality for search engines. Just like Google or Bing has implemented on their websites.","breadcrumb":{"@id":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/#primaryimage","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/08\/Python_Elasticsearch_Autocomplete_Input.jpg","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/08\/Python_Elasticsearch_Autocomplete_Input.jpg","width":880,"height":495,"caption":"Python Elasticsearch Autocomplete Input Example Source Code"},{"@type":"BreadcrumbList","@id":"https:\/\/www.edopedia.com\/blog\/python-elasticsearch-autocomplete-input-example-source-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.edopedia.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Python Elasticsearch Autocomplete Input Example Source Code"}]},{"@type":"WebSite","@id":"https:\/\/www.edopedia.com\/blog\/#website","url":"https:\/\/www.edopedia.com\/blog\/","name":"Edopedia","description":"Coding\/Programming Blog","publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.edopedia.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.edopedia.com\/blog\/#organization","name":"Edopedia","url":"https:\/\/www.edopedia.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2017\/10\/edopedia_icon_text_10.jpg","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2017\/10\/edopedia_icon_text_10.jpg","width":400,"height":100,"caption":"Edopedia"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339","name":"Furqan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","caption":"Furqan"},"description":"Well. I've been working for the past three years as a web designer and developer. I have successfully created websites for small to medium sized companies as part of my freelance career. During that time I've also completed my bachelor's in Information Technology.","sameAs":["http:\/\/www.edopedia.com\/blog\/","trulyfurqan"],"url":"https:\/\/www.edopedia.com\/blog\/author\/furqan\/"}]}},"_links":{"self":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/2722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/comments?post=2722"}],"version-history":[{"count":0,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/2722\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media\/2728"}],"wp:attachment":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media?parent=2722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/categories?post=2722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/tags?post=2722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}