VOOZH about

URL: https://apify.com/epctex/weather-scraper

โ‡ฑ Weather Scraper ยท Apify


Pricing

$10.00/month + usage

Go to Apify Store

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.

Pricing

$10.00/month + usage

Rating

5.0

(7)

Developer

๐Ÿ‘ epctex

epctex

Maintained by Community

Actor stats

15

Bookmarked

340

Total users

4

Monthly active users

4 hours ago

Last modified

Categories

Share

Weather Scraper is an Apify actor for extracting weather information from Weather.com. It gives you access to various available weather data in structured form. It is build on top of Apify SDK and you can run it both on Apify platform and locally.

Bugs, fixes, updates, and changelog

This scraper is under active development. If you have any feature requests you can create an issue from here.

Input Parameters

FieldTypeDescriptionDefault value
startUrlsarrayList of place urls to be processed[]
unitsstringUnit system to use for the resultsmetric
timeFramestringFuture time frame you want to extract data fortoday
maxItemsnumberMaximum number of actor pages that will be scrapedall found
locationsarrayList of cities / addresses to be processed[]
locationIdsarrayList of location ids to be processed[]
extendOutputFunctionstringFunction that takes a JQuery handle ($) as argument and returns data that will be merged with the default output. More information in Extend output function
customMapFunctionstringFunction that takes each of the output rows as argument and returns data that will be mapped, changed formatting, of the each rows. More information in Custom map function
proxyConfigurationobjectProxy settings of the run. If you have access to Apify proxy, leave the default settings. If not, you can set { "useApifyProxy": false" } to disable proxy usage{ "useApifyProxy": true }

Input example

{
"startUrls":[
{"url":"https://weather.com/weather/today/l/5aea1d50a6d6b9e99cf89ba79f463d67dcf21ea5061990aae1ffc1c7fa8911a9"},
{"url":"https://weather.com/weather/today/l/ada030b2de8db495da2d93d5a2ecf30de1ce8b54cb09725d19c803543685646d"}
],
"locationIds":[
"e60256f3426acd3c1b3380921210fcffeab628a120c41d1de03b59a0f0dd32ad",
"bf217d537cc1c8074ec195ce07fb74de3c1593caa6033b7c3be4645ccc5b01de"
],
"locations":[
"Montgomery, Alabama",
"Juneau, Alaska"
],
"timeFrame":"ten_day",
"units":"metric",
"maxItems":10,
"proxyConfiguration":{
"useApifyProxy":true
},
"extendOutputFunction":"($) => {}",
"customMapFunction":"(object) => {return {...object, }}"
}

Determining locations

In advanced input section, you can provide locations parameter - list of addresses you want to scrape. The actual scraped place is the first result in search box on weather.com. In order to get relevant results (which is not always guaranteed in this case), try to input both city and country name (eg. Paris, France, Vienna, Austria).

If specific locations are needed, you can provide locationIds parameter. Location id is used by weather.com to identify specific location. It can be found in the url of a place, it is the last parameter in path. Few examples:

For New York, NY, which url is https://weather.com/cs-CZ/weather/tenday/l/f892433d7660da170347398eb8e3d722d8d362fe7dd15af16ce88324e1b96e70 the location id is f892433d7660da170347398eb8e3d722d8d362fe7dd15af16ce88324e1b96e70. For London, England with url https://weather.com/en-UK/weather/today/l/7517a52d4d1815e639ae1001edb8c5fda2264ea579095b0f28f55c059599e074 the location id is 7517a52d4d1815e639ae1001edb8c5fda2264ea579095b0f28f55c059599e074.

Compute Unit Consumption

Compute unit consumption was measured on a dataset of 50 US capitals.

When the search was done using locations parameter (given as City, State), the average compute units consumption was 0.02682.

For the same locations, but given in form of startUrls, the average consumption was 0.0152.

And finally, when using locationIds, the average consumption was 0.01916.

Keeping in mind that the dataset is small, the conclusion is to prefer startUrls or locationIds over locations, if you need to scrape larger amounts of locations. This is due to the fact that the search for location id is omitted in the first two cases.

Output

Output is stored in a dataset. Each item is information about weather in a location. The items come in two forms - day/night values for daily items and current values for moment items. Example for day/night values:

{
"city":"Tล™eboลˆ",
"state":"South Bohemia",
"country":"Czech Republic",
"zipCode":"379 01",
"time":"2020-08-15T07:00:00+0200",
"temperature":"24/16",
"forecast":"Thunderstorms/Scattered Thunderstorms",
"humidity":"79/88",
"windDirection":"W/WNW",
"windSpeed":"9/6"
}

Example for current values:

{
"city":"Tล™eboลˆ",
"state":"South Bohemia",
"country":"Czech Republic",
"zipCode":"379 01",
"time":"2020-08-12T19:00:00+0200",
"temperature":27,
"forecast":"Sunny",
"humidity":45,
"windDirection":"E",
"windSpeed":7
}

Extend output function

You can use this function to update the default output of this actor. This function gets a JQuery handle $ as an argument so you can choose what data from the page you want to scrape. The output from this will function will get merged with the default output.

The return value of this function has to be an object!

You can return fields to achive 3 different things:

  • Add a new field - Return object with a field that is not in the default output
  • Change a field - Return an existing field with a new value
  • Remove a field - Return an existing field with a value undefined

Custom map function

You can use this function to change the output of each of the rows that you will get from this actor. This function gets each of the rows on the output as an argument so you can change the formatting, pick which attributes you want to get as the output. The output from this function will be converted into the format you will return.

The return value of this function has to be an object!

You can return fields to achive 3 different things:

  • Add a new field - Return object with a field that is not in the default output
  • Change a field - Return an existing field with a new value
  • Remove a field - Return an existing field with a value undefined
(object)=>{
return{
title: object.title.replace(" - The Weather Channel | Weather.com",""),
windSpeed:7+"knots",
}
}

This example will change the output in the following way:

{
"title":"Tล™eboลˆ, South Bohemia, Czech Republic 10-Day Weather Forecast"
"windSpeed":"7 knots"
}

Note that all the data are scraped from today page (eg. https://weather.com/weather/today/l/81cbe8a06fd80171651aef7a414bce1e599aa05082d82f4e319f94b4b60602e0).

During the Run

During the run, the actor will output messages letting you know what is going on. Each message always contains a short label specifying which page from the provided list is currently specified. When items are loaded from the page, you should see a message about this event with a loaded item count and total item count for each page.

If you provide incorrect input to the actor, it will immediately stop with a failure state and output an explanation of what is wrong.

Weather Scraper Export

During the run, the actor stores results into a dataset. Each item is a separate item in the dataset.

You can manage the results in any language (Python, PHP, Node JS/NPM). See the FAQ or our API reference to learn more about getting results from this Weather Scraper actor.

Contact

Please visit us through epctex.com to see all the products that are available for you. If you are looking for any custom integration or so, please reach out to us through the chat box in epctex.com. In need of support? business@epctex.com is at your service.

You might also like

JobServe Jobs Scraper

fetchclub/jobserve-jobs-scraper

Actively Maintained - Jobs Scraper to extract job listings using keywords and filters from jobserve.com, gathering all details for each role. Works for all countries. Export results for analysis, connect via API or Python & integrate with other apps. Save hours searching. Unofficial JobServe API.

71

5.0

Totaljobs Scraper

lexis-solutions/totaljobs-scraper

The Totaljobs scraper is a web scraping tool that retrieves job postings from Totaljobs, a job search website in the UK.

๐Ÿ‘ User avatar

Lexis Solutions

77

2.9

Notino Scraper

lexis-solutions/notino-scraper

Scrape product data from Notino - including prices, reviews, ratings, and images. Ideal for market research, trend tracking, and e-commerce analytics in beauty and cosmetics. Fast, structured, and customizable.

๐Ÿ‘ User avatar

Lexis Solutions

31

5.0

PitchBook Scraper

mdataset/pitchbook-scraper

PitchBook API gives you access to rich company information, including business details, financial history, deals, competitors, and research reports.

Whale Watcher ๐Ÿ‹

thrilled_estuary/whale-tracker

Spy on crypto whales for $0.25 ๐Ÿ‘€ Track Binance, Coinbase & top wallets. Get AI BUY/SELL alerts. Free tier: 20 whales. No more $150/mo subs. Includes Vitalik's wallet ๐Ÿ‹

DOU.ua Job Scraper

unfenced-group/dou-ua-scraper

Scrape job listings from DOU.ua โ€” Ukraine's largest IT job board. Filter by category, city, experience and keyword.

๐Ÿ‘ User avatar

Unfenced Group

18

Webpage to Markdown

extremescrapes/webpage-to-markdown

This actor cost-effectively converts websites into structured markdown optimized for AI processing. It extracts webpage content, formats it into clean markdown, and ensures compatibility with AI models.

๐Ÿ‘ User avatar

Extreme Scrapes

212

5.0

Autotrader Canada

fayoussef/autotrader-canada

Our autotrader.ca scraper makes it simple to collect car listings at scale. It automatically gathers URLs from all available pages and extracts complete details for every listing โ€” including price, mileage, year, and more.

๐Ÿ‘ User avatar

youssef farhan

248

5.0

RAG Browser

visita/rag-browser

This Actor provides essential web browsing and content extraction functionality for AI Agents, LLM applications, and Retrieval-Augmented Generation (RAG) pipelines. It functions similarly to the web search feature in popular LLM chatbots, providing fresh, contextualized data directly from the web.

๐Ÿ‘ User avatar

Visita Intelligence

20

Yahoo Finance

canadesk/yahoo-finance

Get Stock quotes, Historical data, Analyst recommendations, Price targets and more. It's fast with a very low usage cost!

๐Ÿ‘ User avatar

Canadesk Support

404

5.0