Search operators

Search operators are powerful modifiers that let you craft precise, targeted queries for the Search API. By combining operators like site:, filetype:, logical connectors (AND, OR, NOT), and inclusion/exclusion symbols (+, -), you can filter results by domain, file type, and content requirements. This enables you to run complex searches that get you exactly what you need.

Use the following search operators with the Search API:

OperatorDescriptionExample
siteSearches for webpages from a particular domain (including subdomains)site:uscourts.gov
filetypeSearches for webpages that are of the specified file typefiletype:pdf
+Searches for webpages that contain the exact term after the ++GAAP
-Searches for webpages that do not contain the exact term after the --prs
ANDLogical operator to combine expressionsguitar AND Fender
ORLogical operator to combine expressionsguitar OR drum
NOTNegation of expressionsNOT site:uscourts.gov

Let’s look at a complex example that combines multiple operators.

You are researching machine learning best practices and want to find tutorials or academic papers on either Python or PyTorch, in PDF format. You’re focused on PyTorch, so you want to exclude results that mention TensorFlow. Here’s how you’d construct your query:

1from youdotcom import You
2from youdotcom.types.typesafe_models import print_search
3
4with You("YOUR_API_KEY") as you:
5 res = you.search.unified(
6 query="machine learning best practices (Python OR PyTorch) -TensorFlow filetype:pdf",
7 count=5
8 )
9
10 print_search(res)

You should get back something like this:

1{
2 "results": {
3 "web": [
4 {
5 "url": "https://hlevkin.com/hlevkin/45MachineDeepLearning/DL/Ketkar,Moolayil Deep Learning with Python.pdf",
6 "title": "Deep Learning with Python Learn Best Practices of Deep",
7 "description": "Chapter 1 Introduction to Machine Learning and Deep Learning ... There are limits to how much human effort can be thrown at the problem. ... Mechanical Turk). ... Python and some coursework in linear algebra, calculus, and probability. Readers should refer to the following in case they need to cover these ... PyTorch ...",
8 "snippets": [
9 "Chapter 1 Introduction to Machine Learning and Deep Learning ... There are limits to how much human effort can be thrown at the problem. ... Mechanical Turk). ... Python and some coursework in linear algebra, calculus, and probability. Readers should refer to the following in case they need to cover these ... PyTorch is not installed as a part of the Anaconda distribution.",
10 "Chapter 1 Introduction to Machine Learning and Deep Learning ... N. Ketkar and J. Moolayil, Deep Learning with Python, ... PyTorch.",
11 "You should install PyTorch, torchtext, and torchvision, along with the · Anaconda environment. Note that Python 3.6 (and above) is recommended for the exercises in · this book. We highly recommend creating a new Python environment after ... As human beings, we are intuitively aware of the concept of learning.",
12 "Overall, PyTorch provides an excellent framework and · platform for researchers and developers to work on cutting-edge deep ... Figure 2-1. 0-n dimensional tensor ... To begin, let’s explore the multitude of ways to construct tensors. The most basic way is to construct a tensor using lists in Python. The · following exercise will demonstrate an array of tensor operations that · are commonly used in building deep learning applications."
13 ],
14 "favicon_url": "https://you.com/favicon?domain=hlevkin.com&size=128"
15 },
16 {
17 "url": "https://isip.piconepress.com/courses/temple/ece_4822/resources/books/Deep-Learning-with-PyTorch.pdf",
18 "title": "Deep Learning with PyTorch",
19 "description": "Index of /courses/temple/ece_4822/resources/books · Name Last modified Size Description · Parent Directory - Deep-Learning-with-P..> 2020-08-26 14:58 45M · Apache Server at isip.piconepress.com Port 443",
20 "snippets": [],
21 "favicon_url": "https://you.com/favicon?domain=isip.piconepress.com&size=128"
22 },
23 {
24 "url": "https://github.com/borninfreedom/DeepLearning/blob/master/Books/Deep-Learning-with-PyTorch.pdf",
25 "title": "DeepLearning/Books/Deep-Learning-with-PyTorch.pdf at master · ...",
26 "description": "深度学习、强化学习、模仿学习与机器人. Contribute to borninfreedom/DeepLearning development by creating an account on GitHub.",
27 "snippets": [],
28 "thumbnail_url": "https://opengraph.githubassets.com/491cdbc5e2c483ec0b7b14473b6a4e76899906bc05570ac6888a0772b401c62d/borninfreedom/DeepLearning",
29 "favicon_url": "https://you.com/favicon?domain=github.com&size=128"
30 },
31 {
32 "url": "https://machinelearningmastery.com/wp-content/uploads/2023/04/deep_learning_with_pytorch_mini_course.pdf",
33 "title": "MACHINE LEARNING MASTERY Deep Learning with PyTorch 9-Day Mini-Course",
34 "description": "MACHINE · LEARNING · MASTERY",
35 "snippets": [],
36 "favicon_url": "https://you.com/favicon?domain=machinelearningmastery.com&size=128"
37 },
38 {
39 "url": "https://hprc.tamu.edu/files/training/2021/Spring/Introduction_to_DL_with_PyTorch.pdf",
40 "title": "Introduction to Deep Learning with PyTorch Jian Tao jtao@tamu.edu",
41 "description": "Introduction to Deep Learning · with PyTorch · Jian Tao · jtao@tamu.edu · HPRC Short Course · 4/16/2021 · Part I · Setting up a working · environment (15 mins) · Part III",
42 "snippets": [
43 "Introduction to Deep Learning with PyTorch · Q&A · (5 mins/part) Part I. Working Environment · HPRC Portal · * VPN is required for off-campus users. Login HPRC Portal (Terra) Terra Shell Access - I · Terra Shell Access - II · Python Virtual Environment (VENV) Create a VENV ·",
44 "Part II. Deep Learning"
45 ],
46 "favicon_url": "https://you.com/favicon?domain=hprc.tamu.edu&size=128"
47 }
48 ]
49 },
50 "metadata": {
51 "query": "machine learning best practices (Python OR PyTorch) -TensorFlow filetype:pdf",
52 "search_uuid": "dacab1bf-042d-4cd2-b803-ebcb45904cb6",
53 "latency": 0.7680318355560303
54 }
55}