npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

search-this

v1.3.2

Published

Search for something on google and get a easy to read JSON response.

Downloads

4

Readme

search-this

Google search API that I made because I didnt want to pay for SerpAPI. It dosnt require any keys or authorization. Just search and get a JSON response that includes the search info, featured snippets, realated questons, information found on the knowledge panel, information in the info card, info in the featured video, partial support for related searches (Currently no names on the searches with drop downs), calculator results, organic link results, and currency exchanging.

1.3.2 Major bug fix that destroyed the entire package.

Install

npm install search-this

Usage

const search = require("search-this")

(async () => {
    const response = await search("Who is joe biden?")
    console.log(response)
})()

Output:

{
  "search_info": {
    "link": "https://www.google.com/search?q=Who+is+joe+biden?",
    "q": "Who is joe biden?",
    "created_at": "The pentagon",
    "time_taken": 0
  },
  "results": [
    {
      "position": 1,
      "title": "Joe Biden: The President | The White House",
      "link": "https://www.whitehouse.gov/administration/president-biden/",
      "snippet": "President Biden represented Delaware for 36 years in the U.S. Senate before becoming the 47th Vice President of the United States. As President, Biden will ..."
    },
    {
      "position": 2,
      "title": "Joe Biden | Biography, Family, Policies, & Facts | Britannica",
      "link": "https://www.britannica.com/biography/Joe-Biden",
      "snippet": "Joe Biden, byname of Joseph Robinette Biden, Jr., (born November 20, 1942, Scranton, Pennsylvania, U.S.), 46th president of the United ...",
      "date": "Nov 16, 2022",
      "siteLinks": [
        {
          "title": "Facts & Related Content",
          "link": "https://www.britannica.com/facts/Joe-Biden"
        },
        {
          "title": "Joe Biden summary",
          "link": "https://www.britannica.com/summary/Joe-Biden"
        },
        {
          "title": "Kamala Harris",
          "link": "https://www.britannica.com/biography/Kamala-Harris"
        }
      ]
    },
    {
      "position": 3,
      "title": "Vice President Joe Biden - Obama White House Archives",
      "link": "https://obamawhitehouse.archives.gov/vp",
      "snippet": "Joseph Robinette Biden, Jr., represented Delaware for 36 years in the U.S. Senate before becoming the 47th and current Vice President of the United States."
    },
    {
      "position": 4,
      "title": "Vice President Joe Biden | The White House",
      "link": "https://obamawhitehouse.archives.gov/realitycheck/node/110",
      "snippet": "Joseph Robinette Biden, Jr., was born November 20, 1942, in Scranton, Pennsylvania, the first of four siblings. In 1953, the Biden family moved from ..."
    },
    {
      "position": 5,
      "title": "Joe Biden: Life Before the Presidency - Miller Center",
      "link": "https://millercenter.org/joe-biden-life-presidency",
      "snippet": "Joseph Robinette Biden Jr. was born on November 20, 1942, in Scranton, Pennsylvania, as World War II raged overseas. The first child of Catherine Eugenia ..."
    },
    {
      "position": 6,
      "title": "Joe Biden - Business Standard",
      "link": "https://www.business-standard.com/about/who-is-joe-biden",
      "snippet": "A member of the Democratic Party, he served as the 47th vice president from 2009 to 2017 under Barack Obama and represented Delaware in the United States Senate ..."
    },
    {
      "position": 7,
      "title": "Joe Biden - Official Campaign Page - Joe Biden for President ...",
      "link": "https://joebiden.com/",
      "snippet": "Donate now to help elect Democrats up and down the ballot ... The Democratic Party is responsible for electing Democrats from the school board to the White House."
    }
  ],
  "featured_snippets": {
    "description": "A member of the Democratic Party, he previously served as the 47th vice president from 2009 to 2017 under President Barack Obama, and represented Delaware in the United States Senate from 1973 to 2009. Joseph Robinette Biden Jr. Scranton, Pennsylvania, U.S.",
    "source": {
      "name": "Wikipedia",
      "link": "en.wikipedia.org/wiki/Joe_Biden"
    }
  },
  "related_questions": [
    {
      "question": "Who is the 47th president of the USA?"
    },
    {
      "question": "How old is Joe Biden's wife?"
    },
    {
      "question": "What type of car does Joe Biden drive?"
    },
    {
      "question": "Who is the oldest president?"
    }
  ],
  "knowledge_panel": {
    "name": "Joe Biden",
    "title": "46th U.S. President",
    "description": "Joseph Robinette Biden Jr. is an American politician who is the 46th and current president of the United States. A member of the Democratic Party, he previously served as the 47th vice president from 2009 to 2017 under President Barack Obama, and...",
    "source": {
      "name": "Wikipedia",
      "link": "https://en.wikipedia.org/wiki/Joe_Biden"
    },
    "information": {
      "born": "November 20, 1942 (age 80 years), Scranton, PA",
      "height": "6′ 0″",
      "party": "Democratic Party",
      "spouse": "Neilia Hunter (m. 1966–1972)",
      "presidential term": "January 20, 2021 –",
      "children": "Hunter Biden, Naomi Biden, Ashley Biden, and more",
      "grandchildren": "Navy Joan Roberts, Robert Biden II, Maisy Biden, and more"
    }
  },
  "related_searches": [
    {
      "question": "Joe Biden net worth",
      "link": "https://google.com/search?ie=UTF-8&q=Joe+Biden+net+worth"
    },
    {
      "question": "Young Joe Biden",
      "link": "https://google.com/search?ie=UTF-8&q=Young+Joe+Biden"
    },
    {
      "question": "How old is Joe Biden",
      "link": "https://google.com/search?ie=UTF-8&q=How+old+is+Joe+Biden"
    },
    {
      "question": "Jill Biden",
      "link": "https://google.com/search?ie=UTF-8&q=Jill+Biden"
    },
    {
      "question": "When was Joe Biden elected",
      "link": "https://google.com/search?ie=UTF-8&q=When+was+Joe+Biden+elected"
    },
    {
      "question": "Joe Biden wife",
      "link": "https://google.com/search?ie=UTF-8&q=Joe+Biden+wife"
    },
    {
      "question": "Joe Biden first wife",
      "link": "https://google.com/search?ie=UTF-8&q=Joe+Biden+first+wife"
    },
    {
      "question": "Joe Biden family",
      "link": "https://google.com/search?ie=UTF-8&q=Joe+Biden+family"
    }
  ]
}

Issues

If you have any issues or error please report it so I can fix them.

License

The MIT License (MIT)

Fork it, cry when you read it, give up trying to understand it. Do whatever you want with this.

Support

If you really like this project please consider buying me a coffee.