1

I'm trying to search for tweets that talk about NPR, but because Twitter searches the full text of URLs, my results include every tweet that links to NPR.org (a lot!). How can I search for tweets that mention "NPR", but exclude tweets that ONLY have NPR in the context of an npr.org URL?

1 Answer 1

1

In my quick tests, npr -npr.org seems to work pretty well. There's definitely a difference between that and just npr. With the latter I do see links to npr.org, but none if I exclude it.

Of course, I'd also expect that to exclude tweets where someone has simply put npr.org in their text, but that may just be a side-effect you'll have to live with.

More information: Twitter Help: Using Advanced Search

1
  • Thanks, that's helpful. Was hoping for a solution that would just ignore search terms in URLs entirely (so if someone mentions NPR AND links to us, it would still be captured in the search), but this gets me much closer to what I need. Oct 9, 2014 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
https://webapps.stackexchange.com/questions/67869/search-for-tweets-with-a-phrase-but-excluding-that-phrase-if-its-within-a-url
webapps.stackexchange.com
CC-MAIN-2023-40
152657
application/http; msgtype=response
sha1:AQQV2NJ6ZUMVJENZTUELORNRUBMOJSGA
<urn:uuid:2683d981-16ff-4f83-8fa2-639b8c60337e>
2023-10-03T06:40:34Z
104.18.10.86
text/html
sha1:6MYBMM7EMOTEMBBOBKCTKIU5G2H5O755
<urn:uuid:b83d1fdf-1cb1-476a-a6d0-2acb5b64cad6>
https://webapps.stackexchange.com/questions/67869/search-for-tweets-with-a-phrase-but-excluding-that-phrase-if-its-within-a-url
response
<urn:uuid:9afa2f39-824c-4594-8c29-a6eb25b1309e>
isPartOf: CC-MAIN-2023-40
publisher: Common Crawl
description: Wide crawl of the web for September/October 2023
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-16
software: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/