Back to Tools

Content Hub Classifier

Use cases

Organising existing content into topic clusters Automating content categorisation at scale Identifying content hub categories Extracting subtopics for internal linking

Uses OpenAI gpt-4o-mini (default; the app also offers gpt-4o and gpt-4.1) with JSON schema validation for consistent structured output.

Selects the most specific and relevant single content hub category, extracts key subtopics as an array, and recommends related products.

Uses UK English conventions.

The CLI script exports arrays to CSV as JSON-encoded strings; the app joins subtopics and products with commas.

Streamlit App Requires API Key

Platform

Browser-based (no installation required)

Input

Article text

OpenAI API key

Output

CSV with topic classifications and subtopics

Launch App View Source

Features

  • Model choice of gpt-4o-mini, gpt-4o or gpt-4.1 (script defaults to gpt-4o-mini)
  • Strict JSON schema output for consistent structure
  • Primary topic and single content hub category per article
  • Key subtopics and related product recommendations
  • UK English conventions
  • Batch CSV processing with per-row error status and 0.5s delay between calls

How to use

  1. 1 Enter your OpenAI API key (or set OPENAI_API_KEY for the script)
  2. 2 Choose single article or batch CSV input
  3. 3 For batches, select the column containing article text
  4. 4 Run the analysis to get topic, category, subtopics and products
  5. 5 Review the category distribution chart and error counts
  6. 6 Download results as CSV (JSON download for single articles)

Frequently asked questions

Can I make it classify into my own list of hub categories?
Not out of the box. The JSON schema only enforces the response shape; content_hub_category is a free-text string the model invents per article, guided by a prompt asking for the most specific single category. That means two similar articles can come back with differently worded categories, so expect to normalise names afterwards. To force a fixed taxonomy you would need to edit the system prompt (or the schema) in the source to include your allowed category list.
What does the batch CSV need to contain?
Just a column with the article text; you pick which column in the UI, blank rows are dropped, and every other column is ignored. Each row triggers one API call with a 0.5 second delay between calls. There is no built-in URL fetching, so you need the article text already extracted into the CSV.
Which OpenAI models can I use?
The hosted Streamlit app lets you choose gpt-4o-mini, gpt-4o or gpt-4.1. The downloadable script hardcodes gpt-4o-mini in the MODEL constant and reads the API key from the OPENAI_API_KEY environment variable rather than an input field.
What happens when an article fails to classify?
The batch keeps going. Failed rows are written to the results with empty classification fields and the error message in a Status column, and the summary shows success and error counts, so you can filter the CSV and re-run only the failures.
Why is the article text cut off in my results file?
Only for display: the Article column in the batch output is truncated to 200 characters as a reference, but the full text of each row was sent to the model for classification. Note the app's batch CSV joins subtopics and products with commas, while the script version encodes them as JSON strings.

Need something built for your business?

This tool started as bespoke client work. I build custom scripts, data pipelines, and full apps for SEO and product data problems that off-the-shelf tools don't solve.

Tell Me What You Need