Limit the number of words

Hello, I am using scrapingbee to scrap the content of a website.
Everything is fine. My output is raw content using json.
Only one problem, if the content is too long, my next module “open ai” can’t process it.
It basically says too many words.
So if my raw content is 4000 words, I want to “copy” the first 2000 words to the next module “open ai”.
How can I do that?

Use the length() function

1 Like

with what module?
sorry im noob

Hi @trokiano ,
If you want to work with the first 2000 characters, you can use the inbuilt text function substring .