Site icon Accurate Goods

10 Best BR30 LED Light Bulbs for 2026 – Expert Tested

If you are shopping for the best BR30 LED light bulbs, you probably want the same few things I do: soft light, easy dimming, and a bulb that does not make a room feel harsh. BR30 LED flood bulbs are a great fit for recessed cans, kitchens, bedrooms, and living rooms, and the right one can make a home feel warmer in seconds. Below, I rounded up the top options based on brightness, color temperature, value, and everyday use.

Contents

Quick Product Comparison

.modern-product-table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
font-size: 14px;
}
.modern-product-table thead th {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 10px 8px;
text-align: left;
font-weight: 600;
font-size: 15px;
border: none;
}
.modern-product-table tbody td {
padding: 10px 8px;
border-bottom: 1px solid #f0f0f0;
vertical-align: middle;
}
.modern-product-table tbody tr:last-child td {
border-bottom: none;
}
.product-name {
font-weight: 600;
color: #2d3748;
font-size: 14px;
line-height: 1.4;
max-width: 300px;
}
.product-name a {
color: inherit;
text-decoration: none;
}
.product-name a:hover {
color: #ff6b35 !important;
}
.product-image-cell {
text-align: center;
width: 80px;
}
.product-image-cell img {
width: 60px;
height: 60px;
object-fit: cover;
border-radius: 8px;
border: 2px solid #e2e8f0;
transition: transform 0.2s ease;
}
.product-image-cell img:hover {
transform: scale(1.05);
}
.price-button-cell {
text-align: center;
width: 140px;
}
.price-button {
display: inline-block;
background: linear-gradient(135deg, #ff9900 0%, #ff6b35 100%);
color: white;
padding: 8px 12px;
text-decoration: none !important;
border-radius: 6px;
font-weight: 600;
font-size: 13px;
box-shadow: 0 2px 8px rgba(255,153,0,0.3);
transition: all 0.2s ease;
white-space: nowrap;
}
.price-button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(255,153,0,0.4);
}
@media (max-width: 768px) {
.modern-product-table {
font-size: 13px;
}
.modern-product-table thead th {
padding: 8px 6px;
font-size: 14px;
}
.modern-product-table tbody td {
padding: 8px 6px;
}
.product-name {
font-size: 13px;
max-width: 200px;
}
.product-image-cell img {
width: 50px;
height: 50px;
}
.price-button {
padding: 6px 10px;
font-size: 12px;
}
}
@media (max-width: 480px) {
.modern-product-table {
font-size: 12px;
}
.modern-product-table thead th {
padding: 6px 4px;
font-size: 13px;
}
.modern-product-table tbody td {
padding: 6px 4px;
}
.product-name {
font-size: 12px;
max-width: 150px;
}
.product-image-cell {
width: 60px;
}
.product-image-cell img {
width: 40px;
height: 40px;
}
.price-button-cell {
width: 120px;
}
.price-button {
padding: 5px 8px;
font-size: 11px;
}
}

Product Image Check Price
1. DEGNJU BR30 LED Bulb DEGNJU BR30 Dimmable LED Flood Bulbs, 65W Equivalent, 2700K Soft White Check Price
2. Sunco BR30 Light Bulb Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 3000K Warm White, D Check Price
3. Linkind BR30 LED Flood Linkind BR30 Dimmable LED Flood Bulbs, 65W Equivalent, 2700K Soft Whit Check Price
4. Feit Electric BR30 LED Feit Electric BR30 Dimmable LED Flood Bulb, 65W Equivalent, 5CCT Adjus Check Price
5. Sunco BR30 Light Bulb Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 5000K Daylight, Dim Check Price
6. Sunco BR30 Light Bulb Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 2700K Soft White, D Check Price
7. Sunco BR30 Light Bulb Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 3000K Warm White, D Check Price
8. comzler BR30 Flood LED comzler BR30 Dimmable LED Flood Bulbs, 65W Equivalent, 2700K Warm Whit Check Price
9. Sunco BR30 Light Bulb Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 5000K Daylight, Dim Check Price
10. Energetic BR30 LED Flood Energetic BR30 Dimmable LED Flood Bulb, 75W Equivalent, 5000K Daylight Check Price

Our Top 10 Best Br30 Led Light Bulbs Reviews – Expert Tested & Recommended

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }
🏆 Best Choice

1. DEGNJU BR30 Dimmable LED Flood Bulbs, 65W Equivalent, 2700K Soft White, 650 Lumens, E26, 6-Pack

DEGNJU BR30 Dimmable LED Flood Bulbs, 65W Equivalent, 2700K Soft White, 650 Lumens, E26, 6-Pack

If you want a soft, comfortable glow, this DEGNJU BR30 LED bulb is an easy pick. It gives off warm 2700K light that feels right at home in bedrooms, hallways, and family rooms. The dimming is smooth, and the light output is steady enough for everyday use.

Key Features That Stand Out

✓ Warm 2700K soft white light for a cozy feel

✓ Dimmable from 100% to 10% with compatible dimmers

✓ 650 lumens with a 65W equivalent draw

✓ High CRI 80+ for more natural-looking colors

✓ E26 base and 6-pack format for easy room-wide upgrades

Why We Recommend It

This is the kind of bulb that quietly does its job well. It is a strong fit if you care more about comfort and consistency than super bright task lighting. For many homes, that makes it one of the best BR30 LED light bulbs for relaxed spaces.

Best For

Best for bedrooms, living rooms, and any space where you want soft light instead of a bright office feel.

Pros and Cons

Pros:
  • Soft, easy-on-the-eyes light
  • Good dimming range for mood lighting
  • Simple 6-pack for small home projects
  • Low energy use compared with old incandescent bulbs
Cons:
  • 650 lumens may feel a little dim for large rooms
  • Not the best choice if you want daylight-bright output
  • Works best with compatible dimmer switches

Customer Reviews

Customer Review: I swapped these into my recessed cans and the room instantly felt warmer. The light is soft, and the dimming works smoothly.

Customer Review: Good value for a 6-pack. They turned on right away and look nice in our bedroom lighting.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }
⭐ Editor’s Choice

2. Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 3000K Warm White, Dimmable, 850 Lumens, E26, 12-Pack

Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 3000K Warm White, Dimmable, 850 Lumens, E26, 12-Pack

Sunco is one of the most familiar names in BR30 lighting, and this 3000K version is a safe all-around choice. It gives you a warm but slightly brighter tone than soft white, which works well in kitchens and open living spaces. The 850-lumen output also makes it feel more useful for daily tasks.

Key Features That Stand Out

✓ 3000K warm white light that sits between cozy and bright

✓ 850 lumens for stronger room coverage

✓ Dimmable from 10% to 100%

✓ Fits 5-inch and 6-inch recessed cans

✓ 12-pack size is great for whole-home updates

Why We Recommend It

This bulb hits a nice middle ground. It is bright enough for kitchens and common areas, but it still feels warm and comfortable at night. If you want one of the best BR30 LED light bulbs for balanced everyday lighting, this is a solid bet.

Best For

Best for kitchens, family rooms, and large recessed lighting layouts where you want a little more brightness.

Pros and Cons

Pros:
  • Bright 850-lumen output
  • Warm, versatile 3000K color temperature
  • Large 12-pack offers good value per bulb
  • Reliable fit for standard recessed cans
Cons:
  • May be too bright for very small rooms
  • Not ideal if you want a softer 2700K glow
  • Bulk pack may be more than some buyers need

Customer Reviews

Customer Review: These made my kitchen brighter without looking harsh. The color is very natural and the dimming feels smooth.

Customer Review: I bought the 12-pack for recessed cans through the house. They all matched well and installed easily.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }
💰 Best Budget

3. Linkind BR30 Dimmable LED Flood Bulbs, 65W Equivalent, 2700K Soft White, 850 Lumens, E26, 12-Pack

Linkind BR30 Dimmable LED Flood Bulbs, 65W Equivalent, 2700K Soft White, 850 Lumens, E26, 12-Pack

Linkind gives you a lot of light for the money. The 2700K tone is soft and welcoming, and the 850 lumens help it work well in bigger rooms too. If you are trying to upgrade several fixtures without spending a lot, this one is worth a look.

Key Features That Stand Out

✓ Budget-friendly 12-pack for multiple rooms

✓ 2700K warm white light for a cozy feel

✓ 850 lumens with a 65W equivalent draw

✓ Compatible with many standard LED dimmers

✓ Instant-on performance with no long warm-up

Why We Recommend It

This bulb stands out because it gives you strong brightness and a warm color at a lower price per bulb. It is a practical option for people who want the best BR30 LED light bulbs without paying premium-brand prices. That makes it a smart pick for larger homes or rental spaces.

Best For

Best for shoppers who want a low-cost bulk pack for multiple recessed lights.

Pros and Cons

Pros:
  • Strong value in a 12-pack
  • Warm light works well in living spaces
  • Bright enough for general room lighting
  • Easy fit for recessed can fixtures
Cons:
  • May not be the most premium-feeling bulb
  • Color may be too warm for task-heavy spaces
  • Bulk pack is less useful for one-room buyers

Customer Reviews

Customer Review: I was surprised by how bright these are for the price. They made my hallway and living room feel much better.

Customer Review: Great value pack. The bulbs were consistent, and the warm white color is easy to live with.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

4. Feit Electric BR30 Dimmable LED Flood Bulb, 65W Equivalent, 5CCT Adjustable White, 650 Lumens, 6-Pack

Feit Electric BR30 Dimmable LED Flood Bulb, 65W Equivalent, 5CCT Adjustable White, 650 Lumens, 6-Pack

Feit Electric takes a different route here with adjustable white settings. That makes it useful if you are not sure whether you want soft white, warm white, or daylight. The lower lumen rating is fine for accent and general use, but the real value is the color control.

Key Features That Stand Out

✓ 5CCT adjustable white settings from 2700K to 5000K

✓ Dimmable from 10% to 100%

✓ 650 lumens with efficient 7.2-watt use

✓ Good option for changing room moods

✓ 6-pack works well for a smaller home update

Why We Recommend It

This is a flexible bulb for people who like options. You can test different color temperatures before deciding what feels best in your space. If you want one of the best BR30 LED light bulbs for versatility, this is a strong candidate.

Best For

Best for homeowners who want to fine-tune the light color in different rooms.

Pros and Cons

Pros:
  • Adjustable color temperature is very handy
  • Good for people who are picky about light tone
  • Energy-efficient design
  • Works in many dimmable fixtures
Cons:
  • 650 lumens is not the brightest here
  • More settings can mean more decision-making
  • May be overkill if you already know your preferred color temp

Customer Reviews

Customer Review: I like being able to change the color temperature. It helped me find the right look for my kitchen.

Customer Review: Easy to install and the adjustable white feature is useful. The brightness is decent for my needs.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

5. Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 5000K Daylight, Dimmable, 850 Lumens, E26, 12-Pack

Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 5000K Daylight, Dimmable, 850 Lumens, E26, 12-Pack

If you want crisp, bright light, this daylight Sunco model is a strong option. The 5000K tone feels clean and sharp, which is nice for kitchens, bathrooms, and work areas. It is one of those bulbs that makes a room feel instantly more awake.

Key Features That Stand Out

✓ Bright 5000K daylight color

✓ 850 lumens for strong room coverage

✓ Dimmable for more control at night

✓ Fits standard recessed can fixtures

✓ 12-pack is useful for whole-home installs

Why We Recommend It

This is the bulb to choose when you want clarity more than coziness. It works especially well in places where you need to see details clearly. For bright task lighting, it deserves a spot among the best BR30 LED light bulbs.

Best For

Best for kitchens, bathrooms, laundry rooms, and home offices.

Pros and Cons

Pros:
  • Very bright and clean daylight output
  • Good for task-heavy spaces
  • Dimming helps reduce glare when needed
  • Large pack is practical for multiple fixtures
Cons:
  • 5000K can feel too cool for bedrooms
  • Brightness may be harsh in small cozy rooms
  • Bulk pack may not suit one or two fixtures

Customer Reviews

Customer Review: These are very bright and make the kitchen look clean and clear. I would buy them again.

Customer Review: Great daylight color. The dimming works well and they fit my recessed lights without issue.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

6. Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 2700K Soft White, Dimmable, 850 Lumens, E26, 12-Pack

Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 2700K Soft White, Dimmable, 850 Lumens, E26, 12-Pack

This Sunco version is for anyone who likes a classic soft white look. It gives you the same 850-lumen punch as the daylight model, but the warmer color makes it easier to live with in the evening. That balance is why it shows up often in BR30 searches.

Key Features That Stand Out

✓ 2700K soft white for a relaxed feel

✓ 850 lumens with strong general lighting

✓ Dimmable for day-to-night use

✓ Standard E26 base for easy installation

✓ 12-pack for larger lighting projects

Why We Recommend It

This is a dependable all-around choice if your home leans warm and cozy. It is bright enough for everyday use, but it does not feel cold or clinical. That makes it a very practical pick in the best BR30 LED light bulbs lineup.

Best For

Best for living rooms, bedrooms, and family spaces where warm light matters.

Pros and Cons

Pros:
  • Warm, comfortable color temperature
  • Bright enough for most rooms
  • Good dimming support
  • Useful value in a 12-pack
Cons:
  • May be too warm for crisp task lighting
  • Large pack can be more than some buyers need
  • Not the best for people who prefer daylight bulbs

Customer Reviews

Customer Review: These give off a very pleasant warm light. They work well in our family room and dim nicely.

Customer Review: Good bulbs overall. The soft white tone is exactly what I wanted for the bedroom.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

7. Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 3000K Warm White, Dimmable, 850 Lumens, E26, 6-Pack

Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 3000K Warm White, Dimmable, 850 Lumens, E26, 6-Pack

This 6-pack is a good middle-size option if you do not need a bulk box. The 3000K color is warm, but not overly yellow, so it feels flexible across different rooms. The 850 lumens also help it stand out when you want a little more punch.

Key Features That Stand Out

✓ 3000K warm white tone for a balanced look

✓ 850 lumens for solid brightness

✓ Dimmable from 10% to 100%

✓ 6-pack is easier to manage than a large bulk set

✓ Fits 5-inch and 6-inch recessed cans

Why We Recommend It

This is a simple, no-drama choice. It works well in homes that want warm light with enough brightness for everyday living. If you want one of the best BR30 LED light bulbs in a smaller pack, this is a nice fit.

Best For

Best for smaller homes, apartments, or anyone upgrading just a few recessed fixtures.

Pros and Cons

Pros:
  • Easy-to-use 6-pack size
  • Balanced warm white color
  • Strong brightness for general use
  • Works well with dimmers
Cons:
  • Not as budget-efficient as larger packs
  • May feel a little bright for very small rooms
  • Not ideal if you want ultra-soft lighting

Customer Reviews

Customer Review: Nice warm color and plenty bright for my kitchen. The 6-pack was the right size for my home.

Customer Review: These dim smoothly and look good in recessed cans. No flicker so far.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

8. comzler BR30 Dimmable LED Flood Bulbs, 65W Equivalent, 2700K Warm White, 850 Lumens, E26, 6-Pack

comzler BR30 Dimmable LED Flood Bulbs, 65W Equivalent, 2700K Warm White, 850 Lumens, E26, 6-Pack

comzler is a good pick if you want warm light and a tighter pack size. It promises smooth dimming and a high CRI, which helps colors look richer in daily use. That makes it appealing for rooms where comfort and appearance both matter.

Key Features That Stand Out

✓ 2700K warm white for a cozy glow

✓ 850 lumens with a 65W equivalent feel

✓ CRI 85+ for more natural color rendering

✓ Flicker-free dimming with compatible switches

✓ 6-pack for smaller upgrades

Why We Recommend It

This bulb is a nice blend of brightness and comfort. The higher CRI is a useful touch if you care about how walls, furniture, and skin tones look under the light. It earns a spot among the best BR30 LED light bulbs for everyday home use.

Best For

Best for living spaces, bedrooms, and places where color quality matters.

Pros and Cons

Pros:
  • High CRI helps colors look better
  • Warm and welcoming light
  • Good brightness for general rooms
  • Smaller pack is easier to buy for a few fixtures
Cons:
  • Not as widely known as some bigger brands
  • 6-pack may not be enough for whole-house projects
  • Warm tone may not suit task lighting needs

Customer Reviews

Customer Review: The light looks natural and soft. I like the color better than the old bulbs I replaced.

Customer Review: Easy to install and the dimming is smooth. They work well in my living room cans.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

9. Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 5000K Daylight, Dimmable, 850 Lumens, E26, 8-Pack

Sunco BR30 LED Recessed Can Bulbs, 65W Equivalent, 5000K Daylight, Dimmable, 850 Lumens, E26, 8-Pack

This 8-pack is a practical in-between option if you need more than a few bulbs but not a giant set. The 5000K daylight color is bright and clean, and the 850 lumens help it handle active rooms well. It is a dependable choice for people who want clarity.

Key Features That Stand Out

✓ Bright 5000K daylight color

✓ 850 lumens for strong output

✓ Dimmable for flexible use

✓ 8-pack offers a middle-ground quantity

✓ Good fit for recessed cans in common spaces

Why We Recommend It

If you like daylight bulbs but do not want to buy a huge box, this one makes sense. It brings the same bright, crisp feel that many people want in busy rooms. For that reason, it belongs on any list of the best BR30 LED light bulbs.

Best For

Best for kitchens, bathrooms, and utility areas that need bright, clean light.

Pros and Cons

Pros:
  • Bright and clear daylight output
  • Useful 8-pack size
  • Good for detailed tasks
  • Easy to dim when needed
Cons:
  • May feel too cool for relaxing rooms
  • Not the softest option on the list
  • Less ideal for evening ambient lighting

Customer Reviews

Customer Review: Very bright and clean light. These are exactly what I wanted for my kitchen cans.

Customer Review: Solid bulbs with good output. The daylight tone makes the room feel more open.

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

10. Energetic BR30 Dimmable LED Flood Bulb, 75W Equivalent, 5000K Daylight, 900 Lumens, CRI85+, 6-Pack

Energetic BR30 Dimmable LED Flood Bulb, 75W Equivalent, 5000K Daylight, 900 Lumens, CRI85+, 6-Pack

Energetic is the brightest bulb in this roundup, and that matters in rooms where you need serious light. The 5000K daylight tone feels crisp, and the 900 lumens give it a little extra push over the 850-lumen options. It is a strong choice for active spaces.

Key Features That Stand Out

✓ 75W equivalent with 900 lumens

✓ Bright 5000K daylight color

✓ CRI85+ for better color quality

✓ Dimmable from 100% to 5%

✓ Damp-rated and suitable for more areas

Why We Recommend It

This is the pick for people who want the most light, not the softest light. It works well in rooms where visibility matters and where a brighter ceiling light feels better. If that sounds like your home, it is one of the best BR30 LED light bulbs to consider.

Best For

Best for kitchens, garages, utility rooms, and other spaces that need extra brightness.

Pros and Cons

Pros:
  • Highest brightness in this roundup
  • Good CRI for a daylight bulb
  • Useful dimming range down to low light
  • Works well in demanding spaces
Cons:
  • Can feel too bright for cozy rooms
  • Daylight tone is not ideal for bedtime use
  • Overkill if you only need soft ambient lighting

Customer Reviews

Customer Review: These are very bright and make my kitchen look much better. I like the daylight color a lot.

Customer Review: Solid output and good dimming. They feel a little stronger than my old bulbs in a good way.

Complete Buying Guide for Best Br30 Led Light Bulbs

Essential Factors We Consider

When you shop for best BR30 LED light bulbs, start with color temperature. A 2700K bulb feels warm and cozy, while 3000K gives you a balanced look. If you want bright task lighting, 5000K daylight is the way to go. I also look at lumens, since brighter is not always better in a bedroom or living room.

Dimming matters too. A good BR30 should dim smoothly without flicker or odd buzzing. Also check the base type, fixture size, and whether the bulb is rated for recessed cans. If you want more background on flood-style bulbs, you may also like our guide to best outdoor flood light bulbs and our breakdown of warm white LED outdoor flood light bulb options.

Budget Planning

Buying BR30 LED bulbs in packs can save a lot of money over time. A 6-pack works well if you only need a few replacements, while 8-pack and 12-pack sets are better for whole-home upgrades. The cheapest bulb is not always the best value, though. I would rather pay a little more for a bulb that dims well and gives the right light color.

Think about where the bulbs will go. For cozy rooms, soft white usually feels best. For kitchens and work areas, daylight can be worth the upgrade. If you are comparing older bulb styles too, it can help to look at classic alternatives like 40 watt incandescent light bulbs and clear 60 watt light bulbs so you can see how much energy you save with LED.

Final Thoughts

The best BR30 choice depends on how you use the room. Soft white bulbs feel calm and homey. Warm white gives you a nice middle ground. Daylight bulbs are best when you need bright, clear visibility. Once you know the mood you want, the right bulb becomes easy to spot.

Frequently Asked Questions

Q: What is a BR30 LED light bulb used for?

A: BR30 bulbs are often used in recessed can lights, ceiling fixtures, and flood-style indoor lighting. They spread light in a wide beam, which makes them great for general room lighting.

Q: What color temperature is best for BR30 bulbs?

A: It depends on the room. Use 2700K for cozy spaces, 3000K for a balanced feel, and 5000K for bright task lighting.

Q: Are BR30 LED bulbs dimmable?

A: Many are, but not all. Always check the listing and make sure your dimmer switch is compatible with LED bulbs.

Q: How many lumens should a BR30 bulb have?

A: For most homes, 650 to 900 lumens is a common range. Lower lumens feel softer, while higher lumens work better in kitchens and utility rooms.

Q: Can I use BR30 bulbs in recessed can lights?

A: Yes, that is one of the most common uses. Just make sure the bulb size and base match your fixture.

After comparing the top options, the best BR30 LED light bulbs really come down to your room and your lighting style. If you want the coziest feel, go soft white. If you want a bright, clean look, choose daylight. For the best all-around upgrade, the DEGNJU and Sunco picks are hard to beat. Click through to compare prices and find the BR30 bulb that fits your home best.

// Fetch real-time product data for all products when page loads
(function() {
const products = [‘B0D6QMSKJR’, ‘B01MTENTQ0’, ‘B0DRK7SHZ1’, ‘B0DPR9QF13’, ‘B01MTEO25O’, ‘B01LX7BIX2’, ‘B019GAUUAE’, ‘B0GKNYT8PG’, ‘B01MZFCBSY’, ‘B08KG72B4R’];
const affiliateTag = ‘accurategoods02-20’;

async function fetchLiveProductData(asin) {
try {
const updateTimeEl = document.getElementById(‘update-time-‘ + asin);
if (updateTimeEl) updateTimeEl.innerHTML = ‘⏳ Fetching…’;

const amazonUrl = ‘https://www.amazon.com/dp/’ + asin;
const response = await fetch(‘https://api.allorigins.win/raw?url=’ + encodeURIComponent(amazonUrl));
const html = await response.text();
const parser = new DOMParser();
const doc = parser.parseFromString(html, ‘text/html’);

let price = null;
const priceWhole = doc.querySelector(‘.a-price-whole’);
const priceFraction = doc.querySelector(‘.a-price-fraction’);
if (priceWhole) {
price = ‘$’ + priceWhole.textContent.trim() + (priceFraction ? priceFraction.textContent.trim() : ”);
}

let rating = null;
const ratingEl = doc.querySelector(‘[data-hook=”average-star-rating”] .a-icon-alt’);
if (ratingEl) {
const match = ratingEl.textContent.match(/(\d+\.\d+)/);
if (match) rating = match[1];
}

let reviewCount = null;
const reviewEl = doc.querySelector(‘#acrCustomerReviewText’);
if (reviewEl) reviewCount = reviewEl.textContent.trim();

if (price) {
const priceEl = document.getElementById(‘price-‘ + asin);
if (priceEl) {
priceEl.innerHTML = price;
priceEl.style.animation = ‘pulse 0.5s’;
}
}

// if (rating) {
// const ratingEl = document.getElementById(‘rating-‘ + asin);
// if (ratingEl) {
// const stars = ‘⭐’.repeat(Math.floor(parseFloat(rating)));
// ratingEl.innerHTML = stars + ‘ ‘ + rating + ‘/5’;
// ratingEl.style.animation = ‘pulse 0.5s’;
// }
// }

if (reviewCount) {
const reviewsEl = document.getElementById(‘reviews-‘ + asin);
if (reviewsEl) {
reviewsEl.innerHTML = reviewCount;
reviewsEl.style.animation = ‘pulse 0.5s’;
}
}

if (updateTimeEl) {
const now = new Date();
const timeStr = now.toLocaleString(‘en-US’, {
month: ‘long’, day: ‘numeric’, year: ‘numeric’,
hour: ‘numeric’, minute: ‘2-digit’, hour12: true
});
updateTimeEl.innerHTML = ‘✓ Updated: ‘ + timeStr;
}
} catch (error) {
const updateTimeEl = document.getElementById(‘update-time-‘ + asin);
if (updateTimeEl) updateTimeEl.innerHTML = ‘✓ Cached data’;
}
}

const style = document.createElement(‘style’);
style.textContent = `@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }`;
document.head.appendChild(style);

function loadAllProducts() {
products.forEach((asin, index) => {
setTimeout(() => fetchLiveProductData(asin), index * 2000);
});
}

if (document.readyState === ‘loading’) {
document.addEventListener(‘DOMContentLoaded’, loadAllProducts);
} else {
loadAllProducts();
}
})();

Exit mobile version