Skip to main content
Solved

Get text from component using REST API

  • September 15, 2023
  • 3 replies
  • 1327 views

Can I extract a text from a component using the REST API? I have a chat baloon component and I want to extract the text from it. As of now, the only solution I found was to create a Python script where I get a JSON of my file, get the component, get the {thumbnailurl}, save the png, use an OCR to extract a text from the png. But, the OCR is returning not so good results and I want to know if there is a simpler solution to it

Best answer by tank666

Find the required node in the JSON response, look at its children, find an object with the TEXT type and the characters property.

This topic has been closed for replies.

3 replies

tank666
  • 4873 replies
  • September 15, 2023

  • Author
  • 1 reply
  • September 15, 2023

Thanks for the reply! But how could I then extract the text content from there?


tank666
  • 4873 replies
  • Answer
  • September 15, 2023

Find the required node in the JSON response, look at its children, find an object with the TEXT type and the characters property.