Display Featured Plans

Show Compare Power's editorially selected plans — the simplest integration for a "recommended plans" widget.

How featured plans work

Featured plans are curated by the Compare Power editorial team. They represent the best-value plans in each TDSP territory and are updated regularly. This is a simpler alternative to building your own comparison logic.

1. Fetch Featured Plans

Call the featured plans endpoint with a TDSP DUNS number and usage levels. Both parameters are required:

JavaScript
const params = new URLSearchParams({
  tdsp_duns: "957877905", // CenterPoint (Houston)
});
params.append("display_usage", "500");
params.append("display_usage", "1000");
params.append("display_usage", "2000");

const response = await fetch(
  "https://pricing.api.comparepower.com/api/featured_plans?" + params
);
const plans = await response.json();

Both tdsp_duns and display_usage are required. Omitting either returns a 400 error.

2. Display the Plans

The response is an array of plan objects with pre-calculated prices and document links — the same shape as GET /api/plans:

JavaScript
plans.forEach(plan => {
  const price1000 = plan.expected_prices
    .find(p => p.usage === 1000);

  console.log(
    plan.key,
    price1000 ? `${(price1000.price * 100).toFixed(1)}¢/kWh` : "N/A"
  );
});

Featured Plans vs. Plan Search

Featured Plans Plan Search
Endpoint GET /api/featured_plans GET /api/plans
Results Curated subset (typically 3-5 plans) All matching plans
Filters TDSP only TDSP, brand, term, usage flags, and more
Best for "Recommended plans" widgets Full comparison tools with filtering

Want to earn commissions when users sign up through your integration? Apply as a partner — it's free and takes about 5 minutes.