Connecting to API / Web services

Helpful script writing tricks and HowTo's
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Connecting to API / Web services

Post by Joe Glines » 03 Apr 2019, 16:59

APIs are Amazingly helpful! We had a great AutoHotkey webinar on using Webservices / APIs.

Be sure to check out the 2 hours worth of video as well as the references!. The webinar introduces API calls and compares / contrasts them to a browser call / Web scraping. It also covers a ton about pluses & minuses between the two.

I use Fiddler to help monitor network traffic. Check out my videos on Fiddler for monitoring Network Traffic. They can really help understand what is being sent from the Apps / Website so you know what you need to replicate.

Here is a link to my AutoHotkey API Syntax writer. It can save you significant amount of time writing your AutoHotkey Code! :dance:

If you're new to web scraping, API calls, and http protocol, this is a great discussion you need to see!
Web scraping, APIS and HTTP Traffic
If you're trying to use URLdownload to Var, WinHTTPRequests, or automate Chrome, this is a great overview of the high-level principles of what you're doing and different approaches.



In most of the below examples I use the below function I wrote to parse the parameters. Please make sure you add it to your scripts!

Example API Calls
  1. FullContact- Company & Person lookup
  2. Clearbit- Contact Search
  3. Data24-7- Return email address for a mobile phone number
  4. reddit- Return top 20 AHK posts from Reddit; avoid oAuth2 by leveraging browser cookies!
  5. SmartSheet- Extract JSON as well as binary data (CSV)
  6. OpenWeatherMap- Grab the current & forecaster weather conditions in XML or JSON
  7. Yahoo Query- Play with the highly-flexible Yahoo queries!
  8. Yelp- Work through oAuth1 & oAuth2 to connect to the Yelp API
  9. Zillow- Extract some great Real estate data from the Zillow API
  10. Zoom- Vendors often offer APIs to access your data. I demo connecting to Zoom.us here.
  11. Google Maps– I work through 4 APIs: Directions, Timezone, Places, and GeoLocation
  12. RingCentral- API Calls (Automate Texting, calling, etc.)
Comparision of Web Scraping to API calls
Last edited by Joe Glines on 03 Apr 2021, 08:10, edited 1 time in total.
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
burque505
Posts: 1731
Joined: 22 Jan 2017, 19:37

Re: Connecting to API / Web services

Post by burque505 » 16 Apr 2019, 18:20

:bravo: Joe, another great post. Thank you!!!!!!
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: Connecting to API / Web services

Post by Joe Glines » 16 Apr 2019, 21:02

burque505 wrote:
16 Apr 2019, 18:20
:bravo: Joe, another great post. Thank you!!!!!!
Thanks!
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
ziair
Posts: 2
Joined: 13 Jan 2020, 08:24

Re: Connecting to API / Web services

Post by ziair » 13 Jan 2020, 08:34

Thank you for sharing these APIs, I find it really interesting.
Last edited by gregster on 20 Jan 2020, 18:26, edited 2 times in total.
Reason: Spam links removed.
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: Connecting to API / Web services

Post by Joe Glines » 14 Jan 2020, 17:50

ziair wrote:
13 Jan 2020, 08:34
Thank you for sharing these APIs, I find it really interesting.
You bet! It opens up so many doors it is amazing! :)
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
nichatr
Posts: 7
Joined: 17 May 2019, 01:43
Contact:

Re: Connecting to API / Web services

Post by nichatr » 18 Apr 2020, 15:52

Thank you Joe for sharing the API syntax writer and all the excellent tutorials!
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: Connecting to API / Web services

Post by Joe Glines » 20 Apr 2020, 15:07

@nichatr You bet! I need to push out my current one as I'd made some changes. I'll try and get to that later today
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: Connecting to API / Web services

Post by Joe Glines » 20 Apr 2020, 15:32

@nichatr
Okay, I've uploaded my latest versions. From memory, I added a bunch of items under "Example API calls" templates
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Post Reply

Return to “Tutorials (v1)”