Join GitHub today
pgoapi is an unofficial Pokemon Go API library written in python. It provides game authentication and usage of the ingame API over the protocol description POGOProtos (protobuf).
Automatic & dynamic parsing of API requests/responses by finding the correct protocol description is part of this library. The response is returned in a python dictionary format, which can be easily converted to JSON.
For an overview about all possible calls, please have a look at api_functions wiki page.
All possible calls are documented including the necessary input arguments.
It came into being due to the efforts of the /r/pokemongodev community.
Welcome to the Pokemon Go Map wiki Please don't submit bug reports about Pokémon not showing up, it's a known issue. Pokemon Go Map is aiming to bring a live visualization map of nearby Pokémon, Pokéstops and gyms in a form of a web-app as well as native phone applications.
Pokemon GO MAP
Installation will require Python 2.7 and Pip. If you already have these you can skip to installation. Python 3 is not supported at all.
Ubuntu or Debian
You can install the required packages on Ubuntu by running the following command:
sudo apt-get install python python-pip python-dev nodejs nodejs-legacy npm
How to get it up & running (grunt included) on a fresh Ubuntu 16.04 VPS/VM. root is implied.
apt install git nodejs npm python-pip nodejs-legacy python-dev git clone -b develop https://github.com/AHAAAAAAA/PokemonGo-Map.git cd PokemonGo-Map/ pip install --upgrade pip pip install -r requirements.txt npm install npm install -g grunt-cli npm install node-sass grunt build
Red Hat or CentOs or Fedora
You can install the required packages on Red Hat by running the following command:
You may also need to install the EPEL repository to install python-pip and python-devel.
yum install epel-release yum install python python-pip nodejs npm python-devel
You can install the required packages on openSUSE by running the following command:
sudo zypper in python python-pip nodejs npm python-devel python-wsgiref
You can install the required packages on Arch Linux by running the following command
sudo pacman -S python2 python2-pip nodejs npm
OS X (instructions with image here)
OS X comes with some outdated Python packages (these instructions were tested on OS X El Capitan).
You will need to install pip and then upgrade a few python packages.
Instructions (run everything, each on its own line):
curl https://bootstrap.pypa.io/get-pip.py > get-pip.py sudo python ./get-pip.py sudo -H easy_install --upgrade six sudo -H easy_install --upgrade setuptools sudo -H pip install -r requirements.txt
To install node and npm, download and install the installer from https://nodejs.org/en/download/.
Windows (instructions with image here)
Download Git for Windows here and install it.
Download Python 2 (latest 2.7.12) here and install it. When installing check that the python location gets appended to the PATH enviroment variable!
Then download pip (right click that link and choose "Save Link As"), and double click the file you downloaded, assuming you installed Python correctly.
Download NodeJS (latest 6.3.1) here and install.
Open a git bash on your PokemonGo-Map folder with mouse's right click -> Git Bash Here
pip install -r requirements.txt npm install -g grunt npm install -g grunt-cli
(OPTIONAL) For more security fix, upgrade some packages with
npm install firstname.lastname@example.org npm install email@example.com
After that, launch
You are ready!
There is a one-click setup for Windows. After you've installed Python, go into the Easy Setup folder and run setup.bat. This should install pip and the dependencies for you, and put your Google API key into the right place.
Once installed, opening a terminal (cmd.exe prompt) and typing in python ./runserver.py --help should net you this output:
Credentials and Downloading
It is advised to create a separate Pokemon Club account (on their official website) to be used by the program to search for Pokemon. It's ill-advised to use the same account as that you use for the app. If the page is unavailable refresh the page every 5-10 minutes and it should allow signups eventually. It's also possible to use a Google account, in case of both services you can login without ever connecting to the actual game.
Then, download one of the following branches below: To be updated: Download master (Stable builds) Download dev branch (Active development) The dev branch will have latest features from the development team, however it may be unstable at some times.
Extract this zip file to any location.
Now, open a Terminal/Command Line (Win+R and cmd on Windows) and cd to the folder you extracted the zip file to.
In Windows you can also right click within the folder and select "Open Command Window Here."
Then enter the following:
pip install -r requirements.txt npm install
On openSUSE and possibly other Linux distributions you may have to run 'pip2' instead of 'pip' as 'pip' might run the incompatible Python 3 version of pip.
Google Maps API key
You will need to generate your own Google Maps API key and place it in your program directory to use this program. Here's a wiki entry on how to do this part.
To start the server, run the following command:
python runserver.py -u [USERNAME] -p [PASSWORD] -st 10 -k [Google Maps API key] -l "[LOCATION]"
or for Google account:
python runserver.py -a google -u [USERNAME] -p [PASSWORD] -st 10 -k [Google Maps API key] -l "[LOCATION]"
Replacing [USERNAME] and [PASSWORD] with the Pokemon Club credentials you created previously, and [LOCATION] with any location, for example Washington, D.C or latitude and longitude coordinates, such as 38.9072 77.0369.
Additionally, you can change the 10 after -st to any number. This number indicates the number of steps away from your location it should look, higher numbers being farther.
HowTo make Map accessible in Windows Host with VMWare Linux Guest
Set VMWare network to "Bridged Mode"
Enter the following in Linux guest terminal: sudo iptables -A INPUT -i eth0 -p tcp --dport 5000 -j ACCEPT sudo sysctl -w net.ipv4.conf.eth0.route_localnet=1 sudo iptables -t nat -A PREROUTING -p tcp --dport 5000 -j DNAT --to-destination 127.0.0.1:5000
Accesss PokemonGo-Map in your host (Windows) Browser using the IP address of your Linux guest: 192.168.0.X:5000
Note: You need to replace all occurrences of eth0 with the name of your network adapter for all commands used in VMWare guest (Linux). You can find out your network adapter name and IP address using the following command in Linux terminal: ifconfig
Most effective input setups for finding pokemon: For one account:
*"C:\Python27\python.exe" runserver.py -a ptc/google -u UserName -p Password -l "LOCATION" -st 6 -H 0.0.0.0 -L en -sd 10 -ld 1
For many accounts:
*"C:\Python27\python.exe" runserver.py -a ptc/google -u UserName -u Username2 -u Username2 -p Password1 -p Password2 -p Password3 -l "LOCATION" -st 6 -H 0.0.0.0 -L en -sd 10 -ld 1
--increase -sd from 10? --Help? Maybe there should be a discussion? --Not really a discussion. The scan delay is ten seconds as determined by Niantic on August 3rd. Doing more will result in missed pokemon.
As of 2016-07-20, support for the first implementation 'example.py' was dropped. Please use the refactored version present in the branch develop. Periodic tagged releases will be made