Using the Search API
Using the Search API with an LLM
Using the News API
Using the Search API in a Chatbot
More Examples
Quickstart
Before You Get Started
To use the You.com Web Search, News or Web LLM endpoints, you can get an API key through the self-serve portal at api.you.com. For support, please reach out via email at api@you.com.
Introduction
Large language models have brought about opportunities for changing every facet of the economy by absorbing as much text as possible. Nonetheless, they often hallucinate, lack the ability to cite sources, and are difficult to keep up to date with the ever changing events of the world. The you.com API is a suite of tools designed to help developers ground the output of LLMs in the most recent, most accurate, most relevant information that may not have been included in their training dataset.
Getting Started with Web Results
Make a search
import requests
def get_ai_snippets_for_query(query):
headers = {"X-API-Key": YOUR_API_KEY}
params = {"query": query}
return requests.get(
f"https://api.ydc-index.io/search?query={query}",
params=params,
headers=headers,
).json()
results = get_ai_snippets_for_query("reasons to smile")
The above will return a list of search results, such as the below:
{'hits': [{'description': '<strong>Smiling</strong> has benefits, even when you’re faking it. Learn more about why and how <strong>smiling</strong> can change your mood, stress levels, and social interactions for the better.',
'snippets': ["the most compelling reason to smile is that it may lengthen your overall lifespan. One study found that genuine, intense smiling is associated with longer life. Happy people seem to enjoy better health and longevity, but more research is needed to understand why. Research indicates that happiness could increase lifespan by years—suggesting maintaining a happy, positive mood may be an important part of a healthy lifestyle. 2 Smiling Relieves Stress Stress can permeate our entire being, including showing up in your face and expression. Smiling not only helps to prevent us from looking tired, worn down, and overwhelmed, but it can actually help decrease stress. Believe it or not, smiling can reduce stress even if you don't feel like smiling or even if you fake it with a smile that isn't genuine. When you are stressed, try intentionally putting a smile on your face. It may help improve your mood and ability to manage the stress you are experiencing. 3 Smiling Elevates Mood Smiling can also",
"but it can also change the moods of others for the better. Research suggests that smiles are actually contagious. Your brain automatically notices and interprets other people's facial expressions—and sometimes, you may even mimic them. That means you might spot someone else's smile and unconsciously smile yourself. 5 Smiling Boosts the Immune System Smiling can also boost your overall health by helping your immune system to function more effectively. It is thought that when you smile, immune function improves because you are more relaxed (thanks to the release of certain neurotransmitters). Whether you're trying to maintain your overall health or strengthen your immune system ahead of cold and flu season, smiling may help. Warding off illness and staying healthier can also play a role in helping you feel less stressed. Benefits of Positive Thinking for Body and Mind 6 Smiling May Lower Blood Pressure Smiling could have a beneficial impact on your blood pressure. Laughter specifically",
'3 Smiling Elevates Mood Smiling can also help make you feel happy. Next time you are feeling down, try putting on a smile. There\'s a good chance your mood will change for the better. The physical act of smiling activates pathways in your brain that influence your emotional state—meaning that by adopting a happy facial expression, you can "trick" your mind into entering a state of happiness. This affect works whether or not your smile is genuine. A simple smile can trigger the release of neuropeptides that improve your neural communication. It also causes the release of neurotransmitters such as dopamine and serotonin, which can boost your mood. Think of smiling as a natural antidepressant. How to Instantly Lift Your Mood 4 Smiling Is Contagious How many times have you heard that a smile has the power to light up the room? While it is certainly a beautiful sentiment, it carries a hint of truth. Smiling not only can elevate your mood, but it can also change the moods of others for the',
"frowns, scowls, and grimaces work in the opposite manner, effectively pushing people away, smiling is seen as more attractive—and people may even assume you have more positive personality traits if you're smiling. Not only can smiling make you more attractive, but it can also make you look more youthful. The muscles we use to smile also lift the face, making a person appear younger. So instead of opting for a facelift, just try smiling your way through the day—you'll look younger and feel better. 9 Smiling Suggests Success Research has shown that people who smile regularly appear more confident, are more likely to be promoted, and are more likely to be approached. Try putting on a smile at meetings and business appointments. You might find that people react to you differently. 10 Smiling Helps You Stay Positive Try this test: Smile. Now try to think of something negative without losing the smile. It's hard, isn't it? Smiling can influence your feelings of positivity, even if it feels",
'that bring you joy or inspire laughter. While this is certainly true, it overlooks an important point: Smiling can be a conscious, intentional choice. What does psychology have to say about smiling? Whether your smile is genuine or not, it can act on your body and mind in a variety of positive ways, offering benefits for your health, your mood, and even the moods of people around you. What Can Smiling Mean? Research suggests that there are three primary types of smiles:Reward: Smiles that convey approval, happiness, contentment, and other positive feelings.Affiliation: Smiles that communicate positive intention, trustworthiness, belongingness, compassion, and social connection.Dominance: Smiles intended to convey contempt, disgust, or superiority. Such smiles have been shown to increase cortisol (stress hormone) levels in people they are directed toward. 1 Smiling Helps You Live Longer Paul Bradbury / Caiaimage / Getty Images Perhaps the most compelling reason to smile is that it may',
'on your blood pressure. Laughter specifically seems to lower blood pressure, after causing an initial increase in heart rate and breathing. While smiling has been shown to lower your heart rate in the face of stress, more research is needed to determine how it reduces blood pressure. If you have a blood pressure monitor at home, you can try testing this idea for yourself. Sit for a few minutes and take a reading. Then smile for a minute and take another reading while still smiling. Do you notice a difference? 7 Smiling Reduces Pain Studies have shown that smiling releases endorphins, other natural painkillers, and serotonin. Together, these brain chemicals make us feel good from head to toe. Not only do they elevate your mood, but they also relax your body and reduce physical pain. Smiling is a natural drug. 8 Smiling Makes You Attractive We are naturally drawn to people who smile. While more severe or negative facial expressions like frowns, scowls, and grimaces work in the opposite',
'your feelings of positivity, even if it feels unnatural or forced. Regardless of whether or not your smile is genuine, it still sends the message that "Life is good!" to your brain and, ultimately, the rest of your body. Smile More for Health, Happiness, and Longevity 11 Sources Verywell Mind uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy. Coles NA, Larsen JT, Lench HC. A meta-analysis of the facial feedback literature: Effects of facial feedback on emotional experience are small and variable. Psychol Bull. 2019;145(6):610-651. doi:10.1037/bul0000194 Martin J, Rychlowska M, Wood A, Niedenthal P. Smiles as multipurpose social signals. Trends Cogn Sci. 2017;21(11):864-877. doi:10.1016/j.tics.2017.08.007 Abel EL, Kruger ML. Smile intensity in photographs predicts longevity. Psychol Sci. 2010;21(4):542-544.',
'Self-Improvement 10 Big Benefits of Smiling Choose to smile every day to boost mood and health By Mark Stibich, PhD Mark Stibich, PhD Mark Stibich, PhD, FIDSA, is a behavior change expert with experience helping individuals make lasting lifestyle improvements. Learn about our editorial process Updated on February 17, 2023 Medically reviewed Verywell Mind articles are reviewed by board-certified physicians and mental healthcare professionals. Medical Reviewers confirm the content is thorough and accurate, reflecting the latest evidence-based research. Content is reviewed before publication and upon substantial updates. Learn more. by Sabrina Romanoff, PsyD Medically reviewed by Sabrina Romanoff, PsyD Dr. Sabrina Romanoff, PsyD, is a licensed clinical psychologist and a professor at Yeshiva University’s clinical psychology doctoral program. Learn about our Medical Review Board Print Many see smiling simply as an involuntary response to things that bring you joy or inspire laughter. While',
'longevity. Psychol Sci. 2010;21(4):542-544. doi:10.1177/0956797610363775 Diener E, Chan MY. Happy people live longer: Subjective well-being contributes to health and longevity. Appl Psychol Health Well Being. 2011;3(1):1-43. doi:10.1111/j.1758-0854.2010.01045.x Kraft TL, Pressman SD. Grin and bear it: The influence of manipulated facial expression on the stress response. Psychol Sci. 2012;23(11):1372-1378. doi:10.1177/0956797612445312 Marmolejo-Ramos F, Murata A, Sasaki K, et al. Your face and moves seem happier when I smile: Facial action influences the perception of emotional faces and biological motion stimuli. Exp Psychol. 2020;67(1):14-22. doi:10.1027/1618-3169/a000470 Wood A, Rychlowska M, Korb S, Niedenthal P. Fashioning the face: Sensorimotor simulation contributes to facial expression recognition. Trends Cogn Sci. 2016;20(3):227-240. doi:10.1016/j.tics.2015.12.010 D’Acquisto F, Rattazzi L, Piras G. Smile—It’s in your blood! Biochem Pharmacol. 2014;91(3):287-292.',
'your blood! Biochem Pharmacol. 2014;91(3):287-292. doi:10.1016/j.bcp.2014.07.016 Strean WB. Laughter prescription. Can Fam Physician. 2009;55(10):965-967. Pressman SD, Acevedo AM, Hammond KV, Kraft-Feil TL. Smile (Or grimace) through the pain? The effects of experimentally manipulated facial expressions on needle-injection responses. Emotion. Published online November 23, 2020. doi:10.1037/emo0000913 Little AC, Jones BC, DeBruine LM. Facial attractiveness: Evolutionary based research. Philos Trans R Soc B. 2011;366(1571):1638-1659. doi:10.1098/rstb.2010.0404 See Our Editorial Process Meet Our Review Board Share Feedback Was this page helpful? Thanks for your feedback! What is your feedback? Helpful Report an Error Other Submit Speak to a Therapist Online Advertiser Disclosure × The offers that appear in this table are from partnerships from which Verywell Mind receives compensation.'],
'title': 'Top 10 Reasons to Smile Every Day',
'url': 'https://www.verywellmind.com/top-reasons-to-smile-every-day-2223755'},
{'description': 'I suffer from “bitchy resting face”. I’ve been told, multiple times, that I’m so much nicer than people initially realised. Which is a weird compliment to get. Apparently I don’t always make the best…',
'snippets': ['To refresh my energy for smiling at strangers, I decided to write about reasons to smile more. I aimed for 100 reasons to push myself and generate creative answers. It proved easier than I expected and I ended up with 107. I’m sure there’s many more that could be added!\nResearch shows, that even a forced smile brings amazing physical and mental benefits. But as we grow older we smile less. Children smile on average 400 times per day. Adults average just 20 smiles. Smiling makes us feel happier, but we have to practice smiling in order to get the full effects.\nSo go on, try consciously smiling while you read through this list and let me know how you feel at the end!\n107 reasons to smile more often\n- Smiling will make you feel happier.\n- Smiling decreases stress.\n- Smiling decreases anxiety.\n- Smiling decreases tension.\n- Smiling can boost your immune system.\n- Smiling triggers a “feel-good party” in your brain.\n7. Smiling releases feel-good endorphins.',
'107 reasons to smile more often\nThis post was written to make you happier.\nI suffer from “bitchy resting face”. I’ve been told, multiple times, that I’m so much nicer than people initially realised. Which is a weird compliment to get. Apparently I don’t always make the best first impression! So I make a conscious effort to smile often.\nOne thing I miss about Wellington are smiles. Walking down Courtney Place or Cuba Street, it’s normal to smile at the people you pass. Each time getting a little boost from that stranger.\nHowever, in Europe and the UK, often my smiles are often meet with confusion. Or they’re not meet at all. It seems people are actively avoiding eye-contact, whether it’s through their smart phone or just by tuning out people around them.',
'Even just reading the word “smile” or associated words can be enough to make you smile. You’ve just read it 133 times. You’ve also seen 25 gif smiles.\nDo you feel happier?\nThis story of a personal smiling experiment is my favourite reason to smile. I agree with it’s conclusion, smiling offers benefits that far outweigh the small effort required. So go on, smile more.\nEnjoyed this article? Please click 💚 to share it around.',
'98. Smiling makes people want to help you more (like when you’re asking for directions)\n99. Smiling signals you’re interested and engaged in a conversation\n100. Smiling shows appreciation\n101. Smiling often makes you more photogenic.\n102. Smiling can help you land that new job\n103. Smiling makes an apology more sincere\n104. And has been linked to lower sentences in court records\n105. It unlocks our inner child. Children smile around 40 times more than adults each day.\n106. Because Mother Teresa said you should. Quite a few times actually. She was quoted as saying:\n“Peace begins with a smile..”\n“I will never understand all the good that a simple smile can accomplish.”\n“Let us always meet each other with smile, for the smile is the beginning of love.”\n“Every time you smile at someone, it is a gift to that person, a beautiful thing”.\nShe was all about the smile.\n107. Smiling more can become a habit. Making an effort to smile often can result in naturally smiling more.',
'7. Smiling releases feel-good endorphins.\n8. Smiling lowers your heart rate, even in stressful situations.\n9. Smiling improves your mood.\n10. Smiling increases your energy.\n11. Smiling is better than chocolate for making you feel happy. And there’s no calories.\n12. Smiling can make you feel as good as getting £16,000!\n13. Smiling is contagious. You will spread happiness to others.\n14. They’ll smile back — making you feel even happier. (It takes conscious effort not to smile back at someone smiling).\n15. Even in bad situations, if you smile, others are likely to mimic the expression.\n16. Smiling makes you look reliable.\n17. Smiling makes you look trustworthy.\n18. Smiling makes you look relaxed.\n19. Smiling makes you look sincere.\n20. Smiling makes you look nicer.\n21. Smiling makes you look more competent.\n22. Smiling makes you look friendlier\n23. Smiling helps you earn more money\n24. Smiling makes you look in control, even when you don’t feel it\n25. You’re better looking when you smile.',
'79. Smiling is your own choice\n80. And no one can stop you\n81. Smiles are multi-lingual\n82. Smiles are multi-cultural\n83. Smiles are the “universal language of kindness” to quote William Arthur Ward.\n84. Smiling makes you live longer — around 7 years longer according to one study.\n85. You might be someone’s Mona Lisa\n86. Smiling might make the difference to someone.\n87. Smiling might give someone hope.\n88. Smiling might brighten someone’s day\n89. Smiling might break someone out of their bad mood\n90. Smiling gives people a reason to compliment you (“Nice smile”)\n91. Smiling will get you more tips. One survey found tips increased 140% for server’s who smiled.\n92. Smiling gives people a reason to say “Hi”\n93. Smiling can “heal a frozen heart” — according to 2pac.\n94. Dogs will like you more\n95. Dog training is easier when you look happy\n96. Plus your cat will be happier too.\n97. Smiling more leads to more successful relationships',
'25. You’re better looking when you smile.\n26. Smiling helps graceful ageing. Laugh lines not frown lines!\n27. Smiling makes you look fun\n28. Smiling makes you look approachable (while I was writing this, and smiling lots, a stranger came and shared my outdoor table with me).\n29. Smiling makes you look confident\n30. Smiling makes you feel confident, even if you’re faking the smile.\n31. Smiling makes others feel confident (try smiling at a speaker who appears nervous)\n32. Smiling confuses people\n33. Smiling surprises people (especially on the London underground).\n34. Smiling takes less effort than frowning (It takes twelve muscles to smile and 113 muscles to frown.).\n35. Smiling improves circulation to your face.\n36. Smiling could make someone fall in love with you.\n37. Smiling attracts people to you.\n38. Smiling makes you more attractive. If you’re female.\n39. Smiling is more attractive than make-up.\n40. Smiling can make you look crazy, the good type of crazy.',
'41. Smiling makes stressful situations more bearable.\n42. Smiling makes boring situations more fun.\n43. It will make running easier.\n44. And smoother.\n45. Smiling makes you feel more comfortable when you’re in difficult situations.\n46. Smiling makes you a better leader.\n47. Smiling helps you have more friends.\n48. Smiling helps you be more creative.\n49. Smiling helps connect with more people.\n50. Smiling can make others, even strangers, feel less alone.\n51. Smiling helps attention.\n52. Smiling makes you a better sales person.\n53. Smiling helps you see the bigger picture.\n54. You’ll break out of auto pilot. Smiling connects you to the people around you even when they’re strangers.\n55. Smiling is a gateway drug to laughing, which has a whole lot more benefits.\n56. Smiling makes you more productive\n57. Smiling reduces pain, endorphins created act as natural painkillers',
'58. You’ll look younger — Smiles naturally lift the face and in studies have shown to make people look younger, around 3 years younger on average.\n59. Smiling makes people glad to see you\n60. Smiling makes people feel positively towards you\n61. Smiling makes you memorable\n62. Smiling makes your name more memorable\n63. Smiling makes you seem familiar\n64. Smiling makes you more interesting (what is she smiling about?)\n65. Smiling makes you more mysterious (what is he smiling about?)\n66. Smiling dissolves “bitchy resting face”\n67. Smiling is good for your reputation (Oh is she the girl who smiles a lot?)\n68. Smiling makes you less intimidating\n69. Smiling helps you appreciate the small things\n70. Smiling makes a better first impression\n71. Smiling can make you a better public speaker\n72. Smiling makes you sound friendlier on the phone\n73. Smiles are free\n74. They’re quick\n75. They’re painless\n76. They’re easy\n77. They’re natural\n78. They’re rewarding\n79. Smiling is your own choice'],
'title': '107 reasons to smile more often. This post was written to make you…',
'url': 'https://medium.com/@envycollect/107-reasons-to-smile-more-often-ae1056003878'}
]
. . . . ,
'latency': 0.42683982849121094}