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!

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 Can I Use the Built-In Language Translator on my iPhone?
  • How Can I Rename Myself in Zoom for iPhone/iPad?
  • How Can I Add Custom Recurring Events to Google Calendar?
  • What are the Optimal Battery Settings on an Android Phone?
  • How Can I Easily Set Up A Timer in Windows 11?

On Our YouTube Channel

iHome Playglow Plus & Playglow Plus Mini -- Light-Up Bluetooth Speakers -- DEMO & REVIEW

Kensington Portable Poolside & Vacation Lock Box -- REVIEW

Categories

  • AdSense, AdWords, and PPC Help (106)
  • Amazon, eBay, and Online Shopping Help, (161)
  • Android Help (199)
  • Apple iPad Help (145)
  • Apple Watch Help (52)
  • Articles, Tutorials, and Reviews (344)
  • Auto Tech Help (11)
  • Business Advice (199)
  • Chrome OS Help (23)
  • Computer & Internet Basics (763)
  • d) None of the Above (165)
  • Facebook Help (383)
  • Google, Chrome & Gmail Help (178)
  • HTML & Web Page Design (245)
  • Instagram Help (47)
  • iPhone & iOS Help (606)
  • iPod & MP3 Player Help (173)
  • Kindle & Nook Help (92)
  • LinkedIn Help (85)
  • Linux Help (164)
  • Linux Shell Script Programming (86)
  • Mac & MacOS Help (891)
  • Most Popular (16)
  • Outlook & Office 365 Help (24)
  • PayPal Help (69)
  • Pinterest Help (53)
  • Reddit Help (17)
  • SEO & Marketing (81)
  • Spam, Scams & Security (92)
  • Trade Show News & Updates (23)
  • Twitter Help (217)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows PC Help (916)
  • Wordpress Help (204)
  • Writing and Publishing (72)
  • YouTube Help (46)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (57)

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."
© 2022 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.
Privacy Policy - Terms and Conditions - Accessibility Policy