Socket
Socket
Sign inDemoInstall

google-search-parser

Package Overview
Dependencies
19
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    google-search-parser

Google Search ads and results parser


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

google-search-parser

Build Status

Parses ads, results from the HTML of google search page results into json.

Usage:

  var parser = require('google-search-parser')
  parser.parseUrl("https://www.google.com/search?output=search&sclient=psy-ab&q=racoon&gbv=1");
  parser.parseFile('./test/data/example.html');
  parser.parseFile('./test/data/moto-g.html');
  parser.parseWords('moto x', function(result) {
    console.log(result);
  });

Result format:

-- This module takes as input the HTML from a google search results and return a json structure of the following form

query_string : "",
ads : [
    {
        Domain : '', // e.g. ebay.com or amazon.com  (the domain portion of the display url)
        Title : '',
        Line1 : '',
        Line2 : '',  // If just one line - split by ' - ' to produce line 1 and line 2
        DisplayURL : '',
        URL : '',
        IsTop3 : true,
        IsBottom : false,
        Extensions : {  // http://cl.ly/0h0f2Y1h0d0g
            Review : {
                Quote : '',
                Author : '',
                Url : '',
            },
            Social : {
                Count : 100
            }
            Ratings : {
                Count : 999,
                Rating : 8.3
            },
            SiteLinks : [
                {
                    Title : '',
                    Url : ''
                }
                ...
            ],
            HasCallExtension : True/False
            HasLocation : True/False
            HasMobileApp : True/False
            HasDeal : True/False
            HasSocial : True/False
            HasSiteLinks : True/False
            HasRatings : True/False
            HasReviews :True/False
         }

    },
    ...
]
results : [
    {
        Domain :
        Title
        URL
        Text
        Extensions : {
           PublishedBy : { // http://cl.ly/1D3J0F262o2E
               Photo :
               Who :
               Date :
               Followers :
           }
           Sitelinks : [   // http://cl.ly/3l0H1U390R0b
               {
                   Title
                   URL
                   Text
               }
               ..

           ]
        }

    }
    ...
]

FAQs

Last updated on 01 Dec 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc