Weatherstack

Operational

Real-time weather data API · by APILayer

  • Weather
  • JSON
  • 14-day forecasts
  • 99.9% uptime
Get your API key

Free plan · 100 requests / month · no card

Overview

API info

Weatherstack provides reliable real-time weather forecasts, historical weather data, and marine weather information through a powerful, easy-to-integrate weather API for developers and businesses worldwide.

Example request

GETShellcurl
curl --request GET \
  --url "https://api.apilayer.net/weatherstack/current?access_key=YOUR_ACCESS_KEY&query=New%20York"
Run it in the Playground

Example response

The Weatherstack docs show the full response object for each endpoint.

See the response in the docs

Features

  • Easy to integrate

    A simple REST API that returns clean JSON. Add your access key to an endpoint, pass a city, ZIP code, coordinates or IP address, and you have live weather in minutes.

  • Global coverage

    Live and hour-by-hour data for millions of cities and towns, from multi-year history to current conditions and up to 14-day forecasts.

  • Rich weather data

    Temperature, wind, pressure, precipitation, humidity, UV index, visibility, astronomy and marine data, in metric, scientific or Fahrenheit units.

  • Reliable at scale

    Runs on APILayer cloud infrastructure, delivers data in milliseconds and averages 99.9% uptime, with HTTPS encryption on every plan.

Pricing

Flexible plan for every stage of growth

Start free. Upgrade when you go live.

MonthlyYearlySave up to 15%

Starter

For your first live product

$9.99/ month

Billed monthly

Then $0.0007992 per extra request, up to 100,000 extra a month

Subscribe now

50,000 requests / month

Everything in Free, plus:

  • Location search
  • Historical data
  • Marine data
  • Hourly data

+ 3 more

See all 13 features
Most popular

Professional

For growing traffic

$49.99/ month

Billed monthly

Then $0.0006665333 per extra request, up to 600,000 extra a month

Subscribe now

300,000 requests / month

Everything in Starter, plus:

  • Forecast: 7 days
  • Languages: 40
  • Bulk queries
  • 6× the requests of Starter

+ 1 more

See all 13 features

Enterprise

For high volume

$99.99/ month

Billed monthly

Then $0.00039996 per extra request, up to 2,000,000 extra a month

Subscribe now

1,000,000 requests / month

Everything in Professional, plus:

  • 3.33333× the requests of Professional
  • Lower cost per request
  • Forecast: 14 days
See all 13 features

Custom

Need more? Contact sales for custom needs.

Contact us

Compare all features

13 featuresFree$0Get free keyStarter$9.99/moSubscribeProfessional$49.99/moSubscribeEnterprise$99.99/moSubscribe
Realtime weather
HTTPS
Location search–
Historical data–
Marine data–
Hourly data–
Astronomy data–
Forecast––7 days14 days
Languages––4040
Bulk queries––
Commercial use–
Standard support–
Custom solutions––––
Price per extra request after the monthly limitNone$0.0007992$0.0006665333$0.00039996

Playground

Try the API

Build a request in your browser and see the response it returns.

GET

Add your free API key to run it from your code.

Agents

Agents: start here

Steps for AI coding agents that add Weatherstack to a project.

  1. 1Get an API key

    A person creates the account: an agent cannot sign up. Sign up at app.apilayer.com and subscribe to Weatherstack. The Free plan includes 100 requests / month and needs no credit card.

    Copy the API key from the APILayer dashboard and give it to the agent as an environment variable (step 2).

  2. 2Keep the key out of code

    Read the key from an environment variable named APILAYER_ACCESS_KEY. Do not write the key into source code, commit it to git, or paste it into a chat.

    Call Weatherstack from server code. The key travels in the request URL, so a request sent from a browser shows the key to every visitor.

    .env
    # add .env to .gitignore
    APILAYER_ACCESS_KEY=your_api_key
  3. 3Make the first request

    Base URL
    https://api.apilayer.net/weatherstack
    Auth
    access_key query parameter
    Formats
    JSON
    Endpoints
    • /current Current weather
    • /historical Historical weather
    • /forecast Forecast
    Shell
    curl "https://api.apilayer.net/weatherstack/current?access_key=$APILAYER_ACCESS_KEY&query=New%20York"

    The API info tab shows the response this request returns.

  4. 4Check the plan before you use a feature

    Each plan adds features to the plan before it. Check that the account's plan includes a feature before writing code that uses it.

    PlanRequests / monthAdds
    Free100Realtime weather, HTTPS
    Starter50,000Location search, Historical data, Marine data, Hourly data, Astronomy data, Commercial use, Standard support
    Professional300,000Forecast: 7 days, Languages: 40, Bulk queries
    Enterprise1,000,000Forecast: 14 days

    Prices are in the Pricing tab.

  5. 5Use the machine-readable docs

FAQs

Need clarity?

Here are the answers you might be seeking

Data & features

01.What is Weatherstack?

Weatherstack is a real-time weather API that delivers current conditions, historical data,forecasts, and marine weather data for any location worldwide. Teams use it for everything from side projects to high-traffic production apps.

02.What data can I get from a weather lookup?

Location details (name, region, country, coordinates, timezone, local time) plus temperature, feels-like, weather description and icon, wind speed and direction, pressure, precipitation, humidity, cloud cover, UV index and visibility. Higher plans add hourly data, astronomy (sunrise, sunset, moon phase) and marine data such as wave height, swell and water temperature.

03.How can I look up a location?

Pass a city name, ZIP or postal code, latitude and longitude, or an IP address. The Location Autocomplete endpoint helps users find the right place as they type.

04.How accurate and reliable is the weather data?

Data is licensed from large weather stations and providers and monitored for consistency. It is updated in real time and served with an average 99.9% uptime.

05.Where is the data coming from?

The weatherstack API is licensing weather data from some of the largest weather stations and weather data providers in the world, all of which are closely monitored for consistency and data accuracy around the clock.

06.How often is weather data refreshed?

Weather data returned by the API as well as weather forecast data always contains the most up-to-date weather information at the current point in time, updated in real-time.

07.How scalable is this service?

The weatherstack API is powered by apilayer cloud infrastructure, a system some of the world's most popular real-time API services are running on, making it highly scalable and flexible at any step of the way.

08.What is an API Request?

Pricing is based on the number of monthly API requests allowed. Each time the weatherstack API service is used to look up a weather information, one API request is consumed. API errors are not counted towards your monthly quota.

09.What happens if I exceed my API Request volume?

Users will be automatically notified via e-mail and on their Account Dashboard once at least 75%, 90%, and 100% of their monthly API Request allowance has been reached. After reaching 100% of the allowance, overages fees will apply so we make sure you won’t experience any disruptions and your website/application will keep running smoothly.

10.What is the API's uptime?

Our API's system status is closely monitored around the clock. Every effort is made to ensure the highest possible level of availability and consistency, and we are proud to have an average uptime rate of nearly 100% (99.9%), calculated based on the past 12 months.

Plans & pricing

01.Is there a free tier, and how do I get started?

Yes. The Free plan includes 100 requests per month for non-commercial use. Sign up, get your API key and follow the Quickstart in the documentation.

02.Can I also pay yearly?

Yes. If you choose annual billing, the total price of your subscription plan will be up to 15% lower than the total amount you would pay with a monthly payment frequency.

Overages

01.What is an overage?

An overage occurs when you go over a quota for your API plan. When you reach your API calls limit, we will charge you a small amount for each new API call so we can make sure there will be no disruption in the service we provide to you and your website or application can continue running smoothly.

Prices for additional API calls will vary based on your plan.

02.Why does APILayer have overage fees?

Overage fees allow customers to continue using an API once a quota limit is reached. We want to make sure your website or application continues running at all times, so charges will apply if you go over your monthly quota limit. If you notice you are going over your quota limit each month, look on your dashboard for an upgraded plan to help with larger request limits.

03.How do I know if I will be charged for overages?

When you are close to reaching your API calls limit for the month, you will receive an automatic notification (at 75%, 90%, and 100% of your monthly quota). You can keep track of your quota usage to prevent overages by tracking the number of API calls you make and checking the dashboard for up-to-date usage statistics.

04.What if I consistently have more API calls than my plan allows?

If your usage consistently surpasses the set limits each month, you may face additional charges for the excess usage. Nevertheless, as your monthly usage reaches a certain threshold, it becomes more practical to consider upgrading to the next plan. By doing so, you ensure a smoother and more accommodating experience for your growing customer base.

Still have a question?

Contact support