Hi,

I’ve just bought a Premium API for search tweets within 30 days.

First of all, I can’t test the API with the sandbox environment because I need to use the operator ‘-is:retweet’.
My first question is: How can I test the API without having the full access to the operators?
I already tried to use a filter by myself to remove the retweets, but it’s not reliable.
I can’t use the Premium API environment for tests because I have only 500 requests/month and because it doesn’t make sense.

Second and mainly question.
I’m doing a search using the Premium API (production) and I make the same search with the same parameters at twitter.com/search.
Using the API I get only 4 results and at the site I got many more.
Shouldn’t the results be equals or at least near?

Here is the query:

Lady Night has:videos lang:pt -is:retweet

And here the parameters:

params = {
    fromDate: '201901010000',
    toDate: '201901130000',
    maxResults: 500
  }

The url of the search at the Twitter site:
https://twitter.com/search?f=videos&vertical=default&q=Lady%20Night%20since%3A2019-01-01%20until%3A2019-01-13&l=pt&src=typd

The query syntax for the website / standard is different to premium. I’d recommend reading up on this.

Hi Leandro! Unfortunately there isn’t a way to test out paid premium operators without using up your monthly requests.

I actually ran the query using the Search API request and got back a number of Tweets. Here’s my request in cURL:

  --url https://api.twitter.com/1.1/tweets/search/30day/<ENV>.json \
  --header 'authorization: Bearer <BEARER_TOKEN>' \
  --header 'content-type: application/json' \
  --data '{
                "query":"Lady Night has:videos lang:pt -is:retweet",
                "maxResults": "500",
                "fromDate":"201901010000", 
                "toDate":"201901130000"
                }'

Follow this tutorial that shows you how to setup and run a request using cURL: https://developer.twitter.com/en/docs/tweets/search/quick-start/premium-30-day

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.