Twitter

FREEMIUM
Par davethebeast | Mise à jour 19 दिन पहले | Social
Popularité

9.9 / 10

Latence

1,951ms

Niveau de service

100%

Health Check

100%

Retour à toutes les discussions

Search query parameters

Rapid account: Leftleaning 20
leftleaning20
3 महीने पहले

Are there any example of how to build a search query using the Twitter query parameters

for example including flags such as
(NASA OR Starlink) -is:retweet -is:reply
to filter out retweets and replies. I’m not sure how the URLencoding should look for this.

TIA

Rapid account: Leftleaning 20
leftleaning20 Commented 3 महीने पहले

So I have the query working and getting results but it does not seem to honor flags like
-is:retweet -has:media -is:reply
which works with the official API. I’m continuing testing but if you have any suggestions it would be appreciated.

I am using this endpoint
https://twitter241.p.rapidapi.com/search?type=Latest&count=10&query=(query)

Rapid account: Davethebeast
davethebeast Commented 3 महीने पहले

If you are testing the api on RapidAPI platform directly, then no need to urlencode the string, RapidAPI automatically urlencodes it for you, but when you are using it in your code, you need to urlencode it. Please try and let me know because it works from my end.

Rapid account: Leftleaning 20
leftleaning20 Commented 3 महीने पहले

Thanks for the reply. I can’t seem to get compounded query items to work. For example the following query format works in the native Twitter API but not in your API when I test the endpoint:

is%3Aretweet%20has%3Amedia%20puppies

https://api.twitter.com/2/tweets/search/recent?query=is%3Aretweet has%3Amedia puppies

Rapid account: Davethebeast
davethebeast Commented 3 महीने पहले

You have to urlencode the search query IN YOUR CODE.

Example, The encoding for the for the sample query you gave is: (NASA%20OR%20Starlink)%20-is%3Aretweet%20-is%3Areply

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires