Twingly Blog Search Language

Introduction

The Twingly search language provides a powerful set of tools to be used when querying the public blog search and the Blog Search API.

Searching for blog posts using keyword

Search all fields for the given keywords.

# search for posts containing the words twingly and blog
twingly blog

# search for posts containing the phrase "I love blogging"
"I love blogging"

# search for posts containing the words twingly or blog
twingly OR blog

# search for posts containing the words twingly and either blog or blogs
twingly AND (blog OR blogs)

# search for posts containing the word twingly but not the word blog
twingly -blog

Searching for Chinese, Japanese and Korean characters

Chinese, Japanese and Korean (CJK) characters are handled as individual words. To search for multi-character words, the word needs to be quoted as a phrase.

# Search for posts containing containing 東京 (Tokyo).
"東京"

# Search for posts containing 東 (Eastern) and 京 (Capital).
# For example a post mentioning both "東大" Tokyo University and "京都市" (Kyoto) will match.
東京

Limiting search to a specific field

By default all searchable fields are queried, you can limit the search to specific fields.

# search just the text
fields:summary twingly

# search the text and the title
fields:summary|title twingly

The supported arguments to fields are:

Searching for blog posts linking to specific sites

You can search for blog posts that link to specific pages. Note that URLs are normalized in the index, check out the URL normalization section.

# search for posts that link to any page on twingly.com
link:twingly.com

# search for posts that link a specific page on twingly.com
link:twingly.com/ping

# search for posts that link to any page on twingly.com *and* techcrunch.com
link:twingly.com,techcrunch.com

# search for posts that link to any page on twingly.com *or* techcrunch.com
link:twingly.com|techcrunch.com

# search for posts linking to twingly.com but not pingomatic.com
link:twingly.com -link:pingomatic.com

Note that the link: and -link: operators are computationally expensive. Excessive use of them may slow down the query considerably or even result in a query timeout.

Searching for blog posts on a specific domain

You can search for blog posts on a specific domain, including subdomains. Note that URLs are normalized in the index, check out the URL normalization section.

# search for blog posts on twingly.com, including blog.twingly.com
site:twingly.com

# search for blog posts on several domains
site:twingly.com|primelabs.se

# search for blog posts mentioning twingly but not on twingly.com
twingly -site:twingly.com

Note that the site: and -site: operators are computationally expensive. Excessive use of them may slow down the query considerably or even result in a query timeout.

Searching for blog posts on a specific blog

You can search for blog posts on a specific blog. Note that URLs are normalized in the index, check out the URL normalization section.

# search for blog posts on blog.twingly.com
blog:blog.twingly.com

# search for blog posts on multiple blogs
blog:blog.twingly.com|roslingsblogger.blogspot.com

# search for blog posts mentioning twingly but not on blog.twingly.com
twingly -blog:twingly.com

Searching for blog posts written in a specific language

You can search for blog posts written in a specific language.

# search for blog posts written in Swedish
lang:sv

# search for blog posts written in Swedish or Finnish
lang:sv|fi

List of all supported languages.

Searching for blog posts from a specific location

You can search for blog posts from a specific location.

# search for blog posts from Sweden
location:se

# search for blog posts from in Sweden or Finland
location:se|fi

List of all supported locations.

Searching for blog posts tagged with a specific tag

You can search for blog posts with specific tags.

# search for blog posts with the tag election
tag:election

# search for blog posts with the tags election *and* obama
tag:election,obama

# search for blog posts with the tags election, sport *or* fashion
tag:election|sport|fashion

# search for blog posts with the tag obama but not election
tag:obama -tag:election

Searching for blog posts written by a specific author

# search for blog posts with an author named Isabella
author:isabella

# search for blog posts with an author named Isabella but not "Isabella Wight"
author:isabella -author:wight

Searching for a blog post by ID

You can find a specific blog post by using the post id field in the result.

id:13735921747213240519

Searching for blog posts within a given time span

The default is to search in posts published at any time.

You can search for posts that were published within the last 24 hours.

tspan:24h

The supported arguments to tspan are:

Please note that these are the only supported arguments, e.g. 3h or 4m won’t work

In addition to the tspan parameter you can perform explicit searches on creation (indexed) time or published time.

Examples:

Make sure you always include timezone information in your timestamps, when using the start-*/end-* time filters. If no timezone information is supplied, the API will interpret timestamps in server-side local time, meaning Europe/Stockholm.

Note that using tspan in the same query as start-created, end-created, start-date or end-date is not supported and will yield unexpected results.

Sorting the results

You can sort the blog posts in multiple ways.

# sort by published
sort:published

# sort by inlinks
sort:inlinks

The supported arguments to sort are:

Sort order

You can specify the sort order.

# ascending
sort-order:asc

# descending
sort-order:desc

Supported languages

To query a specific language, use the the two-letter ISO 639-1 code.

Language Code Remarks
Afrikaans af  
Albanian sq  
Arabic ar  
Bengali bn  
Bulgarian bg  
Catalan ca  
Chinese zh Includes both simplified and traditional Chinese
Croatian hr  
Czech cs  
Danish da  
Dutch nl  
English en  
Estonian et  
Finnish fi  
French fr  
Georgian ka  
German de  
Greek el  
Gujarati gu  
Hebrew he  
Hindi hi  
Hungarian hu  
Icelandic is  
Indonesian id  
Italian it  
Japanese ja  
Kannada kn  
Korean ko  
Lithuanian lt  
Macedonian mk  
Malayalam ml  
Marathi mr  
Nepali ne  
Norwegian no  
Persian fa  
Polish pl  
Portuguese pt  
Punjabi pa  
Romanian ro  
Russian ru  
Serbian sr Only the Cyrillic alphabet is supported
Slovak sk  
Slovenian sl  
Somali so  
Spanish es  
Swahili sw  
Swedish sv  
Tagalog tl  
Tamil ta  
Telugu te  
Thai th  
Turkish tr  
Ukrainian uk  
Urdu ur  
Vietnamese vi  
Welsh cy  

Supported locations

To query a specific location, use the the two-letter ISO 3166-1 alpha-2 format code.

Location Code Remarks
Afghanistan af  
Aland Islands ax  
Albania al  
Algeria dz  
American Samoa as  
Andorra ad  
Angola ao  
Anguilla ai  
Antarctica aq  
Antigua and Barbuda ag  
Argentina ar  
Armenia am  
Aruba aw  
Australia au  
Austria at  
Azerbaijan az  
Bahamas bs  
Bahrain bh  
Bangladesh bd  
Barbados bb  
Belarus by  
Belgium be  
Belize bz  
Benin bj  
Bermuda bm  
Bhutan bt  
Bolivia bo  
Bonaire bq  
Bosnia and Herzegovina ba  
Botswana bw  
Bouvet Island bv  
Brazil br  
British Indian Ocean Territory io  
British Virgin Islands vg  
Brunei Darussalam bn  
Bulgaria bg  
Burkina Faso bf  
Burundi bi  
Cambodia kh  
Cameroon cm  
Canada ca  
Cape Verde cv  
Cayman Islands ky  
Central African Republic cf  
Chad td  
Chile cl  
China cn  
Christmas Island cx  
Cocos cc  
Colombia co  
Comoros km  
Congo cg  
Cook Islands ck  
Costa Rica cr  
Croatia hr  
Cuba cu  
Curacao cw  
Cyprus cy  
Czech Republic cz  
Democratic Peoples Republic of Korea kp  
Democratic Republic of Congo cd  
Denmark dk  
Djibouti dj  
Dominica dm  
Dominican Republic do  
Ecuador ec  
Egypt eg  
ElSalvador sv  
Equatorial Guinea gq  
Eritrea er  
Estonia ee  
Ethiopia et  
Falkland Islands fk  
Faroe Islands fo  
Fiji fj  
Finland fi  
France fr  
French Guiana gf  
French Polynesia pf  
French Southern Territories tf  
Gabon ga  
Gambia gm  
Georgia ge  
Germany de  
Ghana gh  
Gibraltar gi  
Greece gr  
Greenland gl  
Grenada gd  
Guadeloupe gp  
Guam gu  
Guatemala gt  
Guernsey gg  
Guinea Bissau gw  
Guinea gn  
Guyana gy  
Haiti ht  
Heard Island and Mcdonald Islands hm  
Holy See va  
Honduras hn  
Hong Kong hk  
Hungary hu  
Iceland is  
India in  
Indonesia id  
Iran ir  
Iraq iq  
Ireland ie  
Isle of Man im  
Israel il  
Italy it  
Ivory Coast ci  
Jamaica jm  
Japan jp  
Jersey je  
Jordan jo  
Kazakhstan kz  
Kenya ke  
Kiribati ki  
Kuwait kw  
Kyrgyzstan kg  
Lao Peoples Democratic Republic la  
Latvia lv  
Lebanon lb  
Lesotho ls  
Liberia lr  
Libya ly  
Liechtenstein li  
Lithuania lt  
Luxembourg lu  
Macao mo  
Macedonia mk  
Madagascar mg  
Malawi mw  
Malaysia my  
Maldives mv  
Mali ml  
Malta mt  
Marshall Islands mh  
Martinique mq  
Mauritania mr  
Mauritius mu  
Mayotte yt  
Mexico mx  
Micronesia fm  
Moldova md  
Monaco mc  
Mongolia mn  
Montenegro me  
Montserrat ms  
Morocco ma  
Mozambique mz  
Myanmar mm  
Namibia na  
Nauru nr  
Nepal np  
Netherlands nl  
New Caledonia nc  
New Zealand nz  
Nicaragua ni  
Niger ne  
Nigeria ng  
Niue nu  
Norfolk Island nf  
Northern Mariana Islands mp  
Norway no  
Oman om  
Pakistan pk  
Palau pw  
Palestine ps  
Panama pa  
PapuaNewGuinea pg  
Paraguay py  
Peru pe  
Philippines ph  
Pitcairn pn  
Poland pl  
Portugal pt  
PuertoRico pr  
Qatar qa  
Republic of Korea kr  
Reunion re  
Romania ro  
Russian Federation ru  
Rwanda rw  
Saint Barth bl  
Saint Helena sh  
Saint Kitts and Nevis kn  
Saint Lucia lc  
Saint Martin mf  
Saint Pierre and Miquelon pm  
Saint Vincent and the Grenadines vc  
Samoa ws  
SanMarino sm  
Sao Tome and Principe st  
Saudi Arabia sa  
Senegal sn  
Serbia rs  
Seychelles sc  
Sierra Leone sl  
Singapore sg  
Sint Maarten sx  
Slovakia sk  
Slovenia si  
Solomon Islands sb  
Somalia so  
South Africa za  
South Georgia and the South Sandwich Islands gs  
SouthSudan ss  
Spain es  
Sri Lanka lk  
Sudan sd  
Suriname sr  
Svalbard and Jan Mayen sj  
Swaziland sz  
Sweden se  
Switzerland ch  
Syrian Arab Republic sy  
Taiwan tw  
Tajikistan tj  
Tanzania tz  
Thailand th  
Timor tl  
Togo tg  
Tokelau tk  
Tonga to  
Trinidad and Tobago tt  
Tunisia tn  
Turkey tr  
Turkmenistan tm  
Turks and Caicos Islands tc  
Tuvalu tv  
Uganda ug  
Ukraine ua  
United Arab Emirates ae  
United Kingdom gb  
United States Minor Outlying Islands um  
United States us  
Uruguay uy  
US Virgin Islands vi  
Uzbekistan uz  
Vanuatu vu  
Venezuela ve  
Vietnam vn  
Wallis and Futuna wf  
Western Sahara eh  
Yemen ye  
Zambia zm  
Zimbabwe zw  

URL normalization

Since a web resource can have multiple URLs, we apply some normalization to make the index more consistent. We do not normalize the query pattern, this normalization has to be done by the user for URL searches like link:, blog: and site:.

Domains

We add www. for all domains that only consists of a SLD and TLD.

https://twingly.com/ -> https://www.twingly.com/

For domains with a non-www subdomain, we remove www. if present.

https://www.blog.twingly.com/ -> https://blog.twingly.com/

Blogspot

Google introduced country specific TLDs for Blogspot early 2012. The result of this change is that the same blog will have different URLs dependening on which country you’re currently browsing the web in. In order to map blogspot posts to it’s blog we normalize blogspot.<TLD> to blogspot.com for all blogspot blogs.


Known issues


Documentation changelog