Day 99 of 100 Days Coding Challenge: Python
Today’s quest: teach Business Rader 3000 how to find “similar companies.” Easy to say, trickier to do. Originally, the plan involved OpenCorporates, Clearbit, and Crunchbase. Yesterday, however, reality crashed the party. OpenCorporates? Pricey. Clearbit? No more free accounts. Crunchbase? Definitely not in the “hobbyist budget.”
At first, I felt like someone standing outside a candy store with empty pockets. But then I realized—who needs the fancy candy shop when you can make your own fudge at home? That’s the fun of coding: it may take more effort (and a little mess), but you can build something that works without spending a fortune. My new strategy? A patchwork of cheaper (or free) sources and a bit of scraping magic. After all, constraints often make the project more interesting.
Today’s Motivation / Challenge
Why does this matter? Because companies don’t exist in isolation. If you know who the competitors are, you suddenly see patterns—like spotting rival coffee shops at every street corner. Finding “lookalike” businesses is the first step toward building a tool that doesn’t just tell you about one company but about the whole ecosystem it lives in.
Purpose of the Code (Object)
The code takes a company name and then searches different sources (Owler, Yahoo, Wikidata) to find competitors or similar businesses. If one source doesn’t answer, another fills the gap. The result is a short list of peers, each with a name and website—kind of like giving you a curated guest list for the company’s business reunion.
AI Prompt
Day 3 of Business Rader 3000
Find similar companies.
- Do not use OpenCorporates (too expensive), Clearbit (no more free accounts), or Crunchbase (too expensive).
- Use Owler for occasional free searches.
- Use Yahoo Finance for ticker and industry peers.
- Use Wikidata SPARQL for international coverage.
Return a list of similar companies + websites.
Functions & Features
- Prompt user for a company name.
- Query Owler to get competitors (via scraping or API).
- Use Yahoo Finance for peer info based on industry/sector.
- Run a Wikidata SPARQL query to fetch related companies with official websites.
- Provide a clean list of names + URLs.
- Normalize company names to avoid simple typos breaking everything.
Requirements / Setup
You’ll need:
- Python 3.11+
- Install libraries:
pip install requests yfinance
(Optional: SPARQLWrapper for Wikidata queries.)
Minimal Code Sample
import yfinance as yf
company = “F” # Ford ticker
info = yf.Ticker(company).info
print(f”Industry: {info.get(‘industry’)}”)
print(“Similar companies: (placeholder for Owler/Wikidata results)”)
This pulls Ford’s industry, then you’d add competitor lookups from Owler or Wikidata.
Notes / Lessons Learned
I discovered Owler, which kindly offers free searches if you don’t bombard it. Perfect for this project. Yahoo didn’t have a dedicated “competitors” endpoint, but industry info is enough to infer peers. Wikidata, meanwhile, is like that overachieving student—quirky, international, and full of surprising coverage.
Of course, things went sideways when I mistyped “Ford” as “Forrd.” The script gave me nothing but errors. That’s when I remembered the Japanese concept of poka-yoke: mistake-proofing. I built in a normalization step so my typos wouldn’t torpedo the whole run. I also added a fallback list by industry, so even if the APIs go on strike, I still get something useful back. Debugging felt less like a chore and more like teaching the code to politely say, “Did you mean Ford, not Forrd?”
Optional Ideas for Expansion
- Add a fuzzy search so the program auto-corrects near-miss spellings.
- Save competitor lists to a CSV for easy reuse.
- Visualize the competitor network with a simple graph.

