You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: serpapi/core.py
+32-8Lines changed: 32 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -28,10 +28,10 @@ class Client(HTTPClient):
28
28
def__repr__(self):
29
29
return"<SerpApi Client>"
30
30
31
-
defsearch(self, **params):
31
+
defsearch(self, params: dict=None, **kwargs):
32
32
"""Fetch a page of results from SerpApi. Returns a :class:`SerpResults <serpapi.client.SerpResults>` object, or unicode text (*e.g.* if ``'output': 'html'`` was passed).
33
33
34
-
The following two calls are equivalent:
34
+
The following three calls are equivalent:
35
35
36
36
.. code-block:: python
37
37
@@ -42,6 +42,11 @@ def search(self, **params):
42
42
>>> params = {"q": "Coffee", "location": "Austin, Texas, United States"}
43
43
>>> s = serpapi.search(**params)
44
44
45
+
.. code-block:: python
46
+
47
+
>>> params = {"q": "Coffee", "location": "Austin, Texas, United States"}
48
+
>>> s = serpapi.search(params)
49
+
45
50
46
51
:param q: typically, this is the parameter for the search engine query.
47
52
:param engine: the search engine to use. Defaults to ``google``.
0 commit comments