Skip to main content
pytrends
=========

### About

**Pseudo API for Google Trends**

* Allows simple interface for automating downloads of csv reports from Google Trends.
* Main feature is to help trick google into thinking the script is actually a browser.


* Only good until Google changes their backend again :-P

**Requirements**
* Written for both Python 2.7+ and Python 3.3+
* Requires a google account to use.

## Connect to Google
**pyGTrends(google_username, google_password)**

**Parameters**
* google_username
- a valid gmail address
* google_password
- password for the gmail account

### Request a Report
**request_report(keywords, hl='en-US', cat=None, geo=None, date=None, use_topic=False)**

**Parameters**
* keywords
- the words to get data for
- Example "Pizza"
- Alternately: "Pizza + Italian"
- Alternately: "iron - chemical element" topic name is "%2Fm%2F025rw19" and needs use_topics=True
* hl
- language
- find available parameters by inspecting the url when manually using Google Trends
- defaults to US english
* cat
- category
- find available parameters by inspecting the url when manually using Google Trends
- defaults to none
* geo
- geographical area
- find available parameters by inspecting the url when manually using Google Trends
- defaults to world
* date
- date to start from
- defaults to all available data
- "MM/YYYY #m" where # is the number of months from that date to pull data for
- "10/2009 61m" would get data from October 2009 to October 2014
* use_topic
- set to true to avoid URLencoding the keywords

### Save a Report to file
**save_csv(path, trend_name)**

**Parameters**
* path
- output path
* trend_name
- human readable name for file

### Credits

* Connecting to google code heavily based off Sal Uryasev's pyGTrends

* With some ideas pulled from Matt Reid's Google Trends API
- https://bitbucket.org/mattreid9956/google-trend-api/overview

Metadata

Release files for pytrends 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytrends 1.0.2
File Size Uploaded
pytrends-1.0.2.tar.gz 5.0 kB Details

Release files / pytrends-1.0.2.tar.gz

Download URL pytrends-1.0.2.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f30cb38c44d1b135e9364feb75236eb50aebeee073139d3f554dd7a4f3abfb6e
BLAKE2b-256 checksum
How to use checksums
2cc20c246741f14aef98ded93533e8216bc12112ef80d22d20e85f57e977a892
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

4.9.2

2 release files

4.9.1

2 release files

4.9.0

2 release files

4.8.0

3 release files

4.7.3

2 release files

4.7.2

1 release file

4.7.1

1 release file

4.6.0

2 release files

4.4.0

1 release file

4.3.0

1 release file

4.2.2

1 release file

4.2.0

3 release files

4.1.1

1 release file

4.1.0

1 release file

4.0.0

1 release file

3.2.0

1 release file

3.1.0

1 release file

3.0.1

1 release file

3.0.0

1 release file

2.0.2

1 release file

2.0.1

1 release file

1.2.0

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

3 release files

1.0.4

1 release file

1.0.3

1 release file

This release

1.0.2 This release

1 release file

1.0.1

1 release file

0.2.0rc1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page