Nóra Al Haider
5 min readMay 28, 2018


There are some great legal platforms out there and I’m sure that many will be developed in the future that will truly bring about change in the legal field. However, some legal platforms feel redundant. Not because they do not work well, but because they do not reach their intended audience. I understand how hard it is to connect a new platform to an audience, but I do not think that building a new platform for the sake of having a shiny new website, app or tool should be the focus of legal tech.

Legal tech should first and foremost be about the user and the legal problem. Yes, tech can provide an efficient and innovative solution, but it should be a user-centered solution. If people do not flock to the latest legal platform then we should look at existing platforms that already have massive amounts of users and discern whether legal tech and design can alleviate the legal problems people are discussing online.

One of these existing platforms is Reddit. Reddit can best be described as an online message board where people can post text, images, links, etc. Subjects are categorized in subreddits. One of these subreddits is As the name already implies, this is a place where about 1,201,271 subscribers post their problems regarding relationships. Divorce is an often discussed topic on this subreddit in both the submissions as well as the comments.

The goal of this project was to build a Reddit Divorce Bot. Bots on Reddit are automated software agents that create certain programmed actions when a prompt is provided by either a user or a keyword. The initial idea was to build a bot that would provide open source information regarding divorce once it is prompted by certain keywords.


Building the bot was easier than I expected thanks to PRAW. PRAW stands for Python Reddit API Wrapper and allows developers to easily access Reddit’s API. An API is a way to interact with an application. Through the use of programs, code information from Reddit can be requested and sent back. To simplify it even further, an API allows you to engage in a conservation with an application. In my case I needed to ask Reddit to send me information that my bot on its turn will use to further engage in a conversation with the application. The API allows you to request information from the application and receive, process and send back information to the application.

PRAW allows developers to easily access that information. The documentation is especially useful for bots as it describes what the specific classes are that you need to put in your code to engage in a conversation with the Reddit application. I will not get into the specific details of how to write a bot as there are countless amazing tutorials out there. A good tutorial is of importance, but the process of building a product, especially one that needs to handle natural text information, remains a question of trial-and-error. Below, I have described the main (pain) points that I came across while developing the divorce bot.



One of the most important things to think about is the keyword that the bot will use to scan posts. I decided to start with the keyword ‘divorce’. My plan was to further delineate the keyword if this particular word resulted in providing too many hits. Luckily, the keyword was perfect for my intended use. It did not result in either too many or too few hits, however there were other difficulties I experienced while building the bot.

The first version

My initial idea was to let the divorce bot respond to the original poster (OP) when the original post mentioned the keyword divorce. After letting my bot run for a bit, I realized that my initial idea was not working well. I quickly realized why.

My objective was to provide legal tools to people who are considering or planning a divorce. People who have relationship problems do not immediately mention the keyword divorce in their initial post submission. Most of the OPs who mentioned divorce were either talking about family members or a divorce that has happened in their past. So there were two paths I could now take, either adjust the keywords in my code or focus on the commenters. I decided to pick the latter as implementing every possible combination of keywords pointing out that someone wants to get a divorce is not practical.

The second version

Instead, I came up with a shortcut. My bot relies on commenters replying to the OP’s question or story. Actual human beings scan the post and already determine whether divorce might be an option for the OP. Once the commenters determine that divorce might be a good option for OP’s particular story, they mention the word divorce in their comment. My bot searches for this keyword and then replies in that topic with useful legal tools.


So now that the bot is up and running the next step sets in. I have to analyze the results and the posts of the bot in order to further develop and improve it. My analysis will also help me to understand what kind of resources would be most beneficial to users who click on the resources. So let’s get to the (big pink) elephant in the room, the only thing I haven’t discussed yet: the legal resources. Well, this part is quite extensive and involves a whole lot of legal design. I’ll be therefore discussing and showing the results of my divorce bot in the next post.



Nóra Al Haider

Assistant Director at Stanford’s Legal Design Lab Portfolio: Twitter: @noraalhaider LinkedIn: