Actowiz Metrics Real-time
logo
analytics dashboard for brands! Try Free Demo
How-to-Do-Topic-Modelling-and-Cuisine-Classification-Using-NLP-title

In this post, we aim to explore how NLP (Natural Language Processing) can be utilized to determine the culinary origin of an unfamiliar dish. We will explore two approaches: cuisine classification based on ingredients and topic modeling using meal definitions.

Firstly, we will delve into cuisine classification by examining the ingredients. We can employ NLP techniques to identify patterns and associations that align with specific world cuisines by analyzing the dish's composition. This method involves training a model on a dataset of labeled recipes from various cuisines. The model learns the distinctive ingredient combinations that characterize each cuisine, enabling it to make predictions on new, unseen dishes.

Additionally, we will explore topic modeling by analyzing meal definitions. Meal definitions provide insights into the cultural and contextual aspects of a dish. We can identify the key themes and topics associated with different cuisines by employing techniques like topic modeling. This approach involves extracting the latent topics in meal descriptions, allowing us to infer the likely culinary origin based on the identified themes.

By combining these two approaches, we can enhance the accuracy and robustness of our cuisine classification system. Using NLP in this context opens up exciting possibilities for automatically identifying the culinary heritage of dishes and expanding our knowledge and appreciation of diverse world cuisines.

What is NLP?

How-to-Do-Topic-Modelling-and-Cuisine-Classification-Using-NLP

Natural Language Processing (NLP) refers to the capability of artificial intelligence systems to comprehend, interpret, and manipulate human language as humans do. This field aims to enable machines to understand and effectively interact with human language, whether it is in the form of spoken words or written text. NLP finds applications in various domains, including developing chatbots for customer service in industries like airlines and banking, the spam filtering in email services like Google Mail, and voice-activated assistants like Siri on Apple devices.

NLP encompasses several vital components, such as speech recognition, which involves converting spoken language into the written text; natural language understanding, which focuses on comprehending the meaning and intent behind human language; and text generation, which involves the automatic generation of coherent and contextually appropriate text.

In this project, we will explore the fascinating field of NLP and delve into various aspects of it. We will examine techniques and algorithms used in speech recognition, natural language understanding, and text generation. By gaining insights into these areas, we can better appreciate the capabilities of NLP and its potential to enhance human-computer interaction and enable a wide range of applications. So, let's embark on this journey into Natural Language Processing!

Methodology

Methodology

Scraping the Website Data

For this project, we gathered essential data from two popular websites, "BBC Food" and "Epicurious." To accomplish this, we employed web scraping techniques using the BeautifulSoup library, which allowed me to extract information from the websites efficiently. As a result, we acquired a comprehensive dataset comprising more than 5,000 entries, encompassing ingredients, explanations, and cooking methods for various dishes.

Scraping-the-Website-Data

Using the collected dataset, we developed a machine-learning model tailored explicitly to the task. We utilized the data from the "Ingredients" column as the primary input for the model. Training the model on this information made it adept at recognizing and analyzing various ingredients in different dishes.

Data Processing

Before constructing the model, a data cleaning process was performed to ensure the quality and consistency of the dataset. Several steps were taken to clean the data effectively.

To begin, punctuation marks were removed from the text, and all letters were converted to lowercase. This step helps in standardizing the text and avoiding any discrepancies due to case sensitivity.

Next, numerical values indicating quantity were eliminated from the data since they are not relevant for our analysis. This ensures that the focus remains solely on the ingredients themselves.

Additionally, stopwords were removed from the text. Stopwords are commonly used words that do not contribute significant meaning to the overall context. By eliminating stopwords, we can reduce noise and focus on more meaningful words in the dataset.

By performing these data cleaning steps, we are able to create a cleaner and more streamlined dataset, which ultimately improves the accuracy and effectiveness of the machine learning model and topic modeling techniques applied to the data.

Data-Processing

To further refine the dataset and reduce the word variety, the 'WordNetLemmatizer' function was employed. This process is crucial for the model as it helps reduce the number of words, which can positively impact the model's performance.

Data-Processing-2

As part of the data preprocessing phase, an additional step was taken to remove rare words from the dataset. Some words that appeared infrequently or erroneously might have been collected during the web scraping process. To address this, the "Counter" function was imported to count the frequency of each word in the dataset.

Experimental Data Analysis

The graph illustrates the distribution of the target values, representing different world cuisines. It is evident that there is an imbalance in the dataset, where certain cuisines are more prevalent than others.

To address this issue and ensure a balanced representation of cuisines in the model, a strategy was implemented during the scraping process. Specifically, cuisines such as British and Irish, which exhibit significant similarities in terms of their culinary traditions, were grouped together as "British/Irish". Similarly, cuisines like Indian, Spanish, Pakistani, and Portuguese, which share commonalities in terms of ingredients and flavors, were combined as a single category.

By merging these similar cuisines, the dataset achieves a more balanced distribution among the target values. This is important for training the machine learning model, as it helps prevent bias towards overrepresented cuisines and ensures that all cuisines have a comparable impact on the learning process. Maintaining a balanced dataset enhances the model's ability to generalize and make accurate predictions across various cuisines.

Experimental-Data-Analysis

The word cloud visualization effectively depicts the relationship between cuisines and their corresponding ingredients in the "Ingredients" column. By examining the word cloud, it becomes evident that different cuisines have distinct ingredients, reflecting their unique culinary characteristics.

Knowing world cuisines, the generated word cloud aligns with our expectations. It highlights specific ingredients commonly associated with each cuisine, allowing us to gain insights into the key components and flavors that define different culinary traditions. This visualization method not only presents the ingredients aesthetically pleasingly but also sparks ideas about the unusual and noteworthy ingredients used in each cuisine.

Experimental-Data-Analysis-2

Cuisine Classification

During the data collection process, we created two important components: the target variable and the text column, which serves as a crucial feature for our machine learning model. However, in order for the machine to effectively understand and process the text column, we need to convert it into a numeric representation. There are several methods that can be employed for this purpose, and we will outline them before proceeding with the modeling phase.

CountVectorizer— TF-IDF (Term Frequency-Inverse Document Frequency)

To effectively use the text columns in machine learning algorithms, we need to convert them into numerical vectors. Two common approaches for text vectorization are CountVectorizer and TF-IDF.

CountVectorizer: This method creates a document matrix where every row represents the document, and every column represents one unique word in a corpus. The cells in the matrix typically represent the count of how many times a word appears in a document.

TF-IDF (Term Frequency-Inverse Document Frequency): TF-IDF considers both the frequency of words in the document and rarity of words across different documents (inverse document frequency). The resulting document matrix reflects the weighted importance of words in the documents.

To achieve our models' highest accuracy, I applied the CountVectorizer and TF-IDF tokenization methods. Additionally, I utilized n-grams, which consider sequences of words instead of single words, to capture more contextual information from text data.

CountVectorizer—-TF-IDF-(Term-Frequency-Inverse-Document-Frequency)

We experimented with several NLP models; the results are displayed in the chart on the left. The Random Forest model suffered from overfitting, as indicated by the significant difference between the training and test accuracies.

Among the models tested, the Multinomial Naive Bayes performed the best, achieving a test accuracy of 74%. This model utilized TF-IDF transformation without n-grams. Despite further optimizing the model using Grid Search CV to explore various parameter combinations, the accuracy dropped to 0.71.

Therefore, the Multinomial Naive Bayes model with TF-IDF transformation emerged as the most effective in this project, offering satisfactory accuracy.

CountVectorizer—-TF-IDF-(Term-Frequency-Inverse-Document-Frequency)-2

Topic Modelling

Topic-Modelling

Topic modeling is an effective method for grouping documents based on their content. In this project, we utilized Latent Dirichlet Allocation (LDA), a popular technique for topic modeling. By applying LDA to the "Explanations" column, we aimed to understand the different topics related to the dishes.

Following a similar preprocessing approach as mentioned earlier, we tokenized the text and extracted only the nouns and adjectives. Then, we transformed the text into vectors using CountVectorizer and examined the resulting topics.

After evaluating different topic models, we found that the model with three topics yielded the most meaningful results. Here is a brief overview of the identified topics:

Topic 1: Ingredients and Cooking Techniques - This topic focuses on discussions related to various ingredients used in cooking, as well as different cooking methods and techniques employed in preparing the dishes.

Topic 2: Cultural and Regional Influences - This topic revolves around the cultural and regional aspects of different cuisines. It includes discussions about traditional cooking styles, local ingredients, and specific dishes associated with certain regions or cultures.

Topic 3: Flavor Profiles and Seasonings - This topic explores the flavor profiles of dishes, highlighting the use of specific seasonings, spices, and flavors to enhance the taste and aroma of the prepared meals.

By analyzing the topics generated by the LDA model, we can gain insights into the different aspects and themes present in the explanations of the dishes, helping us understand the content more effectively.

Topic-Modelling-2

Topic 0 is used for Healthy Food

Topic 1 is used for Desserts

Topic 2 is used for Mexican Food

Thanks a lot for reading our post! For more details, you can contact Actowiz Solutions now! Ask us about all your mobile app scraping and web scraping service requirements.

Social Proof That Converts

Trusted by Global Leaders Across Q-Commerce, Travel, Retail, and FoodTech

Our web scraping expertise is relied on by 3,000+ global enterprises including Zomato, Tata Consumer, Subway, and Expedia — helping them turn web data into growth.

3,000+ Enterprises Worldwide
50+ Countries Served
20+ Industries
Join 3,000+ companies growing with Actowiz →
Real Results from Real Clients

Hear It Directly from Our Clients

Watch how businesses like yours are using Actowiz data to drive growth.

1 min
★★★★★
"Actowiz Solutions offered exceptional support with transparency and guidance throughout. Anna and Saga made the process easy for a non-technical user like me. Great service, fair pricing!"
FC
Febbin Chacko
Small Business Owner
Fin
2 min
★★★★★
"Actowiz delivered impeccable results for our company. Their team ensured data accuracy and on-time delivery. The competitive intelligence completely transformed our pricing strategy."
JI
Javier Ibanez
Head of Analytics
atacy.es
1:30
★★★★★
"What impressed me most was the speed — we went from requirement to production data in under 48 hours. The API integration was seamless and the support team is always responsive."
RK
Rajesh Kumar
CTO
QComm Brand
4.8/5 Average Rating
📹 50+ Video Testimonials
🔄 92% Client Retention
🌍 50+ Countries Served

Join 3,000+ Companies Growing with Actowiz

From Zomato to Expedia — see why global leaders trust us with their data.

Why Global Leaders Trust Actowiz

Backed by automation, data volume, and enterprise-grade scale — we help businesses from startups to Fortune 500s extract competitive insights across the USA, UK, UAE, and beyond.

icons
7+
Years of Experience
Proven track record delivering enterprise-grade web scraping and data intelligence solutions.
icons
4,000+
Projects Delivered
Serving startups to Fortune 500 companies across 50+ countries worldwide.
icons
200+
In-House Experts
Dedicated engineers across scrapers, AI/ML models, APIs, and data quality assurance.
icons
9.2M
Automated Workflows
Running weekly across eCommerce, Quick Commerce, Travel, Real Estate, and Food industries.
icons
270+ TB
Data Transferred
Real-time and batch data scraping at massive scale, across industries globally.
icons
380M+
Pages Crawled Weekly
Scaled infrastructure for comprehensive global data coverage with 99% accuracy.

AI Solutions Engineered
for Your Needs

LLM-Powered Attribute Extraction: High-precision product matching using large language models for accurate data classification.
Advanced Computer Vision: Fine-grained object detection for precise product classification using text and image embeddings.
GPT-Based Analytics Layer: Natural language query-based reporting and visualization for business intelligence.
Human-in-the-Loop AI: Continuous feedback loop to improve AI model accuracy over time.
🎯 Product Matching 🏷️ Attribute Tagging 📝 Content Optimization 💬 Sentiment Analysis 📊 Prompt-Based Reporting

Connect the Dots Across
Your Retail Ecosystem

We partner with agencies, system integrators, and technology platforms to deliver end-to-end solutions across the retail and digital shelf ecosystem.

icons
Analytics Services
icons
Ad Tech
icons
Price Optimization
icons
Business Consulting
icons
System Integration
icons
Market Research
Become a Partner →

Popular Datasets — Ready to Download

Browse All Datasets →
icons
Amazon
eCommerce
Free 100 rows
icons
Zillow
Real Estate
Free 100 rows
icons
DoorDash
Food Delivery
Free 100 rows
icons
Walmart
Retail
Free 100 rows
icons
Booking.com
Travel
Free 100 rows
icons
Indeed
Jobs
Free 100 rows

Latest Insights & Resources

View All Resources →
thumb
Blog

How IHG Hotels & Resorts Data Scraping Helps Overcome Real-Time Availability and Rate Monitoring Issues

How IHG Hotels & Resorts data scraping enables real-time rate tracking, improves availability monitoring, and boosts revenue decisions.

thumb
Case Study

UK Grocery Chain Achieves 300% ROI on Promotional Campaigns

How a top-10 UK grocery retailer used Actowiz grocery price scraping to achieve 300% promotional ROI and reduce competitive response time from 5 days to same-day.

thumb
Report

Track UK Grocery Products Daily Using Automated Data Scraping to Monitor 50,000+ UK Grocery Products from Morrisons, Asda, Tesco, Sainsbury’s, Iceland, Co-op, Waitrose, Ocado

Track UK Grocery Products Daily Using Automated Data Scraping across Morrisons, Asda, Tesco, Sainsbury’s, Iceland, Co-op, Waitrose, and Ocado for insights.

Start Where It Makes Sense for You

Whether you're a startup or a Fortune 500 — we have the right plan for your data needs.

icons
Enterprise
Book a Strategy Call
Custom solutions, dedicated support, volume pricing for large-scale needs.
icons
Growing Brand
Get Free Sample Data
Try before you buy — 500 rows of real data, delivered in 2 hours. No strings.
icons
Just Exploring
View Plans & Pricing
Transparent plans from $500/mo. Find the right fit for your budget and scale.
GeoIp2\Model\City Object
(
    [raw:protected] => Array
        (
            [city] => Array
                (
                    [geoname_id] => 4509177
                    [names] => Array
                        (
                            [de] => Columbus
                            [en] => Columbus
                            [es] => Columbus
                            [fr] => Columbus
                            [ja] => コロンバス
                            [pt-BR] => Columbus
                            [ru] => Колумбус
                            [zh-CN] => 哥伦布
                        )

                )

            [continent] => Array
                (
                    [code] => NA
                    [geoname_id] => 6255149
                    [names] => Array
                        (
                            [de] => Nordamerika
                            [en] => North America
                            [es] => Norteamérica
                            [fr] => Amérique du Nord
                            [ja] => 北アメリカ
                            [pt-BR] => América do Norte
                            [ru] => Северная Америка
                            [zh-CN] => 北美洲
                        )

                )

            [country] => Array
                (
                    [geoname_id] => 6252001
                    [iso_code] => US
                    [names] => Array
                        (
                            [de] => USA
                            [en] => United States
                            [es] => Estados Unidos
                            [fr] => États Unis
                            [ja] => アメリカ
                            [pt-BR] => EUA
                            [ru] => США
                            [zh-CN] => 美国
                        )

                )

            [location] => Array
                (
                    [accuracy_radius] => 20
                    [latitude] => 39.9625
                    [longitude] => -83.0061
                    [metro_code] => 535
                    [time_zone] => America/New_York
                )

            [postal] => Array
                (
                    [code] => 43215
                )

            [registered_country] => Array
                (
                    [geoname_id] => 6252001
                    [iso_code] => US
                    [names] => Array
                        (
                            [de] => USA
                            [en] => United States
                            [es] => Estados Unidos
                            [fr] => États Unis
                            [ja] => アメリカ
                            [pt-BR] => EUA
                            [ru] => США
                            [zh-CN] => 美国
                        )

                )

            [subdivisions] => Array
                (
                    [0] => Array
                        (
                            [geoname_id] => 5165418
                            [iso_code] => OH
                            [names] => Array
                                (
                                    [de] => Ohio
                                    [en] => Ohio
                                    [es] => Ohio
                                    [fr] => Ohio
                                    [ja] => オハイオ州
                                    [pt-BR] => Ohio
                                    [ru] => Огайо
                                    [zh-CN] => 俄亥俄州
                                )

                        )

                )

            [traits] => Array
                (
                    [ip_address] => 216.73.216.153
                    [prefix_len] => 22
                )

        )

    [continent:protected] => GeoIp2\Record\Continent Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [code] => NA
                    [geoname_id] => 6255149
                    [names] => Array
                        (
                            [de] => Nordamerika
                            [en] => North America
                            [es] => Norteamérica
                            [fr] => Amérique du Nord
                            [ja] => 北アメリカ
                            [pt-BR] => América do Norte
                            [ru] => Северная Америка
                            [zh-CN] => 北美洲
                        )

                )

            [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                (
                    [0] => en
                )

            [validAttributes:protected] => Array
                (
                    [0] => code
                    [1] => geonameId
                    [2] => names
                )

        )

    [country:protected] => GeoIp2\Record\Country Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [geoname_id] => 6252001
                    [iso_code] => US
                    [names] => Array
                        (
                            [de] => USA
                            [en] => United States
                            [es] => Estados Unidos
                            [fr] => États Unis
                            [ja] => アメリカ
                            [pt-BR] => EUA
                            [ru] => США
                            [zh-CN] => 美国
                        )

                )

            [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                (
                    [0] => en
                )

            [validAttributes:protected] => Array
                (
                    [0] => confidence
                    [1] => geonameId
                    [2] => isInEuropeanUnion
                    [3] => isoCode
                    [4] => names
                )

        )

    [locales:protected] => Array
        (
            [0] => en
        )

    [maxmind:protected] => GeoIp2\Record\MaxMind Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                )

            [validAttributes:protected] => Array
                (
                    [0] => queriesRemaining
                )

        )

    [registeredCountry:protected] => GeoIp2\Record\Country Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [geoname_id] => 6252001
                    [iso_code] => US
                    [names] => Array
                        (
                            [de] => USA
                            [en] => United States
                            [es] => Estados Unidos
                            [fr] => États Unis
                            [ja] => アメリカ
                            [pt-BR] => EUA
                            [ru] => США
                            [zh-CN] => 美国
                        )

                )

            [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                (
                    [0] => en
                )

            [validAttributes:protected] => Array
                (
                    [0] => confidence
                    [1] => geonameId
                    [2] => isInEuropeanUnion
                    [3] => isoCode
                    [4] => names
                )

        )

    [representedCountry:protected] => GeoIp2\Record\RepresentedCountry Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                )

            [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                (
                    [0] => en
                )

            [validAttributes:protected] => Array
                (
                    [0] => confidence
                    [1] => geonameId
                    [2] => isInEuropeanUnion
                    [3] => isoCode
                    [4] => names
                    [5] => type
                )

        )

    [traits:protected] => GeoIp2\Record\Traits Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [ip_address] => 216.73.216.153
                    [prefix_len] => 22
                    [network] => 216.73.216.0/22
                )

            [validAttributes:protected] => Array
                (
                    [0] => autonomousSystemNumber
                    [1] => autonomousSystemOrganization
                    [2] => connectionType
                    [3] => domain
                    [4] => ipAddress
                    [5] => isAnonymous
                    [6] => isAnonymousProxy
                    [7] => isAnonymousVpn
                    [8] => isHostingProvider
                    [9] => isLegitimateProxy
                    [10] => isp
                    [11] => isPublicProxy
                    [12] => isResidentialProxy
                    [13] => isSatelliteProvider
                    [14] => isTorExitNode
                    [15] => mobileCountryCode
                    [16] => mobileNetworkCode
                    [17] => network
                    [18] => organization
                    [19] => staticIpScore
                    [20] => userCount
                    [21] => userType
                )

        )

    [city:protected] => GeoIp2\Record\City Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [geoname_id] => 4509177
                    [names] => Array
                        (
                            [de] => Columbus
                            [en] => Columbus
                            [es] => Columbus
                            [fr] => Columbus
                            [ja] => コロンバス
                            [pt-BR] => Columbus
                            [ru] => Колумбус
                            [zh-CN] => 哥伦布
                        )

                )

            [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                (
                    [0] => en
                )

            [validAttributes:protected] => Array
                (
                    [0] => confidence
                    [1] => geonameId
                    [2] => names
                )

        )

    [location:protected] => GeoIp2\Record\Location Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [accuracy_radius] => 20
                    [latitude] => 39.9625
                    [longitude] => -83.0061
                    [metro_code] => 535
                    [time_zone] => America/New_York
                )

            [validAttributes:protected] => Array
                (
                    [0] => averageIncome
                    [1] => accuracyRadius
                    [2] => latitude
                    [3] => longitude
                    [4] => metroCode
                    [5] => populationDensity
                    [6] => postalCode
                    [7] => postalConfidence
                    [8] => timeZone
                )

        )

    [postal:protected] => GeoIp2\Record\Postal Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [code] => 43215
                )

            [validAttributes:protected] => Array
                (
                    [0] => code
                    [1] => confidence
                )

        )

    [subdivisions:protected] => Array
        (
            [0] => GeoIp2\Record\Subdivision Object
                (
                    [record:GeoIp2\Record\AbstractRecord:private] => Array
                        (
                            [geoname_id] => 5165418
                            [iso_code] => OH
                            [names] => Array
                                (
                                    [de] => Ohio
                                    [en] => Ohio
                                    [es] => Ohio
                                    [fr] => Ohio
                                    [ja] => オハイオ州
                                    [pt-BR] => Ohio
                                    [ru] => Огайо
                                    [zh-CN] => 俄亥俄州
                                )

                        )

                    [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                        (
                            [0] => en
                        )

                    [validAttributes:protected] => Array
                        (
                            [0] => confidence
                            [1] => geonameId
                            [2] => isoCode
                            [3] => names
                        )

                )

        )

)
 country : United States
 city : Columbus
US
Array
(
    [as_domain] => amazon.com
    [as_name] => Amazon.com, Inc.
    [asn] => AS16509
    [continent] => North America
    [continent_code] => NA
    [country] => United States
    [country_code] => US
)
Array
(
    [city] => Columbus
    [country] => United States
    [countryCode] => +1
    [currencyCode] => USD
)
Get in Touch
Let's Talk About
Your Data Needs
Tell us what data you need — we'll scope it for free and share a sample within hours.
  • Free Sample in 2 HoursShare your requirement, get 500 rows of real data — no commitment.
  • 💰
    Plans from $500/monthFlexible pricing for startups, growing brands, and enterprises.
  • 🇺🇸
    US-Based SupportOffices in New York & California. Aligned with your timezone.
  • 🔒
    ISO 9001 & 27001 CertifiedEnterprise-grade security and quality standards.
Request Free Sample Data
Fill the form below — our team will reach out within 2 hours.
+1
Free 500-row sample · No credit card · Response within 2 hours
GeoIp2\Model\City Object
(
    [raw:protected] => Array
        (
            [city] => Array
                (
                    [geoname_id] => 4509177
                    [names] => Array
                        (
                            [de] => Columbus
                            [en] => Columbus
                            [es] => Columbus
                            [fr] => Columbus
                            [ja] => コロンバス
                            [pt-BR] => Columbus
                            [ru] => Колумбус
                            [zh-CN] => 哥伦布
                        )

                )

            [continent] => Array
                (
                    [code] => NA
                    [geoname_id] => 6255149
                    [names] => Array
                        (
                            [de] => Nordamerika
                            [en] => North America
                            [es] => Norteamérica
                            [fr] => Amérique du Nord
                            [ja] => 北アメリカ
                            [pt-BR] => América do Norte
                            [ru] => Северная Америка
                            [zh-CN] => 北美洲
                        )

                )

            [country] => Array
                (
                    [geoname_id] => 6252001
                    [iso_code] => US
                    [names] => Array
                        (
                            [de] => USA
                            [en] => United States
                            [es] => Estados Unidos
                            [fr] => États Unis
                            [ja] => アメリカ
                            [pt-BR] => EUA
                            [ru] => США
                            [zh-CN] => 美国
                        )

                )

            [location] => Array
                (
                    [accuracy_radius] => 20
                    [latitude] => 39.9625
                    [longitude] => -83.0061
                    [metro_code] => 535
                    [time_zone] => America/New_York
                )

            [postal] => Array
                (
                    [code] => 43215
                )

            [registered_country] => Array
                (
                    [geoname_id] => 6252001
                    [iso_code] => US
                    [names] => Array
                        (
                            [de] => USA
                            [en] => United States
                            [es] => Estados Unidos
                            [fr] => États Unis
                            [ja] => アメリカ
                            [pt-BR] => EUA
                            [ru] => США
                            [zh-CN] => 美国
                        )

                )

            [subdivisions] => Array
                (
                    [0] => Array
                        (
                            [geoname_id] => 5165418
                            [iso_code] => OH
                            [names] => Array
                                (
                                    [de] => Ohio
                                    [en] => Ohio
                                    [es] => Ohio
                                    [fr] => Ohio
                                    [ja] => オハイオ州
                                    [pt-BR] => Ohio
                                    [ru] => Огайо
                                    [zh-CN] => 俄亥俄州
                                )

                        )

                )

            [traits] => Array
                (
                    [ip_address] => 216.73.216.153
                    [prefix_len] => 22
                )

        )

    [continent:protected] => GeoIp2\Record\Continent Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [code] => NA
                    [geoname_id] => 6255149
                    [names] => Array
                        (
                            [de] => Nordamerika
                            [en] => North America
                            [es] => Norteamérica
                            [fr] => Amérique du Nord
                            [ja] => 北アメリカ
                            [pt-BR] => América do Norte
                            [ru] => Северная Америка
                            [zh-CN] => 北美洲
                        )

                )

            [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                (
                    [0] => en
                )

            [validAttributes:protected] => Array
                (
                    [0] => code
                    [1] => geonameId
                    [2] => names
                )

        )

    [country:protected] => GeoIp2\Record\Country Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [geoname_id] => 6252001
                    [iso_code] => US
                    [names] => Array
                        (
                            [de] => USA
                            [en] => United States
                            [es] => Estados Unidos
                            [fr] => États Unis
                            [ja] => アメリカ
                            [pt-BR] => EUA
                            [ru] => США
                            [zh-CN] => 美国
                        )

                )

            [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                (
                    [0] => en
                )

            [validAttributes:protected] => Array
                (
                    [0] => confidence
                    [1] => geonameId
                    [2] => isInEuropeanUnion
                    [3] => isoCode
                    [4] => names
                )

        )

    [locales:protected] => Array
        (
            [0] => en
        )

    [maxmind:protected] => GeoIp2\Record\MaxMind Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                )

            [validAttributes:protected] => Array
                (
                    [0] => queriesRemaining
                )

        )

    [registeredCountry:protected] => GeoIp2\Record\Country Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [geoname_id] => 6252001
                    [iso_code] => US
                    [names] => Array
                        (
                            [de] => USA
                            [en] => United States
                            [es] => Estados Unidos
                            [fr] => États Unis
                            [ja] => アメリカ
                            [pt-BR] => EUA
                            [ru] => США
                            [zh-CN] => 美国
                        )

                )

            [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                (
                    [0] => en
                )

            [validAttributes:protected] => Array
                (
                    [0] => confidence
                    [1] => geonameId
                    [2] => isInEuropeanUnion
                    [3] => isoCode
                    [4] => names
                )

        )

    [representedCountry:protected] => GeoIp2\Record\RepresentedCountry Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                )

            [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                (
                    [0] => en
                )

            [validAttributes:protected] => Array
                (
                    [0] => confidence
                    [1] => geonameId
                    [2] => isInEuropeanUnion
                    [3] => isoCode
                    [4] => names
                    [5] => type
                )

        )

    [traits:protected] => GeoIp2\Record\Traits Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [ip_address] => 216.73.216.153
                    [prefix_len] => 22
                    [network] => 216.73.216.0/22
                )

            [validAttributes:protected] => Array
                (
                    [0] => autonomousSystemNumber
                    [1] => autonomousSystemOrganization
                    [2] => connectionType
                    [3] => domain
                    [4] => ipAddress
                    [5] => isAnonymous
                    [6] => isAnonymousProxy
                    [7] => isAnonymousVpn
                    [8] => isHostingProvider
                    [9] => isLegitimateProxy
                    [10] => isp
                    [11] => isPublicProxy
                    [12] => isResidentialProxy
                    [13] => isSatelliteProvider
                    [14] => isTorExitNode
                    [15] => mobileCountryCode
                    [16] => mobileNetworkCode
                    [17] => network
                    [18] => organization
                    [19] => staticIpScore
                    [20] => userCount
                    [21] => userType
                )

        )

    [city:protected] => GeoIp2\Record\City Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [geoname_id] => 4509177
                    [names] => Array
                        (
                            [de] => Columbus
                            [en] => Columbus
                            [es] => Columbus
                            [fr] => Columbus
                            [ja] => コロンバス
                            [pt-BR] => Columbus
                            [ru] => Колумбус
                            [zh-CN] => 哥伦布
                        )

                )

            [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                (
                    [0] => en
                )

            [validAttributes:protected] => Array
                (
                    [0] => confidence
                    [1] => geonameId
                    [2] => names
                )

        )

    [location:protected] => GeoIp2\Record\Location Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [accuracy_radius] => 20
                    [latitude] => 39.9625
                    [longitude] => -83.0061
                    [metro_code] => 535
                    [time_zone] => America/New_York
                )

            [validAttributes:protected] => Array
                (
                    [0] => averageIncome
                    [1] => accuracyRadius
                    [2] => latitude
                    [3] => longitude
                    [4] => metroCode
                    [5] => populationDensity
                    [6] => postalCode
                    [7] => postalConfidence
                    [8] => timeZone
                )

        )

    [postal:protected] => GeoIp2\Record\Postal Object
        (
            [record:GeoIp2\Record\AbstractRecord:private] => Array
                (
                    [code] => 43215
                )

            [validAttributes:protected] => Array
                (
                    [0] => code
                    [1] => confidence
                )

        )

    [subdivisions:protected] => Array
        (
            [0] => GeoIp2\Record\Subdivision Object
                (
                    [record:GeoIp2\Record\AbstractRecord:private] => Array
                        (
                            [geoname_id] => 5165418
                            [iso_code] => OH
                            [names] => Array
                                (
                                    [de] => Ohio
                                    [en] => Ohio
                                    [es] => Ohio
                                    [fr] => Ohio
                                    [ja] => オハイオ州
                                    [pt-BR] => Ohio
                                    [ru] => Огайо
                                    [zh-CN] => 俄亥俄州
                                )

                        )

                    [locales:GeoIp2\Record\AbstractPlaceRecord:private] => Array
                        (
                            [0] => en
                        )

                    [validAttributes:protected] => Array
                        (
                            [0] => confidence
                            [1] => geonameId
                            [2] => isoCode
                            [3] => names
                        )

                )

        )

)
 country : United States
 city : Columbus
US
Array
(
    [as_domain] => amazon.com
    [as_name] => Amazon.com, Inc.
    [asn] => AS16509
    [continent] => North America
    [continent_code] => NA
    [country] => United States
    [country_code] => US
)

Request Free Sample Data

Our team will reach out within 2 hours with 500 rows of real data — no credit card required.

+1
Free 500-row sample · No credit card · Response within 2 hours