Ask Dave Taylor
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube
  • Home
  • YouTube Videos
  • Top Categories
  • Subscribe via Email
  • Ask A Question
  • Meet Dave
  • Home
  • Computer & Internet Basics
  • Can I Add A Reddit Search Box To My Web Site?

Can I Add A Reddit Search Box To My Web Site?

February 29, 2020 / Dave Taylor / Computer & Internet Basics, Reddit Help / No Comments

I’ve been working on building out a Web site and am wondering if there’s any way to duplicate the Reddit search box on my own Web page? I can handle a little bit of HTML but am not a Web coder by any means.

The Reddit search system turns out to be pretty easy to reverse engineer. Unless you want to make something super fancy that includes their search suggestions as you’re typing, that is. In fact, there are really three different ways you can incorporate Reddit into your site: a link that opens a new page with the results of the specified search (easy), a box on your site that produces search results (not too tricky) and duplicating the full search box on Reddit including search tips (so hard that we’re not going to delve into it in this article).

Ready? All you need is the ability to paste in actual HTML onto one of your pages (in ‘source’ or ‘raw’ or ‘text’ mode) on your favorite Web page editor for your site.

Okay, now, if you pop over to Reddit you can’t miss the search box on the top of every page:

readdit basic search box

The “Create Post” might be a bit more obvious, but above it, adjacent to the magnifying lens icon, is the actual search box. Start typing something in and Reddit will suggest matches even as you proceed:

reddit search suggestions 'mulan'

Press return to complete your search, however, and you’ll get a pretty sophisticated search results page, broken into categories:

reddit search results - mulan

If you just want to look at posts rather than matching groups, you can click on “Posts” along the top. Or “Communities and users”, if you seek a specific Reddit user.

But what you really want to do is look at your address bar, however. A quick peek and you’ll see that searches are pretty simple to understand:

reddit search results URL

Turns out that if you want ‘Best results‘ then just add the search term:

https://www.reddit.com/search/?q=mulan

Want to see ‘Posts‘ only? Add &type=link:

https://www.reddit.com/search/?q=mulan&type=link

Or, finally, you can constrain the results to “Communities and users” with &type=sr%2Cuser like this:

https://www.reddit.com/search/?q=mulan&type=sr%2Cuser

Now, how do you turn them into search links? By typing in the words you want to have as your anchor text, highlighting them, then using one of the above URLs (with ‘mulan’ replaced by whatever search term you prefer). For example: Check out what people are saying about Mulan on Reddit!

The code for that is:

<a href="https://www.reddit.com/search/?q=mulan&type=link">Check 
out what people are saying about Mulan on Reddit!</a>

But what about if you want an actual search box where your visitors can type in their own search? That’s a bit more complicated HTML, a FORM that ends up looking like this:

<form method="get" action="https://www.reddit.com/search">
<input type="text" name="q" />
<input type="submit" value="Look up on Reddit" />
</form>

In action, it’d look like this:


And that’s it. You can certainly do lots of fancy CSS and formatting to make the search box prettier on page, but that’ll get you a functional box on your page that visitors can use to search Reddit!

Pro Tip: Find me on Reddit! I’m u/askdavetaylor and would be happy to connect!

About the Author: Dave Taylor has been involved with the online world since the early days of the Internet. Author of over 20 technical books, he runs the popular AskDaveTaylor.com tech help site. You can also find his gadget reviews on YouTube and chat with him on Twitter as @DaveTaylor.

Let’s Stay In Touch!

Never miss a single article, review or tutorial here on AskDaveTaylor, sign up for my fun weekly newsletter!
Name: 
Your email address:*
Please enter all required fields
Correct invalid entries
No spam, ever. Promise. Powered by FeedBlitz
Please choose a color:
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!
add reddit search box, add search box, html coding, reddit mulan, reddit search box, reddit search link, reverse engineer reddit, reverse engineering

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Recent Posts

  • How to Check Energy Recommendations on your Windows Laptop
  • How Do I Customize New Tab Windows in Safari for Mac?
  • Can AI-Generated ChatGPT Text Be Accurately Identified?
  • How to Perform a Microsoft Account Security Audit and Checkup
  • How Can I Customize My Linux Dock / Taskbar?

On Our YouTube Channel

How to: Replace a Switchbot Door Sensor Battery

EMEET Luna vs INNOTRIK Studio Bluetooth Speakerphones -- DEMOS & REVIEW

Categories

  • AdSense, AdWords, and PPC Help (106)
  • Amazon, eBay, and Online Shopping Help (163)
  • Android Help (226)
  • Apple iPad Help (147)
  • Apple Watch Help (53)
  • Articles, Tutorials, and Reviews (346)
  • Auto Tech Help (15)
  • Business Advice (200)
  • ChromeOS Help (31)
  • Computer & Internet Basics (778)
  • d) None of the Above (166)
  • Facebook Help (383)
  • Google, Chrome & Gmail Help (188)
  • HTML & Web Page Design (247)
  • Instagram Help (49)
  • iPhone & iOS Help (623)
  • iPod & MP3 Player Help (173)
  • Kindle & Nook Help (99)
  • LinkedIn Help (88)
  • Linux Help (173)
  • Linux Shell Script Programming (89)
  • Mac & MacOS Help (911)
  • Most Popular (16)
  • Outlook & Office 365 Help (33)
  • PayPal Help (68)
  • Pinterest Help (54)
  • Reddit Help (19)
  • SEO & Marketing (82)
  • Spam, Scams & Security (95)
  • Trade Show News & Updates (23)
  • Twitter Help (220)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows PC Help (947)
  • Wordpress Help (206)
  • Writing and Publishing (72)
  • YouTube Help (47)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (62)

Archives

Social Connections:

Ask Dave Taylor


Follow Me on Pinterest
Follow me on Twitter
Follow me on LinkedIn
Follow me on Instagram


AskDaveTaylor on Facebook



microsoft insider mvp


This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to our terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. Our lawyer says "Thanks for your cooperation."
© 2023 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.
Privacy Policy - Terms and Conditions - Accessibility Policy