Stract API

Stract API

GuidesGet started

What and Why, Stract API

What is Stract API, and what is it trying to solve?

By Matt Moreno ·

You know that moment when you complete a huge goal and you can finally let your shoulders relax, let the tension out of your body, and bask in the knowledge of having finished something meaningful? I'm more of a "the job is never done" kind of guy, but this is one of those rare moments where I've hit a milestone worth celebrating.

After five long months, I've taken Stract API from concept to MVP. Stract API is a tool that can take your documents and extract structured insights from them automatically.

As a way of celebrating this achievement, I wanted to share a bit about the origins and motivation for Stract. If you're curious and just want to see it for yourself, you can go to the Stract API website, or go directly to the Stract API app to try it for yourself.

Thinking about what AI is good at

A few years ago, I worked at a construction tech startup that was accepted into the Google for Startups accelerator. As a part of this program, Google gave us credits to use on their cloud services and encouraged everyone to create a new LLM-based product at their company.

Our team came up with the idea that users describe in plain language what their crew did that day, and using what we know about their crew, we populate all of the labor, material, etc. used. At a high level, this problem breaks down to passing raw user input along with a list of options, and the AI was supposed to choose the option which best matches what the user was describing.

This worked well, but it was fragile. Parsing the AI output was a challenge, bad output was a constant factor, our grasp of LLM prompting was naive, and any changes to the structure would cause it to break. I was frustrated by these challenges and really just wanted an API service which would make extracting data easy.

In my day-to-day interactions with AI, it seemed like AI was capable of pulling the data I asked for from some text, but when we tried using that capability in our app's workflow, it fell flat.

During a Google for Startups group session, I met a Director who asked for input on the Gemini cloud products we used. I mentioned our use case and asked whether there was an existing or upcoming product which could extract arbitrary structured data from unstructured inputs.

When he paused for a moment and said that they were not working on that, but that they probably should, a light flashed in my mind.

Honing the concept

Last year, I worked briefly on a new venture attempting to automate the process of determining title on a piece of land. The core product involved extracting information from documents with no clear structure and dense legal language.

Once again, I found myself attempting to create a flexible approach to extracting information from documents. And once again, I found this piece of our workflow became a cornerstone of the success of our overall product.

I spent tens of hours attempting to build software that did this, only for my cofounder to outline additional use cases and edge cases, which forced me to go back to the drawing board and reconsider my approach. The outputs were pretty good, even with middling LLMs, but the amount of effort that went into this subsystem meant that I was distracted from our core mission. Again, I just wanted an 3rd party service to do the hard stuff for me.

The venture fell apart for unrelated technical hurdles, but this proved to me once again just how impactful LLM capabilities can be to insight extraction, if we could only just get it right.

What is Stract API?

When I found myself early this Summer with time to consider my next career step, I did a bit of research on whether there were any solutions out there to the problem of extracting structured output from text data sources. I really couldn't find much... and with the Google executive's words ringing in my ears, I figured now was the best time to make it happen.

Conceptually, Stract API is very simple. You describe some kind of information you want. It can be something as simple as the plaintiffs cited in a court case, or something as complex as an opinion on how that case's judgment applies to your current situation. It can be coding and extracting insights from a market research interview transcript. It could be identifying if a specific politician is mentioned alongside some suspicious dealings in an email. Anything you can think of, especially something descriptive or insightful, Stract API can do it.

Give us the documents you want analyzed and run the analysis. In less time than it would take your team to manually review, and at a fraction of the cost, you will have CSV or JSON outputs that are easily digested and incorporated into your workflow. And when we say Stract API, we mean that API users are foremost on our mind, with synchronous endpoints for sending inputs and getting back clean output.

If this sounds intriguing to you and you want to learn more, go to our website, or if you want to jump right in and try it, go directly to the app and get 100 credits free.

What's next for Stract API?

Our next steps are focused on increasing Stract's capabilities, including:

  • Long documents: Today, we can handle relatively long documents (anything up to about 20k words, or 40 single spaced pages, is handled pretty well), but going longer can result in quickly degraded performance. We are currently implementing an agentic subsystem for handling arbitrary length documents while still extracting accurate output.
  • Improving job runtime: Jobs can generally run at around 5 - 30 seconds per document, depending on document length. However, we are in progress on a new approach that can cut that by 50-80%.
  • LLM efficacy index: Stract API is developing its own LLM efficacy index, evaluating models on their ability to extract information from text documents vs. their cost per token. This index will allow users to make a more informed choice on which model to select for their use case. Expect a white paper on this topic in the coming weeks.
  • Reach out!

    I love hearing from users or like-minded people. If you're curious about Stract, have feedback on the product, or just want to talk shop, please feel free to email me directly and I'll be sure to respond.