DBpedia Spotlight API: text length limit

Dear friends,
by trial and error I have the impression that if a text is longer than around 950-1000 words, the REST API GET will fail with a 414 URI TOO LONG message.

I would need to try analyzing texts that could be 2-3000 words long.

What’s the best approach? Thanks

Switch from GET request to POST request if you were using GET req previously. If this is not the case then tag me on this issue on github my id is - AritraLeo. I would like to have a look into it.
Thanks!

HI! Yeah I intend to do this on even longer texts. Should I just loop the text? Shifting to Post did not increase the limit :slight_smile:

Ok !
There can be multiple reasons for this issue because normally in POST req the data limit is not an issue. But there can be some timeout or server config that might cause this.
To resolve this the only proven solution that I had implemented a few months back to send huge amount of text data (json as string) was as follows -
This is a new approach to the design flow so there’ll be a lot of changes needed.

  1. While sending the req (only POST cuz GET will never work) first make a blob object of the data and store it to something like S3 / Firebase.
  2. send only the URL of the stored data as the response.
  3. Fetch the data stored via the URL and perform operations necessary and finally delete the data.
    If your storage supports TTL function then use that simply !

I think this will help.
Thank You !