{"id":94,"date":"2019-01-19T17:02:33","date_gmt":"2019-01-19T17:02:33","guid":{"rendered":"http:\/\/www.countingcharacters.com\/blog\/?p=94"},"modified":"2022-01-16T07:39:31","modified_gmt":"2022-01-16T07:39:31","slug":"google-sheets-importxml","status":"publish","type":"post","link":"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/","title":{"rendered":"ImportXML Google Sheets &#8211; Syntax, Examples &#038; How to Use?"},"content":{"rendered":"\n<p>There are millions of users from the world that use Google Sheets daily but, they are not aware of all the functions that Google Spreadsheet have. From those functions, ImportXML is a very unique function that we will discuss in this blog. So first, we should understand what is ImportXML function and what we can do with this function?<\/p>\n<h2>What is the Google Sheets ImportXML Function?<\/h2>\n<p>It is the pre-built function of Google Sheets that used to retrieve data in the structured data. It has two parameters, first is URL and second is XPath query. In the first parameter, you have to provide the URL in the double quotes and in a second parameter, you have to add XPath query in double quotes.<\/p><\/br>\n<h3>Syntax of ImportXML<\/h3>\n<pre><code>=IMPORTXML(url, xpath_query)<\/code><\/pre>\n<h2>How to Use Google Sheets ImportXML?<\/h2>\n<p>You can use this function to extract any piece of information available publicly. Like Wikipedia Page or any other web page.<\/p>\n<h2>Google Sheets ImportXML Examples<\/h2>\n<h3>1. Extract Page Title From URLs Using ImportXML<\/h3>\n<p>Suppose, If you have a situation where you need a Page TItle of multiple URLs, so how long will run this task? I think it will take \u2153 of your whole day \ud83d\ude42<\/p>\n<p>To overcome this situation, you can use ImportXML function. Have a look at the brief example below:<\/p>\n<p>Examples of URLs:<\/p>\n<p>http:\/\/www.countingcharacters.com<br \/>http:\/\/www.countingcharacters.com\/google-serp-tool<br \/>http:\/\/www.countingcharacters.com\/image-compressor-online<\/p>\n<pre><code>=IMPORTXML(\"http:\/\/www.countingcharacters.com\" , \"\/\/title\")<\/code><\/pre>\n<p>Or, you can also refer a cell in the first parameter<\/p>\n<pre><code>=IMPORTXML(A1,\"\/\/title\")<\/code><\/pre>\n<p><strong>Output:<\/strong> Online Character, Letter &amp; Word Count Tool &#8211; Counting Characters<\/p>\n<blockquote>\n<p><strong>Recommended Tool: <a href=\"https:\/\/www.countingcharacters.com\/google-serp-tool\" target=\"_blank\" rel=\"noopener noreferrer\">Meta Description Length Checker<\/a><\/strong><\/p>\n<\/blockquote>\n<p><\/p>\n<h3>2. Extract H1 Tag<\/h3>\n<p>To extract H1 tag content, you have to follow the same procedure as discussed above<\/p>\n<pre><code>=IMPORTXML(\"http:\/\/www.countingcharacters.com\" , \"\/\/h1\")<\/code><\/pre>\n<p><strong>Output:<\/strong> Character and Word Count Tool Online<\/p>\n<p>To explore more examples, <b>click on the below button<\/b> and make a copy of Google Spreadsheet that has lots of ImportXML examples.<\/p>\n<p><a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/110G9kVEZbSc-ejTM2WOFlMN5BK_Ja6O7YlfHPzMlOkg\/copy\"><button>Make Copy of IMPORTXML Google Sheet<\/button><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are millions of users from the world that use Google Sheets daily but, they are not aware of all the functions that Google Spreadsheet have. From those functions, ImportXML is a very unique function that we will discuss in this blog. So first, we should understand what is ImportXML function and what we can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":101,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[6,5,7],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ImportXML Google Sheets - Syntax, Examples &amp; How to Use?<\/title>\n<meta name=\"description\" content=\"Learn about the Google Sheets&#039; ImportXML function. You can use this function to extract H1 tag, Page Title &amp; more. Check ImportXML&#039; syntax &amp; examples.\" \/>\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.countingcharacters.com\/blog\/google-sheets-importxml\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ImportXML Google Sheets - Syntax, Examples &amp; How to Use?\" \/>\n<meta property=\"og:description\" content=\"Learn about the Google Sheets&#039; ImportXML function. You can use this function to extract H1 tag, Page Title &amp; more. Check ImportXML&#039; syntax &amp; examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Counting Characters\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-19T17:02:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-16T07:39:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.countingcharacters.com\/blog\/wp-content\/uploads\/2019\/01\/google-sheets-importxml.png\" \/>\n\t<meta property=\"og:image:width\" content=\"761\" \/>\n\t<meta property=\"og:image:height\" content=\"386\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mohit Harjai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.countingcharacters.com\/blog\/#website\",\"url\":\"https:\/\/www.countingcharacters.com\/blog\/\",\"name\":\"Blog - Counting Characters\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.countingcharacters.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.countingcharacters.com\/blog\/wp-content\/uploads\/2019\/01\/google-sheets-importxml.png\",\"contentUrl\":\"https:\/\/www.countingcharacters.com\/blog\/wp-content\/uploads\/2019\/01\/google-sheets-importxml.png\",\"width\":761,\"height\":386,\"caption\":\"Google Sheets Importxml\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/#webpage\",\"url\":\"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/\",\"name\":\"ImportXML Google Sheets - Syntax, Examples & How to Use?\",\"isPartOf\":{\"@id\":\"https:\/\/www.countingcharacters.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/#primaryimage\"},\"datePublished\":\"2019-01-19T17:02:33+00:00\",\"dateModified\":\"2022-01-16T07:39:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.countingcharacters.com\/blog\/#\/schema\/person\/42edab7be3c3c5054649c5ff3c234b5f\"},\"description\":\"Learn about the Google Sheets' ImportXML function. You can use this function to extract H1 tag, Page Title & more. Check ImportXML' syntax & examples.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.countingcharacters.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ImportXML Google Sheets &#8211; Syntax, Examples &#038; How to Use?\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.countingcharacters.com\/blog\/#\/schema\/person\/42edab7be3c3c5054649c5ff3c234b5f\",\"name\":\"Mohit Harjai\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.countingcharacters.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5e9de236da67b39efeabc42863395e36?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5e9de236da67b39efeabc42863395e36?s=96&d=mm&r=g\",\"caption\":\"Mohit Harjai\"},\"description\":\"He is fond of digital marketing skills and loves to do creative things in a digital planet.\",\"sameAs\":[\"https:\/\/www.countingcharacters.com\"],\"url\":\"https:\/\/www.countingcharacters.com\/blog\/author\/mohitharjai\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ImportXML Google Sheets - Syntax, Examples & How to Use?","description":"Learn about the Google Sheets' ImportXML function. You can use this function to extract H1 tag, Page Title & more. Check ImportXML' syntax & examples.","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.countingcharacters.com\/blog\/google-sheets-importxml\/","og_locale":"en_US","og_type":"article","og_title":"ImportXML Google Sheets - Syntax, Examples & How to Use?","og_description":"Learn about the Google Sheets' ImportXML function. You can use this function to extract H1 tag, Page Title & more. Check ImportXML' syntax & examples.","og_url":"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/","og_site_name":"Blog - Counting Characters","article_published_time":"2019-01-19T17:02:33+00:00","article_modified_time":"2022-01-16T07:39:31+00:00","og_image":[{"width":761,"height":386,"url":"https:\/\/www.countingcharacters.com\/blog\/wp-content\/uploads\/2019\/01\/google-sheets-importxml.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mohit Harjai","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.countingcharacters.com\/blog\/#website","url":"https:\/\/www.countingcharacters.com\/blog\/","name":"Blog - Counting Characters","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.countingcharacters.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/#primaryimage","inLanguage":"en-US","url":"https:\/\/www.countingcharacters.com\/blog\/wp-content\/uploads\/2019\/01\/google-sheets-importxml.png","contentUrl":"https:\/\/www.countingcharacters.com\/blog\/wp-content\/uploads\/2019\/01\/google-sheets-importxml.png","width":761,"height":386,"caption":"Google Sheets Importxml"},{"@type":"WebPage","@id":"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/#webpage","url":"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/","name":"ImportXML Google Sheets - Syntax, Examples & How to Use?","isPartOf":{"@id":"https:\/\/www.countingcharacters.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/#primaryimage"},"datePublished":"2019-01-19T17:02:33+00:00","dateModified":"2022-01-16T07:39:31+00:00","author":{"@id":"https:\/\/www.countingcharacters.com\/blog\/#\/schema\/person\/42edab7be3c3c5054649c5ff3c234b5f"},"description":"Learn about the Google Sheets' ImportXML function. You can use this function to extract H1 tag, Page Title & more. Check ImportXML' syntax & examples.","breadcrumb":{"@id":"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.countingcharacters.com\/blog\/google-sheets-importxml\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.countingcharacters.com\/blog\/"},{"@type":"ListItem","position":2,"name":"ImportXML Google Sheets &#8211; Syntax, Examples &#038; How to Use?"}]},{"@type":"Person","@id":"https:\/\/www.countingcharacters.com\/blog\/#\/schema\/person\/42edab7be3c3c5054649c5ff3c234b5f","name":"Mohit Harjai","image":{"@type":"ImageObject","@id":"https:\/\/www.countingcharacters.com\/blog\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/5e9de236da67b39efeabc42863395e36?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5e9de236da67b39efeabc42863395e36?s=96&d=mm&r=g","caption":"Mohit Harjai"},"description":"He is fond of digital marketing skills and loves to do creative things in a digital planet.","sameAs":["https:\/\/www.countingcharacters.com"],"url":"https:\/\/www.countingcharacters.com\/blog\/author\/mohitharjai\/"}]}},"_links":{"self":[{"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/posts\/94"}],"collection":[{"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":38,"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"predecessor-version":[{"id":368,"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions\/368"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/media\/101"}],"wp:attachment":[{"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.countingcharacters.com\/blog\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}