17 Best 'Label' and 'Feed' Search Techniques in Blogger

search techniques in bloggerToday we will discuss various interesting ways of doing effective search in BlogSpot blogs. You will learn how to do search by category, by query or even doing effective search inside feeds. You will also learn how to run a query for searching posts with multiple labels and you will discover how to search for a particular keyword inside posts tagged under a specific label using its Feed data. We will also learn how to sort search results by Date and index count. There is too much learning today!
In wordpress we call labels as Categories and sub categories as Tags but in blogger we are limited only to Categories which are termed as Labels.
DEMO: For Demo copy and paste the URLS given in this tutorial inside your browser and see the output yourself.

Syntax for Label search

Blogger databases are not visible to its users but users has the advantage of running certain queries to access the tables. With the introduction of Blogger API v3, you can now easily add running list of blog posts, pages and comments to a non-Blogger hosted site. Qasim will discuss this with you all in a post tonight. My job is to introduce you to simple search queries that can do wonders.
Label Search Syntax URL:
You may already know the below syntax.
http://www.mybloggertricks.com/search/label/label+Name

Note: Labels are case sensitive. If a label names starts with an uppercase letter and you write a lowercase then the query will not return the result. If a label name is Social Media (first letters are capital) and you type social mEdia then it wont work. You must type the exact same letters
1. Searching a Label
Lets try searching for all posts nested under the label Social Media in our blog. The URL would look like the one below:
http://www.mybloggertricks.com/search/label/Social Media

 

2. Searching a keyword within a Label
I tried this but seems like Blogger doesn't support running queries within a label. For example lets search for all Facebook related posts under the category Social Media
Note: Spaces between labels can be denoted inside URLS with %20. You can write Social Media as Social%20Media also.
 
http://www.mybloggertricks.com/search/label/Social%20Media?q=facebook

you will observe that though the query is executed but the results are same no matter whether you search for Facebook, twitter or anything. The following urls all return the same result.

http://www.mybloggertricks.com/search/label/Social%20Media?q=twitter
http://www.mybloggertricks.com/search/label/Social%20Media?q=tumblr
http://www.mybloggertricks.com/search/label/Social%20Media?q=googleplus
http://www.mybloggertricks.com/search/label/Social%20Media?q=blablabla

  But wait! Can't we search a keyword inside a label at all? Well for that we will introduced a rarely discussed trick using Feeds. Click here
3. Running a simple Search query
Now lets search for a keyword inside entire blog posts. This is a query search that looks for a keyword in all posts irrespective of which label it belongs to.

http://www.mybloggertricks.com/search?q=mohammad
http://www.mybloggertricks.com/search?q=presentation%20by%20mohammad

Note again that spaces between keywords are denoted by %20.
4. Multiple Label Search
If you wish to search posts tagged under two labels, you will need to use the or operator (|) in order to do that. For that follow the syntax below:

www.YOUR-BLOG.com/search/?q=label:LABEL1|label:LABEL2

Lets now search all posts containing the labels SEO and Social Media
http://www.mybloggertricks.com/search/?q=label:SEO|label:Social%20Media

Interesting? sure it is!
5. Sort Search Results  by Date
If you wish to sort the search result by date and time then you can easily do that with an extra parameter called by-date=true. It will display most recent entries first and oldest later.
Following is the syntax for displaying most recent posts on facebook
http://www.mybloggertricks.com/search?q=facebook&by-date=true

You might have observed that though this method returns most recent posts on facebook but it is also showing some irrelevant posts that doesn't contain the keyword facebook at all. Read the next method to understand why.
6. Sort Search Results by Relevance
By default search queries are displayed based on relevance. But when you sort results by date, relevance is destroyed. You can either remove the sorting parameter that we used early or set its value to false as shown below
http://www.mybloggertricks.com/search?q=facebook&by-date=false

7. Set Search Count
By default blogger display 20 posts at a time. If you wish to increase or decrease this number then use the parameter max-results=
The following query will return 50 posts based on query Facebook.

http://www.mybloggertricks.com/search?q=facebook&max-results=50

8. Set Search Results Count and Sort by Date
In order to sort posts by date and also set the post count to 5 then use the following syntax:
http://www.mybloggertricks.com/search?q=facebook&max-results=50&by-date=true

Syntax for Feed Search

The reason why you can easily download all your blog posts and comments and move them to another platform is because all your blog content is neatly stored inside atom or rss feeds. Consider feed as a repository containing all your blog content, be it posts, comments, pages or labels.
1. Posts FEED
A Feed containing all your blog posts has the following syntax:
http://www.mybloggertricks.com/feeds/posts/default

 

2. Comments FEED
A feed containing all your blog comments has the following syntax:
http://www.mybloggertricks.com/feeds/comments/default

 

3. Prevent Feed redirection to Feedburner
If you are redirected to feedburner then this means you are using feedburner to sent email updates to your subscriber. In order to prevent this use the parameter redirect=false as shown below:
Posts FEED
http://www.mybloggertricks.com/feeds/posts/default?redirect=false
Comments FEED
http://www.mybloggertricks.com/feeds/comments/default?redirect=false

 

4. Search Post Feed by Label
Now lets display all posts inside your blog feed containing the label SEO
http://www.mybloggertricks.com/feeds/posts/default/-/SEO

 

5. Set Search Results count in Posts Feed
The following query will return 5 recent posts of your blog
http://www.mybloggertricks.com/feeds/posts/default?max-results=5&redirect=false

 

6. Set Count while searching Posts Feed by label
The following query will display only 10 posts under the category/label SEO. No redirection parameter required here.
http://www.mybloggertricks.com/feeds/posts/default/-/SEO?max-results=10

 

7. Set Search Results Count in Comments Feed
The following query will return 5 recent comments posted on your blog
http://www.mybloggertricks.com/feeds/comments/default?max-results=5

 

8. Set Start Index and End Index in Posts Feed
Another interesting fact about feeds is that you can display posts from a specified index. For example If I want to display posts for SEO label and I want only to display the 10th and 11th post then I will set count restrictions as shown below:
http://www.mybloggertricks.com/feeds/posts/default/-/SEO?start-index=10&max-results=2

The start-index tells where to start from and max-results show how many posts to display.

 

9. Search for a keyword within a Label in Post Feed
We already discussed that query parameters do not work in Label Search directly but we can utilize this method in Post Feed Label search method. Though logically this method does not literally means that we are filtering keywords based on label search, we are instead filtering two keywords. One is the label name itself and second is the query keyword. Both these keywords are highlighted below:
http://www.mybloggertricks.com/feeds/posts/default/-/SEO?q=Smartphone

In the above query we are filtering the keyword Smartphone on all posts containing the word SEO. This is the only working method I could try and our coming widget is based on this search method which I am sure you will love a lot.

Need Help?

We tried explaining almost every single detail and we hope this tutorial may further help the blogger community. This is the most detailed post of its kind with some of the rarely shared query techniques. In my coming tutorials, I will try to dig deeper into core blogger XHTML structure and bring some more useful tips for you guys so that you may never stop developing your fancy blogs. Please let me know if you needed any further help with regard to any query. :)
 

If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »

26 comments

PLEASE NOTE:
We have Zero Tolerance to Spam. Chessy Comments and Comments with 'Links' will be deleted immediately upon our review.
  1. very nice it will help to find over object easly

    ReplyDelete
  2. Bro plz tell me if i make links Like> first i post photo on pinterest with link in it than i give this pinterest link in comment ...Is it wrong or Good??
    I comment this on your previous hyper link post but you don't reply me

    ReplyDelete
    Replies
    1. Buddy Adding links in comments do not harm SEO because all links within the comment section are nofollow by deafult and robots neglect them, so it wont pass any PageRank juice. :)

      Delete
  3. WOW, what a splendid post...Thumbing to MBT..

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. Thanks for this post. Very nice. http://www.blogonmind.com/

    ReplyDelete
  6. Nice work Sir! I don't know how to say but this blog is really a good source of info.

    Thanks
    From Bloggingtipsandtrix.blogspot.com

    ReplyDelete
  7. your blog is really awesome i am a permanent reader of MBT i always found so many helping articles on this blog. I found a tool for all the webmasters must try it.
    check the worth and social engagement of your website or blog http://www.markeetvalue.com/

    ReplyDelete
  8. Download Game & Software For Full Version at
    www.softofgame.blogspot.com

    ReplyDelete
  9. Brother I want to be Your student can you teach me about blogging? if yes then so please give me adress or skype id in private

    ReplyDelete
  10. thank you :)
    http://www.blogolect.blogspot.com

    ReplyDelete
  11. Does it work if I want to act it as label filter not search?
    Example , I have 10 post.
    3 of them is Labeled under Work and other 3 are Original , for the last 4 is labeled as Non
    But the 10 of them I had labeled as Main

    ReplyDelete
  12. any widget to apply that link, so our visitior will be easy to filter post in our blog

    ReplyDelete
  13. 5. Sort Search Results by Date

    I want to add a search box that should work like mentioned in 5 trick. but how?

    ReplyDelete
  14. Hi

    To search for a keyword within a Label:
    hxxp: // www.mybloggertricks.com/search/?q=twitter+label:SEO

    I got this when I tried to combine your trick #1 and #4

    Cheers
    alwi.web.id

    ReplyDelete
  15. Does not work. No matter how high the max-result (upto the know limit of 500) the result is always no more than 23 regardless that more than 23 posts exist for a given label.

    ReplyDelete

  16. I am actually a beginner in this field, basically an apparel graduate and working as a manager merchandising/marketing at one of the best denim apparel company in Pakistan, so know very little about design and templates, can you plz check my below query and help me in this matter as well.
    My tabs sizes are not adjusted with tabs text, how to fix this problem ? Plz visit and check the tabs issue on my site (www.thinklikegiant.com) and advise… thanks for your support in advance.

    ReplyDelete
  17. i have problem... in my blog there was around 23 post labeled with browser...
    when i search on my blog browser... only 20 results are shown.. i tried using "/search/max-results=500" ( 500 and various number) please tell how search box show all the reasults with same labeled

    ReplyDelete
  18. Hi!

    Iwant to do a searcher in blogger that search in the post and labels. Anyway to do it???

    Thx in advance

    ReplyDelete
  19. Hi.....I want to put button for selection of multiple labels on my blogspot.in.....my blog is regarding smartphones and I want to sort it by camera......internal storage....ram....processor....etc.

    ReplyDelete
  20. Hi there and thank you for this post. one of the templates i use for my blog has a search bar. the code i can locate is this:"(div) class='home-search')
    (form action='/search' method='get')
    (input class='text-input' name='q' placeholder='Search Here..' style='display: inline-block; width: 150px;' type='text'/)
    (/form)
    (/div)
    I need my readers to be able to search and get results based on the labels existing in the posts.
    Is this possible?
    Thank you

    ReplyDelete
  21. What about searching by author instead of by label or keyword? Is it impossible without JavaScript?

    ReplyDelete
  22. Hi, is possible to search multiple labels feed?
    /feeds/posts/default/-/label-1

    I'm traying something like this:
    /feeds/posts/default/-/label-1|label-2

    ReplyDelete
  23. Hi,
    I didn't find what I was searching for
    I want to know if there is anyway to search for a word by the rss feed
    something like this but without the label name
    www.example.com/feeds/posts/summary/-/labelname?q=search_word
    but I want to search for this word in all blogs not in the blogs of one or more labels that selected before
    excuse my week English because I am Arab

    ReplyDelete