# How can i pull data from twitter to logstash

**URL:** <https://discuss.elastic.co/t/how-can-i-pull-data-from-twitter-to-logstash/1353>\
**Category:** Logstash\
**Created:** [May 27, 2015, 4:43am UTC](https://discuss.elastic.co/t/how-can-i-pull-data-from-twitter-to-logstash/1353 "2015-05-27T04:43:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dan](https://discuss.elastic.co/u/Dan)\
**Post date:** [May 27, 2015, 4:43am UTC](https://discuss.elastic.co/t/how-can-i-pull-data-from-twitter-to-logstash/1353/1 "2015-05-27T04:43:36Z")

</div>

Hi All,

How can i pull data from twitter to logstash.  
Example:  
cocacola and its hashtag @cocacola

I wan't only pull data from cocacola hashtag.  
Please give me step by step procedure.  
I can able to pull data from twitter But i need data from particular hashtag.  
For this i used below code in config file.

input {  
twitter {  
# add your data

```
	consumer_key => ""
	consumer_secret => ""
    oauth_token => ""
    oauth_token_secret => ""
    full_tweet => true		
    keywords => ["*"]
	full_tweet => true
}

```

}

output {  
elasticsearch\_http {  
host =\> "localhost"  
index =\> "twitter2"  
index\_type =\> "tweet"  
}  
}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 27, 2015, 4:59am UTC](https://discuss.elastic.co/t/how-can-i-pull-data-from-twitter-to-logstash/1353/2 "2015-05-27T04:59:09Z")

</div>

You need to set something in the keywords, otherwise it will get everything.

See [the docs](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-twitter.html) for more info.

---

<div class="post-metadata">

**Author:** ![Dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dan](https://discuss.elastic.co/u/Dan)\
**Post date:** [May 27, 2015, 5:14am UTC](https://discuss.elastic.co/t/how-can-i-pull-data-from-twitter-to-logstash/1353/3 "2015-05-27T05:14:07Z")

</div>

Hi warkolm

Thanks for your quick reply.  
Even if i use keyword its only showing me the data where the keyword is present.

I need data into logstash like

[https://twitter.com/CocaCola](https://twitter.com/CocaCola)

I want to pull data whatever in the above url.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:39am UTC](https://discuss.elastic.co/t/how-can-i-pull-data-from-twitter-to-logstash/1353/4 "2017-07-06T05:39:15Z")

</div>


