Skip to content

SilasRodrigues19/GoogleSearchAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Google Search API

Search data with the google search API
Demo Report Bug

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact

About The Project

Preview


Preview
Preview

NOTE: The API that was used has been deprecated, at the moment the project is using the API google-search72 which has some limitations.
The /news and /videos endpoints no longer exist in this new API, but I've kept the old screenshots below as a matter of curiosity.
Expanding and collapsing the item below, you can see the deprecated endpoints /news and /videos.
Deprecated endpoints

Preview


Preview


Project developed in a JavaScript Mastery channel tutorial to learn React best practices, creating modern user interfaces using Tailwind CSS and most importantly, learn to fetch data from Google Search API using RapidAPI.

The website is divided into:

  • Input: enter text to search google api.
  • Toggle Button: switch between light and dark themes.
  • Home: shows some results for your search.
  • News Tab: [DEPRECATED] shows some news related to your search.
  • Images Tab: shows some images related to your search.
  • Videos Tab: [DEPRECATED] shows some videos related to your search.

Built With

Technologies used in the project.

Frameworks

Libraries

Getting Started

Prerequisites

  1. Create an account on RapidAPI and access the link below.
https://rapidapi.com/neoscrap-net/api/google-search72/pricing/
  1. Choose your plan and subscribe (This project uses the free version)

  2. Access google-search72 - endpoints, copy the x-rapidapi-key code that will be used in the .env file.

  const res = await fetch(`${baseUrl}${url}`, {
      method: 'GET',
      headers: {
        'x-proxy-location': 'EU',
        'x-rapidapi-host': 'google-search3.p.rapidapi.com',
        'x-rapidapi-key': process.env.REACT_APP_API_KEY,
      },
    });
  1. Put the value of x-rapidapi-key in the key REACT_APP_API_KEY and rename the file from .env.example to .env
  REACT_APP_API_KEY=your-x-rapidapi-key
  1. If you have an application running, stop the server and run it again to work the environment variable.

Installation

  1. Clone the repo
    git clone https://github.com/SilasRodrigues19/Google-Search-API.git
  2. Install dependencies
    npm install
  3. In the project directory, you can run
    npm start
  4. Open the link below to view the app it in your browser.
      http://localhost:3000

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Silas Rodrigues - @jinuye1 - silasrodrigues.fatec@gmail.com

Project Link: https://github.com/SilasRodrigues19/Google-Search-API


Getting Started with Create React App

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can't go back!

If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify



🔼 Back to top