{"id":15340,"date":"2012-10-29T23:01:59","date_gmt":"2012-10-29T15:01:59","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=15340"},"modified":"2025-04-04T01:13:47","modified_gmt":"2025-04-03T17:13:47","slug":"instagram-photo-search","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/","title":{"rendered":"Build Your Own Instagram  Search Engine Using jQuery and PHP"},"content":{"rendered":"<p>Ever since Google introduced instant search features, they have become a popular trend in web design. These techniques are straightforward enough that even web developers with moderate jQuery skills can master programming APIs and JSON data.<\/p>\n<p>In this tutorial, I\u2019ll show you <strong>how to create an instant search web application<\/strong> similar to Google\u2019s. However, instead of sourcing images from Google, we\u2019ll tap into <a href=\"https:\/\/www.instagram.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Instagram<\/a> \u2013 a platform that has seen exponential growth in just a few years.<\/p>\n<p>Instagram began as an iOS mobile app, allowing users to snap photos, engage with friends via comments, and share their creations on third-party networks like Flickr. After being <a href=\"https:\/\/venturebeat.com\/2012\/04\/09\/facebook-buys-instagram\/\" rel=\"nofollow noopener\" target=\"_blank\">acquired by Facebook<\/a>, Instagram expanded with a new app for Android, significantly growing its user base. Now, developers have the opportunity to create incredible mini-apps, such as the instasearch demo we will explore.<\/p>\n<p><a href=\"https:\/\/hongkiat.github.io\/instagram-photo-search\/\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i> View demo<\/span><\/a>\n<a href=\"https:\/\/github.com\/hongkiat\/instagram-photo-search\/\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i> Download source<\/span><\/a><\/p>\n<h2>Getting Started with Instagram API Credentials<\/h2>\n<p>Before diving into project files, it\u2019s crucial to understand the basics of the Instagram API. You\u2019ll need to create an account at the <a href=\"https:\/\/developers.facebook.com\/docs\/instagram\" rel=\"nofollow noopener\" target=\"_blank\">developer\u2019s portal<\/a>, which provides helpful guides for beginners. To access the Instagram database, the key piece of information we need is a \u201cClient ID\u201d.<\/p>\n<p>In the top toolbar, click on the <a href=\"https:\/\/developers.facebook.com\/docs\/instagramclients\/manage\/\" rel=\"nofollow noopener\" target=\"_blank\">Manage Clients<\/a> link, then select the green \u201cRegister a New Client\u201d button. You\u2019ll need to enter a name for your application, a brief description, and a website URL. In this scenario, the URL and Redirect URI can be the same because user authentication isn\u2019t required. Just complete the form to generate your new application details.<\/p>\n<p>You\u2019ll receive a long string of characters known as the <strong>CLIENT ID<\/strong>. Keep this key handy, as it will be vital when we start coding the backend script. For now, let\u2019s start building our jQuery instant search application.<\/p>\n<h2>Setting Up the Default Webpage<\/h2>\n<p>The actual HTML of our project is quite minimal considering the functionality we aim to achieve. Since most of the image data is appended dynamically, only a few HTML elements are necessary. Below is the code located in the <code>index.html<\/code> file:<\/p>\n<pre>\r\n&lt;!doctype html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\"&gt;\r\n&lt;title&gt;Instagram Photo Instant Search App with jQuery&lt;\/title&gt;\r\n&lt;meta name=\"author\" content=\"Jake Rocheleau\"&gt;\r\n&lt;link rel=\"stylesheet\" type=\"text\/css\" href=\"style.css\"&gt;\r\n&lt;script type=\"text\/javascript\" src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.7.2\/jquery.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script type=\"text\/javascript\" src=\"ajax.js\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n\r\n&lt;body&gt;\r\n&lt;div id=\"w\"&gt;\r\n&lt;section id=\"sform\"&gt;\r\n&lt;small&gt;Note: No spaces or punctuation allowed. Searches are limited to one(1) keyword.&lt;\/small&gt;\r\n&lt;input type=\"text\" id=\"s\" name=\"s\" class=\"sfield\" placeholder=\"Enter a search tag...\" autocomplete=\"off\"&gt;\r\n&lt;\/section&gt;\r\n\r\n&lt;section id=\"photos\"&gt;&lt;\/section&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>I am utilizing jQuery 1.7.2, along with external CSS and JS files. The search field does not have a surrounding form element to avoid page reloads upon submission. I have also disabled certain keystrokes within the search field to limit user input errors. The photo data will be dynamically inserted into the <strong>#photos<\/strong> section, maintaining our page\u2019s clean and readable layout.<\/p>\n<h2>Connecting to the Instagram API<\/h2>\n<p>Let\u2019s begin by setting up our dynamic PHP script before moving on to jQuery. Our script, named <code>instasearch.php<\/code>, will manage the critical backend interactions with the API.<\/p>\n<pre>\r\n&lt;?php\r\nheader('Content-type: application\/json');\r\n\r\n$client = \"YOURCLIENTIDHERE\";\r\n$query = $_POST['q'];\r\n$api = \"https:\/\/api.instagram.com\/v1\/tags\/\".$query.\"\/media\/recent?client_id=\".$client;\r\n\r\nfunction get_curl($url) {\r\n    if (function_exists('curl_init')) {\r\n        $ch = curl_init();\r\n        curl_setopt($ch, CURLOPT_URL, $url);\r\n        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n        curl_setopt($ch, CURLOPT_HEADER, 0);\r\n        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\r\n        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); \r\n        $output = curl_exec($ch);\r\n        echo curl_error($ch);\r\n        curl_close($ch);\r\n        return $output;\r\n    } else {\r\n        return file_get_contents($url);\r\n    }\r\n}\r\n<\/pre>\n<p>The script begins by setting the output as JSON, which is essential for the JavaScript functions to interpret the data correctly. It includes variables for the application client ID, user search input, and the API endpoint. Remember to replace the <code>$client<\/code> string with your actual client ID.<\/p>\n<p>To retrieve data from this API, we either parse the content with a custom function <code>get_curl()<\/code> or use <a href=\"https:\/\/www.php.net\/manual\/en\/book.curl.php\" rel=\"nofollow noopener\" target=\"_blank\">cURL functions<\/a>. The <code>get_curl()<\/code> function checks if cURL is enabled in the PHP configuration and uses it to fetch data. If cURL is not available, it falls back to <a href=\"https:\/\/www.php.net\/manual\/en\/function.file-get-contents.php\" rel=\"nofollow noopener\" target=\"_blank\">file_get_contents()<\/a>, which is slower but equally effective.<\/p>\n<pre>$response = get_curl($api);\r\n<\/pre>\n<h2>Streamlining Data Organization & Retrieval<\/h2>\n<p>While we could simply return the raw JSON data received from Instagram, it often contains excess information that complicates data handling. Instead, I prefer to streamline the Ajax response by extracting only the essential data.<\/p>\n<p>Initially, we set up an empty array to hold image data. Using a <code>foreach()<\/code> loop, we extract three specific values from the JSON objects: <strong>$src<\/strong> (the URL of the full-size image), <strong>$thumb<\/strong> (the URL for the thumbnail image), and <strong>$url<\/strong> (the unique photo permalink).<\/p>\n<pre>$images = array();\r\nif($response){\r\n    foreach(json_decode($response)->data as $item){ \r\n        $src = $item->images->standard_resolution->url;\r\n        $thumb = $item->images->thumbnail->url;\r\n        $url = $item->link;\r\n        \r\n        $images[] = array(\r\n            \"src\" => htmlspecialchars($src),\r\n            \"thumb\" => htmlspecialchars($thumb),\r\n            \"url\" => htmlspecialchars($url)\r\n        );\r\n    }\r\n}\r\n<\/pre>\n<p>If PHP loops are new to you, don\u2019t worry if the syntax seems complex. We\u2019ll store between 16-20 unique photo entries in our array, based on their recent publication dates, and then we can display these images via a jQuery Ajax response on the webpage.<\/p>\n<pre>print_r(str_replace('\\\\\/', '\/', json_encode($images)));\r\ndie();\r\n<\/pre>\n<p>With this backend setup complete, let\u2019s turn our attention to the frontend scripting. I\u2019ve prepared an <strong>ajax.js<\/strong> file with several event handlers linked to the search field. Stay tuned as we\u2019re nearing the completion of our project!<\/p>\n<h2>Handling jQuery Key Events<\/h2>\n<p>Upon loading the document, the <code>ready()<\/code> function initializes several variables. These include direct selectors for the search field and the photos container, as well as a JavaScript timer to delay the search query until 900 milliseconds after the user has stopped typing.<\/p>\n<pre>$(document).ready(function(){\r\n    var sfield = $(\"#s\");\r\n    var container = $(\"#photos\");\r\n    var timer;\r\n<\/pre>\n<p>We manage input with two main functions. The first function is activated by a <a href=\"https:\/\/api.jquery.com\/keydown\/\" rel=\"nofollow noopener\" target=\"_blank\">.keydown()<\/a> event when the user interacts with the search field. It checks if the input key is restricted, blocking the event if necessary. If the key is permissible, the default timer is cleared, and a new one is set to activate the <code>instaSearch()<\/code> function after a 900ms delay.<\/p>\n<pre>\/** \r\nkeycode glossary \r\n32 = SPACE\r\n188 = COMMA\r\n189 = DASH\r\n190 = PERIOD\r\n191 = BACKSLASH\r\n13 = ENTER\r\n219 = LEFT BRACKET\r\n220 = FORWARD SLASH\r\n221 = RIGHT BRACKET\r\n*\/\r\n$(sfield).keydown(function(e){\r\n    if(e.keyCode == '32' || e.keyCode == '188' || e.keyCode == '189' || e.keyCode == '13' || e.keyCode == '190' || e.keyCode == '219' || e.keyCode == '221' || e.keyCode == '191' || e.keyCode == '220') {\r\n        e.preventDefault();\r\n    } else {\r\n        clearTimeout(timer);\r\n        \r\n        timer = setTimeout(function() {\r\n            instaSearch();\r\n        }, 900); \r\n    }\r\n});\r\n<\/pre>\n<p>This setup ensures that each new input automatically triggers a search for fresh results. We\u2019ve chosen not to block additional key codes to keep the tutorial concise.<\/p>\n<h2>Enhancing the Ajax instaSearch() Function<\/h2>\n<p>In this custom function, we start by adding a \u201cloading\u201d class to the search field, updating the camera icon to a new loading GIF. It\u2019s also essential to clear any leftover data in the photos section. The query variable is dynamically retrieved from the value entered in the search field.<\/p>\n<pre>function instaSearch() {\r\n    $(sfield).addClass(\"loading\");\r\n    $(container).empty();\r\n    var q = $(sfield).val();\r\n    \r\n    $.ajax({\r\n        type: 'POST',\r\n        url: 'instasearch.php',\r\n        data: \"q=\"+q,\r\n        success: function(data){\r\n            $(sfield).removeClass(\"loading\");\r\n            \r\n            $.each(data, function(i, item) {\r\n                var ncode = '&lt;div class=\"p\"&gt;&lt;a href=\"'+data[i].src+'\" class=\"fullsize\"&gt;&lt;img src=\"img\/full-image.png\" alt=\"fullsize\"&gt;&lt;\/a&gt; &lt;a href=\"'+data[i].url+'\"&gt;&lt;img src=\"'+data[i].thumb+'\" alt=\"thumbnail\"&gt;&lt;\/a&gt;&lt;\/div&gt;';\r\n                $(container).append(ncode);\r\n            });\r\n        },\r\n        error: function(xhr, type, exception) { \r\n            $(sfield).removeClass(\"loading\");\r\n            $(container).html(\"Error: \" + type); \r\n        }\r\n    });\r\n}\r\n<\/pre>\n<p>If you\u2019re acquainted with jQuery\u2019s <a href=\"https:\/\/api.jquery.com\/jQuery.ajax\/\" rel=\"nofollow noopener\" target=\"_blank\">.ajax() function<\/a>, these parameters will look familiar. We pass the user\u2019s search term \u201cq\u201d as POST data. Both success and failure handlers remove the \u201cloading\u201d class and manage the response in the <strong>#photos<\/strong> section.<\/p>\n<p>Within the success handler, we loop through the JSON data to create individual div elements using the <a href=\"https:\/\/api.jquery.com\/jQuery.each\/\" rel=\"nofollow noopener\" target=\"_blank\">$.each() function<\/a>, targeting our response data array. The error handler straightforwardly displays any response errors from the API.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/instagram-photo-search\/instasearch-app-demo-preview-screenshot.jpg\" alt=\"Live Instant Search Web App for Instagram Photos\" width=\"500\" height=\"400\"><\/figure>\n<p><a href=\"https:\/\/hongkiat.github.io\/instagram-photo-search\/\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i> View demo<\/span><\/a>\n<a href=\"https:\/\/github.com\/hongkiat\/instagram-photo-search\/\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i> Download source<\/span><\/a><\/p>\n<h2>Concluding Insights<\/h2>\n<p>The Instagram team has excelled at scaling their application impressively. Although the API can occasionally be slow, the data is always well-formatted and straightforward to handle. This tutorial showcases the robust capabilities available when leveraging third-party applications.<\/p>\n<p>Currently, Instagram search limits queries to a single tag, which is a restriction for our demo, but it doesn\u2019t diminish its appeal. Explore the live example above and download the source code to experiment further. We\u2019d love to hear your thoughts in the post discussion area below.<\/p>","protected":false},"excerpt":{"rendered":"<p>Ever since Google introduced instant search features, they have become a popular trend in web design. These techniques are straightforward enough that even web developers with moderate jQuery skills can master programming APIs and JSON data. In this tutorial, I\u2019ll show you how to create an instant search web application similar to Google\u2019s. However, instead&hellip;<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[4651],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Instagram Photo Search Engine With JQuery And PHP [Tutorial]<\/title>\n<meta name=\"description\" content=\"Ever since Google introduced instant search features, they have become a popular trend in web design. These techniques are straightforward enough that\" \/>\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.hongkiat.com\/blog\/instagram-photo-search\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build Your Own Instagram Search Engine Using jQuery and PHP\" \/>\n<meta property=\"og:description\" content=\"Ever since Google introduced instant search features, they have become a popular trend in web design. These techniques are straightforward enough that\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2012-10-29T15:01:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-03T17:13:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/instagram-photo-search\/instasearch-app-demo-preview-screenshot.jpg\" \/>\n<meta name=\"author\" content=\"Jake Rocheleau\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jake Rocheleau\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/\"},\"author\":{\"name\":\"Jake Rocheleau\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/966b2daea15283b4145e71aa98a82c2a\"},\"headline\":\"Build Your Own Instagram Search Engine Using jQuery and PHP\",\"datePublished\":\"2012-10-29T15:01:59+00:00\",\"dateModified\":\"2025-04-03T17:13:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/\"},\"wordCount\":1181,\"commentCount\":17,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/instagram-photo-search\\\/instasearch-app-demo-preview-screenshot.jpg\",\"keywords\":[\"Instagram Tips and Tools\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/\",\"name\":\"Instagram Photo Search Engine With JQuery And PHP [Tutorial]\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/instagram-photo-search\\\/instasearch-app-demo-preview-screenshot.jpg\",\"datePublished\":\"2012-10-29T15:01:59+00:00\",\"dateModified\":\"2025-04-03T17:13:47+00:00\",\"description\":\"Ever since Google introduced instant search features, they have become a popular trend in web design. These techniques are straightforward enough that\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/instagram-photo-search\\\/instasearch-app-demo-preview-screenshot.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/instagram-photo-search\\\/instasearch-app-demo-preview-screenshot.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/instagram-photo-search\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Build Your Own Instagram Search Engine Using jQuery and PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/966b2daea15283b4145e71aa98a82c2a\",\"name\":\"Jake Rocheleau\",\"description\":\"Jake is a writer and designer with over 10 years experience working on the web. He writes about user experience design and cool resources for designers\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/jake\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Instagram Photo Search Engine With JQuery And PHP [Tutorial]","description":"Ever since Google introduced instant search features, they have become a popular trend in web design. These techniques are straightforward enough that","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.hongkiat.com\/blog\/instagram-photo-search\/","og_locale":"en_US","og_type":"article","og_title":"Build Your Own Instagram Search Engine Using jQuery and PHP","og_description":"Ever since Google introduced instant search features, they have become a popular trend in web design. These techniques are straightforward enough that","og_url":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2012-10-29T15:01:59+00:00","article_modified_time":"2025-04-03T17:13:47+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/instagram-photo-search\/instasearch-app-demo-preview-screenshot.jpg","type":"","width":"","height":""}],"author":"Jake Rocheleau","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Jake Rocheleau","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/"},"author":{"name":"Jake Rocheleau","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/966b2daea15283b4145e71aa98a82c2a"},"headline":"Build Your Own Instagram Search Engine Using jQuery and PHP","datePublished":"2012-10-29T15:01:59+00:00","dateModified":"2025-04-03T17:13:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/"},"wordCount":1181,"commentCount":17,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/instagram-photo-search\/instasearch-app-demo-preview-screenshot.jpg","keywords":["Instagram Tips and Tools"],"articleSection":["Coding"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/","url":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/","name":"Instagram Photo Search Engine With JQuery And PHP [Tutorial]","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/instagram-photo-search\/instasearch-app-demo-preview-screenshot.jpg","datePublished":"2012-10-29T15:01:59+00:00","dateModified":"2025-04-03T17:13:47+00:00","description":"Ever since Google introduced instant search features, they have become a popular trend in web design. These techniques are straightforward enough that","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/instagram-photo-search\/instasearch-app-demo-preview-screenshot.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/instagram-photo-search\/instasearch-app-demo-preview-screenshot.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Build Your Own Instagram Search Engine Using jQuery and PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/966b2daea15283b4145e71aa98a82c2a","name":"Jake Rocheleau","description":"Jake is a writer and designer with over 10 years experience working on the web. He writes about user experience design and cool resources for designers","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/jake\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-3Zq","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/15340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=15340"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/15340\/revisions"}],"predecessor-version":[{"id":73553,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/15340\/revisions\/73553"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=15340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=15340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=15340"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=15340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}