In lead generation, for businesses targeting Shopify stores, extracting the country code from a list of Shopify URLs can be a game-changer.

Hopefully, the country code information is quickly available in the source code of the Shopify stores.

In this article, you will learn:

How to find the country code for a Shopify Store manually

Open Shopify source code
Open Shopify source code
Search "Shopify.country"
Search "Shopify.country"

How to extract country codes for a list of Shopify Stores - In Bulk

Now, to extract country codes in bulk, you need to automate this process.

To do so, you can use Datablist Bulk Scraper. Datablist is a powerful Leads Relationship Management tool.

First, import your list of Shopify stores in Datablist CSV Editor.

Then, click on the "Enrich" button in the header.

Import List of Shopify Stores
Import List of Shopify Stores

Select the Bulk Scraper enrichment. The Bulk Scraper will open each store using the Shopify URL and extract the country code from the HTML source code.

Select Bulk Scraper
Select Bulk Scraper

In the scraper configuration, scroll to the "Regex #1" setting. And write the following regular expression:

Shopify\.country\s=\s"(\w+)";

Configure Input with Regular Expression
Configure Input with Regular Expression

Then, continue to configure the outputs. Create new properties to store the Regex Text #1.

You can also add the URL Scraping Status output to know when a store is no longer online.

Configure Scraping Outputs
Configure Scraping Outputs

Then run the Bulk Scraper enrichment on your first 10 stores. If the results are good, process the whole list.

To finish, clean unreachable stores to keep only up-to-date Shopify leads.

Shopify Stores Country Code List
Shopify Stores Country Code List