To use the NewsAPI in your application, you need to set up a .env.local
file in the root of your project and replace "Your API Key"
with your actual API key obtained from newsapi.org.
-
Create a new file named
.env.local
in the root of your project. -
Open the
.env.local
file and add the following content, replacing"Your API Key"
with your actual NewsAPI key:
REACT_APP_NEWS_API_KEY='Your API Key'