Skip to content

Commit 0802e70

Browse files
author
Kenneth Reitz
committed
readme updates
1 parent 7c01060 commit 0802e70

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SerpApi supports Google, Google Maps, Google Shopping, Bing, Baidu, Yandex, Yaho
1313

1414
## Current Status
1515

16-
This project is under development, and will be released to the public soon.
16+
This project is under development, and will be released to the public on PyPi soon.
1717

1818
## Installation
1919

@@ -25,6 +25,31 @@ $ pip install serpapi
2525

2626
Please note that this package is separate from the *soon–to–be* legacy `serpapi` module, which is currently available on PyPi as `google-search-results`.
2727

28+
## Usage
29+
30+
Let’s start by searching for Coffee on Google:
31+
32+
>>> import serpapi
33+
>>>> s = serpapi.search(q="Coffee", engine="google", location="Austin, Texas", hl="en", gl="us")
34+
35+
The `s` variable now contains a `SerpResults` object, which acts just like a standard dictionary, with some convenient functions added on top.
36+
37+
Let’s print the first result:
38+
39+
>>> print(s["organic_results"][0]["link"])
40+
https://en.wikipedia.org/wiki/Coffee
41+
42+
Let’s print the title of the first result, but in a more Pythonic way:
43+
44+
>>> print(s["organic_results"][0].get("title"))
45+
Coffee - Wikipedia
46+
47+
The [SerpApi.com API Documentation](https://serpapi.com/search-api) contains a list of all the possible parameters that can be passed to the API.
48+
49+
## Documentation
50+
51+
Documentation is [available on Read the Docs](https://serpapi-python.readthedocs.io/en/latest/).
52+
2853
## License
2954

3055
MIT

0 commit comments

Comments
 (0)