Giter Site home page Giter Site logo

hrushi11 / yellow-pages-end-api Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 4.0 2.18 MB

This repository contains the code for completely scraping the yellow pages website to get the details of all the categories from all the cities in America and then turning all of the data into an api to be used later.

Home Page: https://hrushis-yellow-pages-end-api.herokuapp.com/

License: MIT License

Procfile 0.05% Python 30.26% CSS 51.06% HTML 18.62%
api dynamic-api flask web-scraping web-scrapping yellow-pages yellow-pages-scraper yellow-pages-api

yellow-pages-end-api's Introduction

Yellow Pages API

This repository contains the code for completely scraping the yellow pages website to get the details of all the categories from all the cities in America and then turning all of the data into an api to be used later. The api data is well visualized here as example here.

Test the API at: API Testing
Example route at: Dentists in Las Vegas

GIF

http://hrushis-yellow-pages-end-api.herokuapp.com/<search-term>/<us-city>
http://hrushis-yellow-pages-end-api.herokuapp.com/<search-term>/<us-city>/<plier>

Using the API

There are 2 different routes available for this api. One withour plier and another with plier.

plier: Every website can not contain all the details on a single page, to overcome this multiple pages are used which hold around 30 cards of data. So every plier you include, it is a multiple of 30 to get the number of data.

The following images show with code how to get the data from this api. A live testing route is already available here.

IMG

IMG

API Data

First 2 samples from this route: http://hrushis-yellow-pages-end-api.herokuapp.com/repair/texas/5 are shown here.
The key contains the number and the value contains the actual data in a nested dictionary. The keys in the dictionary and there values are well explained below.

Address: The address of the entity included in the call.
Categories: To what types of other services the entity is in.
More-info : To get more information about the entity on the yellow pages website
Name: Name of the entity.
Phone-number: Telephone number for contacting the entity.
Status: Opened or Closed status of the entity.
Website: Own website of the enitity.

null: Data for that key was not available.

{
  "1": {
    "Address": null,
    "Categories": [
      "Auto Repair & Service",
      "Tire Dealers"
    ],
    "More-info": "https://www.yellowpages.com/nationwide/mip/firestone-complete-auto-care-497692017?lid=1001662607171",
    "Name": "Firestone Complete Auto Care",
    "Phone-number": "(800) 364-4314",
    "Status": null,
    "Website": "http://www.firestonecompleteautocare.com/repair/services.jsp?lw_cmp=IYP_YPC_NPLL_Service"
  },
  "2": {
    "Address": null,
    "Categories": [
      "Auto Repair & Service",
      "Automobile Salvage",
      "Automobile & Truck Brokers"
    ],
    "More-info": "https://www.yellowpages.com/nationwide/mip/1-800-car-buyers-481040864?lid=1000123041450",
    "Name": "1 800 Car Buyers",
    "Phone-number": "(888) 495-3593",
    "Status": null,
    "Website": "http://www.800carbuyers.com/?st-t=yp-carbuyer"
  }
}

yellow-pages-end-api's People

Contributors

hrushi11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

yellow-pages-end-api's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.