
Weather API
Travelers ask about destination weather. Event planners need forecasts. Logistics teams check conditions along routes. Your AI agent fetches live weather data from WeatherAPI.com, including current conditions, multi-day forecasts, and severe alerts, all inside the conversation.




From live conditions to historical records and sunrise times, your AI agent pulls precise weather data for any location worldwide and delivers it naturally within customer chats.
Weather API
Travel agencies, event companies, logistics firms, and outdoor businesses all field weather questions daily. See how your AI agent handles them automatically.
A customer planning a trip to Bali asks 'Will it rain next week there?' Your AI Agent calls the forecast endpoint for Bali with a 7-day window, retrieves daily precipitation probabilities and temperature ranges, and presents a travel-friendly weather summary. The customer books with confidence. Your agents do not spend ten minutes looking up weather for every inquiry.
An event organizer messages 'Are there any weather warnings for Central Park this Saturday?' Your AI Agent checks alerts.json for active warnings and pulls the forecast for the event date. It reports clear skies with mild winds or warns about incoming storms. The organizer makes venue decisions based on live data. No separate weather app, no manual checking, just a quick chat response.
A fleet dispatcher asks about conditions along a delivery route spanning three cities. Your AI Agent queries current conditions and forecasts for each waypoint, identifying a snowstorm warning in the second city. It recommends rerouting or delaying the shipment. The dispatcher adjusts the schedule before a truck gets stranded. Proactive weather intelligence woven into operational decisions.

Weather API
FAQs
The API is flexible with location input. It accepts city names like 'Mumbai,' ZIP codes, latitude and longitude pairs like '12.97,77.59,' or city-region combinations. Your agent passes whatever the customer types, and the API resolves it. If the location is ambiguous, the agent uses the search endpoint to confirm the correct match first.
The forecast endpoint supports up to 10 days of future weather data depending on your WeatherAPI.com plan. Each forecast day includes high and low temperatures, precipitation, wind conditions, and hourly breakdowns. Your agent requests only the number of days the customer needs, keeping responses focused and relevant.
Yes. The history endpoint returns weather data for any specific date on or after January 1, 2010. It provides temperature, wind, precipitation, and hourly details for the requested location and date. This is useful for insurance claims, event documentation, agricultural records, and legal proceedings.
Yes, when configured. The current, forecast, and history endpoints support an aqi=yes parameter that returns air quality index data alongside standard weather information. Your agent can include or exclude this data based on the customer's question or your default configuration preferences.
WeatherAPI.com updates current conditions in near real-time, typically every 10 to 15 minutes. Forecast data refreshes multiple times daily. Since your agent fetches data live with each conversation query, customers always receive the most recent conditions available. No stale or cached weather information.
Yes. The API supports a language parameter with two-letter codes like 'hi' for Hindi, 'es' for Spanish, or 'fr' for French. The condition text, such as 'Partly cloudy,' is returned in the selected language. Your agent can auto-detect the customer's language preference and pass the appropriate code.
The API returns an error with code 1006 and message 'No matching location found.' Your agent handles this gracefully by asking the customer to verify the location name, suggesting corrections based on the search endpoint's autocomplete results, and offering to try nearby cities or regions instead.
Query limits depend on your WeatherAPI.com subscription plan. Free plans offer up to 1 million calls per month. Paid plans increase limits and unlock additional features like extended forecasts and historical data. Your agent makes one API call per weather question, so typical conversational volumes are well within standard plan limits.
Don't limit your AI Agent to basic conversations. Watch how to configure and add powerful tools making your agent smarter and more functional.

Privacy & Security
At Tars, we take privacy and security very seriously. We are compliant with GDPR, ISO, SOC 2, and HIPAA.