This topic contains 5 replies, has 2 voices, and was last updated by  Federico Pascual 1 year, 10 months ago.

limit of messages to send to the API?

  • Is there any limit of messages to send to the API? I have a list of 16,000 comments in a FB post that I would like to test today. I guess instead of one API call I should limit it to certain number of texts.

    Reply

    With the Free Plan, you can send up up to 20 requests per minute. Also, please take into account that the fastest way to send data to MonkeyLearn is with batch (serialized, not parallel). With batch you can classify or extract up to 200 texts with a single request (instead of 1 request = 1 classification/extraction).

    So, with the Free Plan you can analyze up to 4,000 FB comments per minute, so I believe you won’t have any problems if you want to test and analyze 16,000 comments today.

    Reply

    Ok, thank you. And with the paid Plan the limits change?

    Reply

    Yes, they do change:

    • Free Plan: 20 requests per minute.
    • Starter Plan: 30 requests per minute.
    • Production Plan: 60 requests per minute.
    • Ultra Plan: 120 requests per minute.

    Companies using our Ultra Plan are analyzing around 24,000 texts per minute. You can can learn more about our pricing here. If you need higher speeds, we can made a custom plan that fits your needs.

    Reply

    Hello,

    related to the plans limitation I don’t understand a point about serialization of batches.

    I’m using a Python code found on your blog that I interpret as OK for serialization :


    #Interrogation du classifier Monkeylearn
    step = 200
    for start in xrange(0, len(content_df), step):
    end = start + step
    response = requests.post(
    "https://api.monkeylearn.com/v2/classifiers/xxxxxxxxx/classify/",
    data=json.dumps({
    'text_list':content_df[start:end]
    }),
    headers={
    'Authorization': 'Token {}'.format(API_KEY),
    'Content-Type': 'application/json'
    }).json()

    When I send less than 200 mentions to the targeted classifier I got a perfect result (sentiments are OK). If I try to send the same file augmented to 3900 mentions I got a KO classification on the 181 first mentions (that were OK in the first attempt with the reduced file) then no result on the next mentions.

    I thought I was respecting both limits of 20 requests per minute + 200 mentions per request

    What is wrong with this way of sending requests?

    Reply

    It seems that there might be an error in the way you call the API. We have made some tests and everything is working as normal.

    Please try sending the requests using the official Python client as it handles the serialization and limits for you: https://github.com/monkeylearn/monkeylearn-python

    Reply

Reply To: limit of messages to send to the API?

Your information: