47 lines
1.4 KiB
Markdown

# !IMPORTANT!
If you are looking to this repo to see how to get more search results or get passed a `INVALID REQUEST -`
error, pay attention.
As of the most recent commit of this repo, Google Nearby Search API through theit golang package
does not allow for increasing the max results. You can only get `20` per page and `60` total.
If you get that error:
Google also puts a throttler on their endpoints. They don't docuemnt it but I found it in a closed
issue on the repo: https://github.com/googlemaps/google-maps-services-go/issues/185
So make sure you have some kind of sleep inbetween each pagiated call (maybe any call actually)
# nearby-business-search
Simple Go script to query Google Maps API `Nearby Search API` to gather data for target company research.
Exports this data to an `.xlsx` spreadsheet.
## Setup
```bash
cp .env.example .env
```
There are still some fields that I plan to move to the `.env` for configuring, but the majority of them are
there now.
A Google project API key will be needed.
Be cautious of setting very large `MAX_RESULTS` as Google will eventually charge for this. Keep the number low
if you are testing.
## Run
```bash
go run .
```
Or build it first.
After you run the program, you will see logs stepping through stages of the progress. A simplified table will
be printed out to the terminal and the detailed `.xlsx` will be created based on what ever file name you gave
in the `.env`