Weather Scraper avatar
Weather Scraper
Try for free

3 days trial then $15.00/month - No credit card required now

View all Actors
Weather Scraper

Weather Scraper

epctex/weather-scraper
Try for free

3 days trial then $15.00/month - No credit card required now

Get data about weather forecasts or analyze conditions in any location in the world. This scraper downloads information about forecasts, humidity, temperature, wind, etc. and delivers it in HTML, JSON, XLSX, and more.

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn mode

Node.js

Python

curl

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4client = ApifyClient("<YOUR_API_TOKEN>")
5
6# Prepare the Actor input
7run_input = {
8    "startUrls": [
9        { "url": "https://weather.com/weather/today/l/5aea1d50a6d6b9e99cf89ba79f463d67dcf21ea5061990aae1ffc1c7fa8911a9" },
10        { "url": "https://weather.com/weather/today/l/ada030b2de8db495da2d93d5a2ecf30de1ce8b54cb09725d19c803543685646d" },
11    ],
12    "locations": [
13        "Montgomery, Alabama",
14        "Juneau, Alaska",
15    ],
16    "locationIds": [
17        "e60256f3426acd3c1b3380921210fcffeab628a120c41d1de03b59a0f0dd32ad",
18        "bf217d537cc1c8074ec195ce07fb74de3c1593caa6033b7c3be4645ccc5b01de",
19    ],
20    "timeFrame": "today",
21    "units": "imperial",
22    "maxItems": 10,
23    "proxyConfiguration": { "useApifyProxy": True },
24    "extendOutputFunction": "($) => { return {} }",
25    "customMapFunction": "(object) => { return {...object} }",
26}
27
28# Run the Actor and wait for it to finish
29run = client.actor("epctex/weather-scraper").call(run_input=run_input)
30
31# Fetch and print Actor results from the run's dataset (if there are any)
32for item in client.dataset(run["defaultDatasetId"]).iterate_items():
33    print(item)
Developer
Maintained by Community
Actor metrics
  • 4 monthly users
  • 100.0% runs succeeded
  • 0.0 days response time
  • Created in Aug 2020
  • Modified about 2 hours ago