Unstructured.io is a provider that supports extraction of data from multiple file types. And if you want to have a look at the list of files supported, you can go to the unstructured.io website. And in here, you could go to the API section. And then within the supported file types, you can see that they offer the extraction from many different file types.
And API is what we're going to be utilizing. for this video. So we're going to go to the serverless API.
This is available from unstructured and there are some instructions how you can make an account and get the API key. So if you were to click this, you'll be taken to a platform like this where you have the API keys available. You can monitor your usage as well as billing.
So we're going to bring this API key over to Langflow by using this key only option and within the component that's available. So you could search for unstructured and you'll see the loader available. And then we're going to paste the API key here. And for example, I've uploaded a PDF and I ran this component.
And what I see is that there are a bunch of elements. Those are extracted. And each of those are categorized properly.
So I see title, I see images, I see text over here. So it goes through the PDF and make sure that it categorizes the extraction and also save that accordingly. So when we pass it through our flow, and in this case, what I did is I just started a new project with Document QA. And that's exactly what I utilize for the rest of the flow.
And the first part of it, which was the file loader, I replaced it with unstructured component. And now when we run the flow, we're just asking how to install the device. This is something available as instructions in the PDF provided. Now we see that the results are available, and those are based on the text that was extracted from the PDF. And the good thing about using unstructured is there are multiple file types that you can provide.
And regardless of the file type, it calls the API, extract the text and the visuals from it, and then passes it through the flow. And in case if you're building an application that uses the API, you could go to the API section in here, you can copy the curl command, as well as you can pass the file as one of the parameters of the API. So you could send any file from your front end application. and process it through the flow and get the response back.