Twitter now restricts max_results to be 100 instead of 500 if tweet.fields=context_annotations is used in the academic access endpoint.

This was not documented anywhere unfortunately.

{
  "errors": [
    {
      "parameters": {
        "tweet.fields": [
          "context_annotations"
        ],
        "max_results": [
          "500"
        ]
      },
      "message": "when requesting `tweet.fields=context_annotations` `max_results` must be less than or equal to `100`"
    }
  ],
  "title": "Invalid Request",
  "detail": "One or more parameters to your request was invalid.",
  "type": "https://api.twitter.com/2/problems/invalid-request"
}

Is this a temporary “fix” or is this permanent? I only noticed because it broke our code unexpectedly. I’d like to know so that we can either document it as a limitation or work around it somehow.

3 Likes

Apologies for the lack of knowledge, I’ll add to the announcements for greater visibility. It is a permanent change:

1 Like

Thanks! This makes searches slower unfortunately, but easier to implement!