-
Step 1 · Pick the feed and understand where the data comes from
Use an existing public AI news API; learn the latest / by-date / list endpoints
The first step isn't writing code — it's knowing where the data comes from. The AI news feed this project uses is public: no key to apply for, and a plain curl returns JSON.
Three endpoints, and the difference matters:
- Latest: the most recent AI daily digest
- By date: the digest for one specific day (empty if nothing was published that day)
- Item list: paginated history, used for the archive
Two cautions. It's a public endpoint with rate limits, so don't call it from the browser on every page load — step 2 lands it in a local JSON file. And an aggregator is not an original-content site: what you're doing is filtering, laying out and routing traffic. Keep the attribution and source links, and let titles open the original.
Checklist
- curl to the endpoint returns valid JSON
- You can explain what the latest / by-date / list endpoints are for
- You understand the aggregator is a routing page, not an original-content site
-
Step 2 · Fetch the data and land it in JSON
A scheduled fetch script writes the feed into a local daily.json
Core principle: the feed lands in a JSON file, and the front end only fetches that local file. It never calls the third-party endpoint directly.
The simplest fetch (latest issue only):
curl -s <endpoint> -o data/daily.jsonThen a small Node script to clean it up: keep only title, link, date and summary, drop the rest, and generate
archive.jsonfor the historical archive while you're at it.Why land it on disk? Three reasons: you sidestep the rate limit; your site still works from the last cache when upstream goes down; and a static site has no business calling a third party from the browser.
Once it's on disk, validate it with a JSON linter. One mismatched field name and the front end renders a blank page.
Checklist
- data/daily.json exists locally
- The file is valid JSON and has title / link / date fields
- It passes a JSON linter
-
Step 3 · Render the list on the front end
Fetch the local JSON, render cards, add date filtering
The front-end logic is small: on load,
fetch('data/daily.json'), then map the array into cards. Each card shows title, summary and date; clicking the title opens the original link.Experience details:
- A date picker, or previous / next day buttons, at the top for browsing history
- A fallback message when loading fails — never a blank page
- Card grid plus dark mode, consistent with the rest of the site
- Title links get
target="_blank" rel="noopener"so readers stay on your page
If you'd rather not start from scratch, copy
daily.jsfrom this project's AI daily page and rename a few fields.Checklist
- The page fetches daily.json and renders the list
- Clicking a title opens the source in a new tab
- A failed fetch shows fallback copy, not a blank page
-
Step 4 · Schedule updates + aggregate more sources
A daily scheduled task pulls the feed; add your own RSS when you want more
The data has to refresh itself — no manual runs.
Panel users: scheduled tasks → add a shell script task → period: daily → paste the absolute path of the fetch script.
Command line:
crontab -eand add0 6 * * * /bin/bash /root/agg/fetch.sh >/dev/null 2>&1Want more sources? Beyond the AI news feed, your own blog's RSS can go into the same
archive.json, producing a mixed stream of AI news and your own posts. Update incrementally and dedupe by date — don't append duplicates.Finally, reboot the server once and confirm the fetch task resumes on its own.
Checklist
- The fetch task appears in the scheduler
- data/daily.json's update time changes daily
- Fetching resumes automatically after a reboot
-
Step 5 · Launch + SEO + monetise the traffic
Upload, add HTTPS and a sitemap; treat the aggregator as a funnel to affiliate offers
An aggregator is a routing page by nature: people come to read AI news, and you place affiliate links for cloud servers and AI tools at the top and in the sidebar. Conversion is high, because someone reading AI news already has those needs.
Launch steps: upload the files (panel or plain Nginx), request an HTTPS certificate, write the sitemap and submit it to the search platforms.
Compliance: promo slots must be recognisable, and the footer needs a disclaimer saying which links are promotional. Never disguise news as advertising.
Long term, the aggregator is the entrance. What actually earns money is the affiliate offers and your own products it funnels people to.
Checklist
- HTTPS loads with no certificate warning
- The sitemap has been submitted
- Promo slots are labelled and the footer carries a disclaimer