Perplexity, unbundled: scrape Google, ask GPT
Built to prove that a solo developer can reconstruct Perplexity’s core loop with nothing but a scraper, a parser, and an OpenAI API key.

What it does
Clarity AI is a minimal Perplexity clone written in TypeScript. It takes a user query, scrapes Google for relevant pages, extracts the text, bundles it with the question into a prompt, and asks OpenAI’s API to generate an answer that streams back in real time. The entire architecture is essentially search retrieval followed by context stuffing.
The interesting bit
The README doesn’t pretend this is sophisticated infrastructure. It openly admits that Google scraping is a cost-and-rate-limit workaround, and the improvement roadmap reads like a confession of technical debt: switch to a real search API, fix prompt engineering, and get source citations working on newer models. That honesty is refreshing.
Key highlights
- Straightforward RAG pipeline: Google scraping → HTML parsing → prompt construction → OpenAI synthesis
- Streams answers back to the user for a conversational feel
- Explicitly designed as an educational/demo project (“use the code for whatever you like”)
- Improvement list includes replacing the scraper with the Google Search API, adding follow-up searches, and training a custom synthesis model
- Built by a solo developer as a proof-of-concept
Caveats
- Currently relies on scraping Google results rather than using an official search API, which the author notes is both slower and a circumvention of rate limits
- Source citations appear tied to the legacy
text-davinci-003model; getting them working in other models is listed as an unresolved task - The project is described as “simple” by its own author, so expect prototype-grade code, not production infrastructure
Verdict
Grab this if you want to understand how search-augmented LLM apps work under the hood, or if you need a starter scaffold for a RAG interface. Skip it if you’re looking for a production-ready alternative to Perplexity; the README itself suggests you should just use the real thing.
Frequently asked
- What is mckaywrigley/clarity-ai?
- Built to prove that a solo developer can reconstruct Perplexity’s core loop with nothing but a scraper, a parser, and an OpenAI API key.
- Is clarity-ai open source?
- Yes — mckaywrigley/clarity-ai is open source, released under the MIT license.
- What language is clarity-ai written in?
- mckaywrigley/clarity-ai is primarily written in TypeScript.
- How popular is clarity-ai?
- mckaywrigley/clarity-ai has 1.4k stars on GitHub.
- Where can I find clarity-ai?
- mckaywrigley/clarity-ai is on GitHub at https://github.com/mckaywrigley/clarity-ai.