Hello Adam,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you would like to extract CSV values directly from a REST API call using Azure AI Document Intelligence.
Is there a way to achieve this without parsing the JSON response?
Azure AI Document Intelligence offers a REST API that simplifies extracting key information from documents, including CSV data. You can interact with the service directly through this API, which eliminates the need for manual JSON parsing. By using the prebuilt-layout model, the service can extract text, text locations, tables, selection marks, and structural information from various documents and images. Also, if you enable the optional features=keyValuePairs
parameter, it can also extract key-value pairs. To use this service, you need to submit your document content—whether it's an image or a scanned PDF—to the API endpoint. The response will be a structured format containing the extracted data. https://techcommunity.microsoft.com/t5/azure-for-isv-and-startups/using-azure-ai-document-intelligence-and-azure-openai-to-extract/ba-p/4107746 and https://robkerr.ai/azure-ai-document-intelligence-rest-api
Just like it is in the response table GUI in the DI Studio?
The REST API does not natively provide data in CSV format, but you can convert the data into CSV with custom programming. To achieve a response similar to the DI Studio Response Table GUI, you should create a script or application to format the data as CSV. It starts by setting up your environment, obtaining necessary keys and endpoints, and choosing the suitable Document Intelligence model. https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/ai-services/document-intelligence/how-to-guides/use-sdk-rest-api.md
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.
Best Regards,
Sina Salam