Build an on this day bot for X
history, birthdays, anniversaries
Pick a niche, pull the date from Wikimedia's free feed, and schedule the next 30 days in one request. Poets, jazz, football, space: the narrower the account, the faster it grows. No X developer account, no per-post billing.
Card required, cancel any time.
The short answer
Call https://api.wikimedia.org/feed/v1/wikipedia/en/onthisday/all/MM/DD (free, no key, send a User-Agent) to get that date's events, births, deaths and holidays. Keep the entries that match your niche, write one post per day, and send them to POST https://opentweet.io/api/v1/posts with scheduled_date, up to 50 per request. Run it once a month and the account posts every day on its own.
Six kinds of on-this-day post
Accounts posting dated anniversaries already run on OpenTweet, like a poetry account that posts a line from a poet on the day they died. The format works because every day has a new date and the content is never the same twice.
Today in history
DailyOne curated event with the year first. The selected list is short and already picked by Wikipedia editors.
Niche anniversaries
DailyPoets, jazz musicians, astronauts, a club's former players. Filter births and deaths by description.
Born today
DailyA birthday post for someone your followers love. Works well with a short quote or a known work.
Holidays and feast days
DailyNational days, observances and feast days for the date. Good for brand accounts that want a light daily post.
Local history
DailyEvents from one country or city, in its own language. The German, Spanish and Turkish feeds are full.
Then and now
Twice a dayThe historical event in the morning, a scheduled follow-up in the evening about what changed since.
The free feed: any date, five lists
Swap all for selected, events, births, deaths or holidays to get one list. Each entry has the year, a one-line text, and the Wikipedia pages it mentions, with a short description and often a thumbnail. The date is month and day only, so you can fetch any day of the year in advance.
GET https://api.wikimedia.org/feed/v1/wikipedia/en/onthisday/deaths/10/28
User-Agent: poetsbot (https://x.com/yourhandle)
{
"deaths": [
{
"year": 1998,
"text": "Ted Hughes, English poet and playwright (born 1930)",
"pages": [{ "title": "Ted_Hughes", "description": "English poet (1930–1998)", ... }]
},
...
]
}Wikimedia asks every client to send a User-Agent with a way to contact you. Without one, requests can be blocked.
A month of niche anniversaries in one run
This version posts poets. It reads the next 30 dates, keeps the deaths and births whose text says "poet", picks the best-known one, and schedules each post for 09:00 UTC on its day. Days with no match are skipped, not filled with something off-topic. No link in the text, so none of them count as link posts.
Python
import datetime, requests
OT_KEY = "ot_your_key"
UA = {"User-Agent": "poetsbot (https://x.com/yourhandle)"}
NICHE = ("poet",) # or ("jazz",), ("footballer",), ("astronaut",)
posts, day = [], datetime.date.today()
for i in range(30):
d = day + datetime.timedelta(days=i + 1) # start tomorrow
feed = requests.get(
f"https://api.wikimedia.org/feed/v1/wikipedia/en/onthisday/all/{d:%m}/{d:%d}",
headers=UA,
).json()
people = [("died", e) for e in feed["deaths"]] + [("was born", e) for e in feed["births"]]
hits = [(verb, e) for verb, e in people if any(w in e["text"].lower() for w in NICHE)]
if not hits:
continue # skip a day rather than post off-niche
verb, e = max(hits, key=lambda h: len(h[1]["pages"][0].get("extract", ""))) # best-known first
name = e["text"].split(",")[0]
posts.append({
"text": f"On this day in {e['year']}, {name} {verb}.\n\n{e['pages'][0].get('description', '')}",
"scheduled_date": f"{d:%Y-%m-%d}T09:00:00Z",
})
for start in range(0, len(posts), 50): # 50 posts per request
requests.post(
"https://opentweet.io/api/v1/posts",
headers={"Authorization": f"Bearer {OT_KEY}"},
json={"posts": posts[start:start + 50]},
)# on the 1st of every month at 06:00 UTC, schedule the next 30 days
0 6 1 * * /usr/bin/python3 /home/you/onthisday.pyScheduled posts sit in your OpenTweet queue, where you can read and edit the month before it goes out. Every field is in the API reference.
The same bot in other languages
Change /en/ in the URL. Each language edition has its own lists, with people and events that matter to its readers. Counts below are for October 29, tested on October 29, 2026.
| Language | Code | What the feed returned |
|---|---|---|
| English | en | 17 selected, 57 events, 212 births, 96 deaths, 13 holidays |
| German | de | 71 events, 351 births, 153 deaths |
| French | fr | 50 events, 111 births, 101 deaths, 34 holidays |
| Spanish | es | 66 events, 156 births, 71 deaths, 29 holidays |
| Portuguese | pt | 48 events, 214 births, 32 deaths |
| Turkish | tr | 32 events, 82 births, 52 deaths |
| Chinese | zh | 56 events, 100 births, 37 deaths |
| Italian | it | 41 events, no births or deaths |
| Japanese | ja | Not available (404) |
Running history accounts in several languages? See the multilingual news account guide for one key across many X accounts.
Let an AI agent add the story
The one-line entry is a fact. What gets reposts is the story behind it. Connect Claude, ChatGPT or Cursor to the OpenTweet MCP server and ask:
Check the facts in the queue before the week starts. Models get dates wrong, and a history account lives on being right.
Which plan fits your account
Flat monthly price. An on-this-day account posts a few times a day, so the deciding number is how many accounts you run.
| Setup | Typical volume | Plan |
|---|---|---|
| One history or niche account | 1-5 posts a day | Pro, $19.99/mo, 20 posts a day |
| The same bot in a few languages or niches | 3 accounts | Advanced, $29/mo |
| A network of history accounts | Up to 10 accounts | Agency, $49/mo |
Posts with a URL count toward link posts: Pro 1 a day, Advanced 10, Agency 20, plus link credits. Attaching an image with media_urls is not a link post. See pricing.
Credit or rewrite. Wikipedia text is CC BY-SA. Each Commons image has its own license. Poems and lyrics by people who died after about 1955 are usually still under copyright, so quote a line at most.
Skip rather than pad. A day with nothing on-niche is better left empty than filled with a random event. Followers came for the niche.
Label it. Turn on the Automated label in your X settings, and never auto-reply under other people's posts. More in X automation rules.
Frequently asked questions
How do I make an "on this day" bot for X?
Fetch today's events, births or deaths from Wikimedia's free feed (https://api.wikimedia.org/feed/v1/wikipedia/en/onthisday/all/MM/DD), pick one that fits your niche, and send it to POST https://opentweet.io/api/v1/posts. Because the feed takes any date, you can also build a whole month in one run and schedule every post with scheduled_date. OpenTweet posts through a normal X login, so you never create an X developer app.
Is there a free "on this day in history" API?
Yes. Wikimedia's feed API returns five lists for any date: selected (a short curated list), events, births, deaths and holidays. It needs no key, only a User-Agent header that names your app and a contact. On October 29, 2026 the English feed had 17 selected events, 57 events, 212 births, 96 deaths and 13 holidays for that date.
Which languages does the Wikimedia On this day feed support?
We tested it on October 29, 2026: English, German, French, Spanish, Italian, Portuguese, Turkish, Chinese, Russian and Arabic return data. Japanese returns a 404. The lists differ by language, and some are thin: Italian had events but no births or deaths. Use the language your audience reads instead of translating the English feed.
How do I make it about my niche, not general history?
Filter the births and deaths by the short description Wikipedia gives each person. Every entry has a text like "Dutch author, poet, and songwriter (born 1937)" and a page description. Keep the ones that contain "poet", "jazz", "footballer", "physicist" or whatever your account is about. A narrow account (poets who died today, a club's players born today) grows faster than another general history account.
Can I use the Wikipedia text as the post?
Wikipedia text is licensed CC BY-SA, which requires attribution. The one-line entries are short facts, but the safest habit is to write the post in your own words, or credit Wikipedia. Thumbnails come from Wikimedia Commons, where each file has its own license, so check before you attach one.
Can I connect the feed to the OpenTweet RSS or JSON connector?
Not directly. The feed is one JSON object with lists named selected, births, deaths, events and holidays, and the JSON connector only splits responses whose list sits in items, data, results, entries, records or posts. Use a short script, which also lets you filter by niche and pick the best entry.
Can an on-this-day account earn money on X?
Only with original posts. X replaced Creator Revenue Sharing with Original Content Rewards on September 8, 2026, which needs 500 verified followers and 500K verified impressions in 90 days. A post that copies the Wikipedia line is not original. Accounts that earn add something: a story, a photo they have rights to, a link to a primary source, or a take on why it matters.
Want jokes or quotes instead? See the joke of the day bot. Posting records and trivia for a sport? See the sports stats bot.
Everything you can build on X with OpenTweet
Post to X from your code, a watcher, or an AI agent. Start anywhere in the cluster.
OpenTweet vs the X API
Post, schedule, and automate X without a developer account or the $200/mo minimum.
X DM outreach, human-approved
Find and qualify leads, AI-draft DMs, approve each one, and drip-send from your own account via API or MCP.
Post to X without an API
The clean, account-safe way to post to X from your code or an AI agent.
Twitter MCP Server
Give Claude, Cursor, and OpenClaw the ability to post to X. 44 tools included.
Developer docs
Quickstart, API keys, MCP setup, and the REST reference for posting to X from code or an agent.
Cross-posting reference
One call posts to X, Bluesky and LinkedIn. The platforms field, per-network results, and why a network gets skipped.
Social media API for AI agents
Three ways an agent can post to X, Bluesky and LinkedIn, and the trade-offs of each.
LinkedIn MCP server
Post and schedule to a LinkedIn profile from Claude or Cursor through the official LinkedIn API.
XMCP vs OpenTweet
X's official MCP server bills per API call and cannot schedule. Compare it with the flat-fee hosted MCP.
MCP for AI agents
Connect your AI client to X in under two minutes, no X developer account.
Developer API and keys
REST endpoints, one bearer key, and usage tracking. Build on OpenTweet.
OpenTweet for AI agents
The posting layer for autonomous agents and automations that live on X.
Build an AI Twitter persona
Give your AI agent its own X account. Setup, cadence, and the rules that keep it safe.
Best MCP servers for social media
The 2026 ranked list. How the hosted OpenTweet MCP compares with the official X MCP and others.
Best API to post to X
Seven options priced at real volumes, and why links decide the bill.
Cheapest way to post to X via code
Flat fee vs pay-per-use. Why the $0.20 per-link fee flips the math past ~145 link posts a month.
X API pricing 2026
Every pay-per-use X API endpoint price from docs.x.com in one searchable table.
Bluesky posting API
Post and schedule to Bluesky with one REST call and OAuth, and cross-post to X and LinkedIn in the same request.
Automate LinkedIn posts
Post to LinkedIn from an AI agent, n8n or a script through the official Posts API, with one REST or MCP call.
Next month's history, already scheduled
Connect X, create a key, and schedule 30 days of anniversaries in one run.