> For the complete documentation index, see [llms.txt](https://edrus.gitbook.io/appgregator-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edrus.gitbook.io/appgregator-api-docs/appgregators/social-media/twitter/api/search-tweets/recent-search/search-and-request-tweet-fields.md).

# Search and request tweet Fields

<mark style="color:blue;">`GET`</mark> `https://us-central1-appgregator.cloudfunctions.net/twitter/search/recent/`

#### Query Parameters

| Name                                               | Type   | Description     |
| -------------------------------------------------- | ------ | --------------- |
| name<mark style="color:red;">\*</mark>             | String | qantor.co.id    |
| connection\_name<mark style="color:red;">\*</mark> | String | twitter-1       |
| query<mark style="color:red;">\*</mark>            | String | from:rifqyyusuf |

#### Headers

| Name                                        | Type   | Description                      |
| ------------------------------------------- | ------ | -------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | String | 43c464439b5507293ba7b315c9875907 |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "data": [
        {
            "entities": {
                "mentions": [
                    {
                        "start": 0,
                        "end": 11,
                        "username": "RonaldAdrs",
                        "id": "1541307718920572928"
                    }
                ]
            },
            "lang": "en",
            "author_id": "245297600",
            "in_reply_to_user_id": "1541307718920572928",
            "referenced_tweets": [
                {
                    "type": "replied_to",
                    "id": "1542131099983290368"
                }
            ],
            "text": "@RonaldAdrs hello",
            "id": "1542375416014331905",
            "created_at": "2022-06-30T05:12:09.000Z",
            "possibly_sensitive": false,
            "source": "Twitter Web App"
        },
        {
            "entities": {
                "mentions": [
                    {
                        "start": 0,
                        "end": 11,
                        "username": "RonaldAdrs",
                        "id": "1541307718920572928"
                    }
                ]
            },
            "lang": "en",
            "author_id": "245297600",
            "in_reply_to_user_id": "1541307718920572928",
            "referenced_tweets": [
                {
                    "type": "replied_to",
                    "id": "1542131099983290368"
                }
            ],
            "text": "@RonaldAdrs bot server",
            "id": "1542374902925500416",
            "created_at": "2022-06-30T05:10:07.000Z",
            "possibly_sensitive": false,
            "source": "Twitter Web App"
        },
        {
            "entities": {
                "mentions": [
                    {
                        "start": 0,
                        "end": 11,
                        "username": "RonaldAdrs",
                        "id": "1541307718920572928"
                    }
                ]
            },
            "lang": "en",
            "author_id": "245297600",
            "in_reply_to_user_id": "1541307718920572928",
            "referenced_tweets": [
                {
                    "type": "replied_to",
                    "id": "1542131099983290368"
                }
            ],
            "text": "@RonaldAdrs hello from developer",
            "id": "1542374103738642432",
            "created_at": "2022-06-30T05:06:56.000Z",
            "possibly_sensitive": false,
            "source": "Twitter Web App"
        }
    ],
    "meta": {
        "newest_id": "1542375416014331905",
        "oldest_id": "1542374103738642432",
        "result_count": 3
    }
}
```

{% endtab %}

{% tab title="200: OK not found" %}

```javascript
{
    "meta": {
        "result_count": 0
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```shell
curl --location --request GET 'https://api.twitter.com/2/tweets/search/recent?query=nyc&tweet.fields=author_id,created_at,entities,geo,in_reply_to_user_id,lang,possibly_sensitive,referenced_tweets,source'
```

{% endtab %}

{% tab title="NodeJs - Axios" %}

```javascript
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.twitter.com/2/tweets/search/recent?query=nyc&tweet.fields=author_id,created_at,entities,geo,in_reply_to_user_id,lang,possibly_sensitive,referenced_tweets,source',
  headers: { }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/twitter/search/recent?name=qantor.co.id&connection_name=twitter-1&query=from:rifqyyusuf',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAG3QeAEAAAAAc7YSF3sGXuwgZwjb8KYrl1p6o%2BM%3D92WQ24e4vqUntYK3OUKuxz2kKWWwRHwBW3FYEPGpya15ZEiSqT',
    'x-api-key: 43c464439b5507293ba7b315c9875907'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}
{% endtabs %}
