Want to build a cool Chrome extension that pulls stock market data like news, financial estimates, and price targets? This guide will walk you through creating the same stock analysis extension I made, step by step. It's beginner-friendly, uses simple code, and connects to the FinancialModelingPrep API. You'll need to get your own API key to make it work, but I'll explain that too. Let's dive in!
What You'll Build
This extension pops up when you click its icon in Chrome. It lets you:
-
Enter a stock ticker (like AAPL for Apple) and your API key.
-
View stock news, financial statement estimates (annual or quarterly), and price target news.
What You'll Need
-
A computer with Google Chrome.
-
-
A FinancialModelingPrep API key (I'll show you how to get one).
-
Basic knowledge of HTML, CSS, and JavaScript (don't worry, I'll keep it simple).
-
A 128x128 pixel image for the extension icon (you can make one in Canva).
Step 1: Set Up Your Project Folder
-
Create a folder called stock-extension on your computer (e.g., on your Desktop).
-
Inside this folder, you'll add five files as shown in the below picture:
-
manifest.json: Tells Chrome what your extension does.
-
popup.html: The popup window users see.
-
popup.css: Styles the popup to look nice.
-
popup.js: Handles the logic, like fetching data.
-
icon.png: A 128x128 image for the extension's icon.

Step 2: Get Your FinancialModelingPrep API Key
The extension pulls data from FinancialModelingPrep, but you need an API key to access the service.
Step 3: Create the Manifest File
The manifest.json file is like the blueprint for your extension. It tells Chrome the extension's name, version, and what files it uses.
-
Open VScode and create a file named manifest.json in the stock-extension folder.
-
Write the below code:

-
Save the file.
What this does:
-
"manifest_version": uses the latest Chrome extension format.
-
"permissions": "storage" lets the extension save your API key.
-
"default_popup": "popup.html" shows the popup when you click the icon.
-
"icons" points to your 128x128 icon image.
Step 4: Create the Popup HTML
The popup.html file defines what users see when they click the extension icon. It includes input fields, buttons, and links.
-
Create a file named popup.html in the stock-extension folder.
-
Write the below code:
Step 5: Style the Popup with CSS
The popup.css file makes the popup look clean and professional.
-
Create a file named popup.css in the stock-extension folder.
-
Copy write the below code:
What this does:
-
Sets a 400px-wide popup with a light gray background.
-
Styles buttons as black with white text, with a darker hover effect.
Step 6: Add the JavaScript Logic
The popup.js file handles fetching stock data, saving the API key.
-
Create a file named popup.js in the stock-extension folder.
-
Copy and paste this code:
What this does:
Step 7: Add an Icon
You need a 128x128 pixel image for the extension's icon.
-
Create or find an image (e.g., a stock chart or logo) using tools like Canva, Paint, or Photoshop.
-
Give it a name "icon" and save it in "png" format in the stock-extension folder.
-
Ensure it's exactly 128x128 pixels to avoid errors.
Step 8: Test Your Extension
Before sharing it, test it in Chrome to make sure everything works.
-
Open Chrome and go to chrome://extensions/.
-
Turn on Developer mode (top-right toggle).
-
Click Load unpacked and select the stock-extension folder.
-
The extension should appear with your icon. Click it to open the popup.
-
Test each feature:
-
Enter your FinancialModelingPrep API key and a ticker (e.g., AAPL).
-
Click “Show Analysis” for Stock News, Financial Estimates (try both annual and quarterly), and Price Target News. Check that data appears.
Step 9: Share Your Extension
Want to share your extension with others? You can publish it on the Chrome Web Store.
-
Go to the Chrome Web Store Developer Dashboard.
-
Sign in, pay a one-time $5 fee, and create a developer account.
-
Zip your stock-extension folder (right-click > Compress).
-
In the Dashboard, click New Item, upload the ZIP, and fill out details:
-
Name: Stock Analysis Extension.
-
Description: Explain what it does and that users need their own API key.
-
Screenshots: Take 1-5 screenshots (1280x800 or 640x400) of the popup in action.
-
Category: Productivity or Business Tools.
-
Privacy: Note that the API key is stored locally and no data is collected.
-
Submit for review. It may take a few days. Choose Unlisted to share with specific people or Public for everyone.
Tips and Tricks
If you don't want to build your own extension like described above, you can download my extension from the Chrome Store, it's called the Stock News and Forecast Extension.
You've just built a Chrome extension that pulls stock market data. It's a great way to learn coding and create something useful for stock investors. By following these steps, you can make your own version, and even share it with others. If you run into issues, double-check your API key, test with Developer Tools, or ask for help in a coding community.
Happy coding, and hope you enjoy your new extension!