Inspiration

Friend of a Friend was inspired by a simple but powerful realization: our social worlds are much larger than the circles we consciously interact with. All of us on the team had moments where we met someone new and later discovered we shared dozens of mutuals, hometowns, or overlapping communities we never knew about. Those “small world” coincidences made us wonder: how many meaningful connections are already sitting just one hop away?
We wanted to build a tool that could surface those hidden links, make meeting new people easier to connect with, and help users expand their networks intentionally.


What it does

Friend of a Friend takes your existing Instagram follower data and identifies second-degree connections—people you're not following, but many of your friends are. It highlights the strongest overlaps, showing:

  • Mutual connections
  • Public bios
  • Profile links

The result is a curated list of “you two would definitely get along” potential connections, based entirely on the real structure of your social graph.


How we built it

We started by attempting classic Python web scraping, but quickly ran into Instagram’s strong anti-scraping defenses. After testing several APIs, we landed on Phantombuster, which provided a reliable way to access follower and follower-of-follower data.

From there:

  1. Backend (Flask on PythonAnywhere):

    • Fetches follower data from Phantombuster
    • Compares first-degree and second-degree lists
    • Counts occurrences to rank second-degree candidates
    • Bundles public info + mutuals into clean JSON
  2. Data Processing (Python):

    • Identifies overlapping nodes
    • Computes weights based on repeated appearances
    • Generates structured connection info
  3. Frontend (HTML + JavaScript):

    • Collects user input (their Instagram ID / API keys)
    • Sends requests to our backend using fetch()
    • Displays curated second-degree connections and info boards

No fancy visuals, no auto-generated messages, just a clean, functional engine for discovering meaningful new connections.


Challenges we ran into

  • Instagram anti-scraping protections:
    Traditional scraping approaches failed, forcing us to pivot early.
  • API inconsistencies:
    Several APIs lacked reliability or rate-limited heavily before we found a stable solution.
  • Data structuring:
    Followers-of-followers come as large lists; deduplicating, cleaning, and ranking them required careful processing.
  • Time constraints:
    We had to cut planned features—like graph visualizations and message-style generation—to ship a polished MVP.

Accomplishments that we're proud of

  • Building a fully functional pipeline from data extraction → processing → frontend display.
  • Designing a recommendation engine based entirely on intersection counts and mutual strength.
  • Deploying a working backend and frontend that anyone can try.
  • Turning a personal “small world” story into a real tool that helps people connect more meaningfully.

What we learned

  • APIs > scraping when platforms have strong defenses.
  • Trade-offs matter: shipping a solid, minimal core is better than stretching for too many half-finished features.
  • Data cleaning is as important as data collection.
  • User-facing clarity requires backend discipline: well-structured JSON and clear pipelines make everything easier.

Most importantly, we learned that even small datasets can reveal surprising patterns in how people are connected. With more time, we’d expand this project into a richer social-graph discovery tool, potentially incorporating visualizations, real-time graph metrics, and deeper connection scoring using ideas like adjacency matrices and weighted edges (e.g. ( w_{ij} = \text{number of mutuals between users } i \text{ and } j )).

Friend of a Friend started as a story and became a project that shows just how close we all already are.

Built With

Share this project:

Updates