Blog > Data Collection > Post

Extract Web Phone Number Step by Step(2019) | Octoparse

Wednesday, August 21, 2019

Do you want to get the phone numbers in bulks?

Then, you are on the right page. With this article, you are able to know how to build a "Phone Number Extractor" with Octoparse.



Octoparse enables you to extract all the phone numbers from the web page with its advanced features. For example, if you are looking at all the lawyers in Dallas, Texas (United States) on www.lawyers.com, you will see the perfect results with all the details information of each lawyer.

But you may also notice that some phone numbers on the web page will appear after clicking on the “VIEW PHONE#” button and the location of the PHONE NUMBER button may change according to the contact information posted by different lawyers.



So, how to extract all the phone numbers of lawyers in Dallas, Texas on this site? The solution is to modify the X Path generated by Octoparse to accurately extract the phone numbers information wherever it is.


Firstly, there are 17 pages for the results. 

We can get the list of URLs as follows.









Create a loop for extract data from the list of URLs.


Then extract all the phone numbers of the lawyers, and modify the X Path.





The result seems pretty good, right?


Before extracting any data from websites, I’d strongly recommend you read the terms of service of the website you want to pull data out from and thus avoid legal issues. I’ve attached the Octoparse file (Click HERE)and you can download it to extract the data directly after you launch Octoparse.


Octoparse is not just used to extract phone numbers, but also to extract other web content from complex websites using techniques such as AJAX, JavaScript, pagination, etc.. Try out more features now!



Author: The Octoparse Team



contact us


Recommended reading:

How to Crawl Data from a Website

Price Scraping | Octoparse, Free Web Scraping Software

Why Extracting Big Data Is Important

3 Best Article Scraping Software Tools

Scraping Data from Website to Excel

Free Online Web Crawler Tool

Web Crawler Service





Download Octoparse to start web scraping or contact us for any
question about web scraping!

Contact Us Download