Discover/Magicseaweed API
live

Magicseaweed APImagicseaweed.com

Access surf forecasts, wave heights, wind, tides, and weather for any surf spot worldwide via the Magicseaweed API. Search spots and get up to 16-day forecasts.

Endpoints
3
Updated
2mo ago

What is the Magicseaweed API?

The Magicseaweed API covers 3 endpoints that expose surf spot discovery, detailed multi-day forecasts, and popular spot conditions. The get_spot_forecast endpoint returns hourly wave, wind, tide, and weather data for up to 16 days at any spot ID, while search_spots resolves location names — from "Malibu" to "Pipeline" — into the numeric IDs those forecasts require. A third endpoint surfaces a curated list of popular breaks with current conditions and camera details.

Try it
The name of the beach or surf spot to search for (e.g. 'Malibu', 'Pipeline').
api.parse.bot/scraper/bdd16c83-771c-411b-b9e9-b7de50f4ec1a/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/bdd16c83-771c-411b-b9e9-b7de50f4ec1a/search_spots?query=Malibu' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace magicseaweed-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""
Surfline API Scraper - Access global surf reports, forecasts, and spot data.
Get your API key from: https://parse.bot/settings
"""

import os
import requests
from datetime import datetime
from typing import Any, Optional


class ParseClient:
    """Client for Surfline API Scraper via Parse API."""
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the Parse client with API credentials."""
        self.base_url = "https://api.parse.bot"
        self.scraper_id = "bdd16c83-771c-411b-b9e9-b7de50f4ec1a"
        self.api_key = api_key or os.getenv("PARSE_API_KEY")
        
        if not self.api_key:
            raise ValueError("API key must be provided or set in PARSE_API_KEY environment variable")
    
    def _call(self, endpoint: str, method: str = "POST", **params) -> dict[str, Any]:
        """Make API call to the Parse scraper endpoint."""
        url = f"{self.base_url}/scraper/{self.scraper_id}/{endpoint}"
        headers = {
            "X-API-Key": self.api_key,
            "Content-Type": "application/json"
        }
        
        if method.upper() == "GET":
            response = requests.get(url, headers=headers, params=params)
        elif method.upper() == "POST":
            response = requests.post(url, headers=headers, json=params)
        else:
            raise ValueError(f"Unsupported HTTP method: {method}")
        
        response.raise_for_status()
        return response.json()
    
    def search_spots(self, query: str) -> dict[str, Any]:
        """
        Search for surf spots by name.
        
        Args:
            query: The name of the beach or surf spot (e.g., 'Malibu', 'Pipeline')
        
        Returns:
            Dictionary containing search results with spot IDs and details
        """
        return self._call("search_spots", method="GET", query=query)
    
    def get_spot_forecast(self, spot_id: str, days: int = 5) -> dict[str, Any]:
        """
        Retrieve detailed surf forecast for a specific spot.
        
        Args:
            spot_id: The unique Surfline spot ID (found via search_spots)
            days: Number of days to forecast (1-16, default: 5)
        
        Returns:
            Dictionary containing wave, wind, tides, and weather forecast data
        """
        return self._call("get_spot_forecast", method="GET", spot_id=spot_id, days=days)
    
    def get_popular_spots(self) -> dict[str, Any]:
        """
        Retrieve a list of popular surf spots in the US.
        
        Returns:
            Dictionary containing array of popular spots with current conditions
        """
        return self._call("get_popular_spots", method="GET")


def format_timestamp(timestamp: int, utc_offset: int = 0) -> str:
    """Convert Unix timestamp to readable date/time."""
    return datetime.fromtimestamp(timestamp).strftime("%Y-%m-%d %H:%M:%S")


def print_wave_conditions(wave_data: dict[str, Any]) -> str:
    """Format wave condition data into a readable string."""
    surf = wave_data.get("surf", {})
    min_height = surf.get("min", "?")
    max_height = surf.get("max", "?")
    human_relation = surf.get("humanRelation", "Unknown")
    
    swells = wave_data.get("swells", [])
    swell_info = ""
    if swells:
        primary_swell = swells[0]
        height = primary_swell.get("height", "?")
        period = primary_swell.get("period", "?")
        swell_info = f" (Swell: {height}ft @ {period}s)"
    
    return f"{min_height}-{max_height}ft {human_relation}{swell_info}"


def print_forecast_summary(forecast: dict[str, Any], spot_name: str) -> None:
    """Print a formatted summary of the surf forecast."""
    print(f"\n{'='*70}")
    print(f"🏄 SURF FORECAST FOR: {spot_name}")
    print(f"{'='*70}")
    
    # Wave forecast
    if forecast.get("wave"):
        print("\n📊 WAVE FORECAST (Next 24-48 hours):")
        for i, wave_data in enumerate(forecast["wave"][:6], 1):
            ts = wave_data.get("timestamp")
            conditions = print_wave_conditions(wave_data)
            probability = wave_data.get("probability", 100)
            print(f"  [{i}] {format_timestamp(ts)} | {conditions} ({probability}% probability)")
    
    # Wind data
    if forecast.get("wind"):
        print("\n💨 WIND CONDITIONS:")
        for i, wind_data in enumerate(forecast["wind"][:4], 1):
            ts = wind_data.get("timestamp")
            speed = wind_data.get("speed", "?")
            direction = wind_data.get("direction", "?")
            direction_type = wind_data.get("directionType", "")
            gust = wind_data.get("gust", speed)
            print(f"  [{i}] {format_timestamp(ts)} | {speed:.1f} mph @ {direction:.0f}° {direction_type} (Gust: {gust:.1f})")
    
    # Weather
    if forecast.get("weather"):
        print("\n🌤️ WEATHER CONDITIONS:")
        for i, weather_data in enumerate(forecast["weather"][:4], 1):
            ts = weather_data.get("timestamp")
            temp = weather_data.get("temperature", "?")
            condition = weather_data.get("condition", "Unknown")
            pressure = weather_data.get("pressure", "?")
            condition_display = condition.replace("_", " ").title()
            print(f"  [{i}] {format_timestamp(ts)} | {temp:.0f}°F, {condition_display} ({pressure}mb)")
    
    # Tide information
    if forecast.get("tides"):
        print("\n🌊 TIDE INFORMATION:")
        for i, tide_data in enumerate(forecast["tides"][:4], 1):
            ts = tide_data.get("timestamp")
            height = tide_data.get("height", "?")
            tide_type = tide_data.get("type", "NORMAL")
            print(f"  [{i}] {format_timestamp(ts)} | {height:.2f}ft ({tide_type})")


def main():
    """Main execution: comprehensive workflow combining multiple API calls."""
    # Initialize client
    try:
        client = ParseClient()
    except ValueError as e:
        print(f"Error: {e}")
        return
    
    print("\n🏄 SURFLINE FORECAST ANALYZER")
    print("=" * 70)
    print("Searching for popular surf spots and analyzing conditions...")
    
    # Step 1: Get popular spots overview
    print("\n\n📍 DISCOVERING POPULAR SURF SPOTS")
    print("-" * 70)
    
    popular_spots_data = None
    try:
        popular_response = client.get_popular_spots()
        popular_spots_data = popular_response.get("data", {}).get("spots", [])
        
        if popular_spots_data:
            print(f"\n✅ Found {len(popular_spots_data)} popular spots")
            print("\nTop 5 Popular Spots:")
            for i, spot in enumerate(popular_spots_data[:5], 1):
                spot_name = spot.get("name", "Unknown")
                conditions = spot.get("conditions", {}).get("value", "N/A")
                surf_min = spot.get("surf", {}).get("min", "?")
                surf_max = spot.get("surf", {}).get("max", "?")
                wind_speed = spot.get("wind", {}).get("speed", "?")
                print(f"  {i}. {spot_name:25} | Condition: {conditions:8} | Surf: {surf_min:.1f}-{surf_max:.1f}ft | Wind: {wind_speed:.1f}mph")
        else:
            print("⚠️ No popular spots data returned")
    except Exception as e:
        print(f"⚠️ Error fetching popular spots: {e}")
    
    # Step 2: Search for specific destinations and get detailed forecasts
    print("\n\n🔍 DETAILED FORECAST ANALYSIS")
    print("-" * 70)
    
    destinations = ["Malibu", "Pipeline", "Rincon"]
    forecasts_retrieved = 0
    
    for destination in destinations:
        try:
            print(f"\n\n📡 Searching for: {destination}")
            search_result = client.search_spots(destination)
            
            spots = search_result.get("spots", [])
            if not spots:
                print(f"   ❌ No spots found for '{destination}'")
                continue
            
            # Get the first matching spot
            spot = spots[0]
            spot_id = spot.get("id")
            spot_name = spot.get("name")
            location = spot.get("location", {})
            breadcrumbs = spot.get("breadCrumbs", [])
            spot_type = spot.get("type", "spot")
            
            print(f"   ✅ Found: {spot_name} (Type: {spot_type})")
            if breadcrumbs:
                location_str = " > ".join(breadcrumbs)
                print(f"   📍 Location: {location_str}")
            if location:
                lat = location.get("lat", 0)
                lon = location.get("lon", 0)
                print(f"   🧭 Coordinates: {lat:.4f}, {lon:.4f}")
            
            # Get detailed forecast
            print(f"   ⏳ Fetching 3-day forecast...")
            forecast = client.get_spot_forecast(spot_id, days=3)
            
            # Display formatted forecast
            print_forecast_summary(forecast, spot_name)
            forecasts_retrieved += 1
            
        except requests.exceptions.RequestException as e:
            print(f"   ❌ Network error for {destination}: {e}")
        except (KeyError, ValueError, TypeError) as e:
            print(f"   ❌ Data processing error for {destination}: {e}")
        except Exception as e:
            print(f"   ❌ Unexpected error for {destination}: {e}")
    
    # Summary
    print(f"\n\n{'='*70}")
    print(f"✨ ANALYSIS COMPLETE")
    print(f"Successfully retrieved {forecasts_retrieved} detailed forecasts")
    print(f"{'='*70}\n")


if __name__ == "__main__":
    main()
All endpoints · 3 totalmissing one? ·

Search for surf spots by name to find their unique IDs. Returns matching spots, geonames, and travel destinations.

Input
ParamTypeDescription
queryrequiredstringThe name of the beach or surf spot to search for (e.g. 'Malibu', 'Pipeline').
Response
{
  "type": "object",
  "fields": {
    "query": "string — the search query echoed back",
    "spots": "array of objects containing id, name, breadCrumbs, location (lat/lon), and type (spot, geoname, editorial, travel)"
  },
  "sample": {
    "data": {
      "query": "Malibu",
      "spots": [
        {
          "id": "5842041f4e65fad6a7708e1b",
          "name": "Baja Malibu",
          "type": "spot",
          "location": {
            "lat": 32.417,
            "lon": -117.096
          },
          "breadCrumbs": [
            "Mexico",
            "Estado de Baja California",
            "Tijuana"
          ]
        },
        {
          "id": "584204214e65fad6a7709b9f",
          "name": "Malibu First Point",
          "type": "spot",
          "location": {
            "lat": 34.03577735818882,
            "lon": -118.67668
          },
          "breadCrumbs": [
            "United States",
            "California",
            "Los Angeles County"
          ]
        }
      ]
    },
    "status": "success"
  }
}

About the Magicseaweed API

Spot Search and Discovery

The search_spots endpoint accepts a query string and returns an array of matching results, each carrying an id, name, breadCrumbs for context, a location object with latitude and longitude, and a type field that distinguishes between surf spots, geonames, editorial features, and travel destinations. This makes it the correct starting point when you have a place name but need the spot_id required by the forecast endpoint.

The get_popular_spots endpoint requires no parameters and returns a data object containing a spots array with current conditions, surf, wind, swells, tide, and cameras fields for each featured break. An associated object carries unit configuration, and a permissions object surfaces any access restrictions. This endpoint is suited for overview dashboards that need a snapshot of well-known breaks without prior knowledge of individual spot IDs.

Forecast Data

The get_spot_forecast endpoint takes a required spot_id and an optional days integer (1–16) and returns four parallel arrays: wave (timestamp, surf min/max, swell breakdown, power), wind (timestamp, speed, direction, directionType, gust), tides (timestamp, type, height), and weather (timestamp, temperature, condition, pressure). Each array uses consistent timestamps so records at the same index can be aligned across forecast types. An associated object provides units, UTC offset, location metadata, and forecast metadata to frame the raw numbers correctly.

Coverage Notes

Magicseaweed indexes thousands of named surf spots globally. The breadCrumbs field in search results helps disambiguate spots that share names across regions. Forecast depth extends to 16 days, though confidence naturally decreases at the outer range. Tide data uses type and height fields rather than a continuous water-level series, which suits session planning but not precision marine modeling.

Reliability & maintenance

The Magicseaweed API is a managed, monitored endpoint for magicseaweed.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when magicseaweed.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official magicseaweed.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a surf session planner that resolves a beach name via search_spots and displays a 7-day wave height and wind chart from get_spot_forecast.
  • Create a travel itinerary tool that cross-references get_popular_spots conditions with flight and accommodation availability.
  • Power a surf alert system that monitors swell min/max and gust values and notifies users when thresholds are met at a saved spot.
  • Render a tide table widget using the tides array (type and height fields) for any spot ID.
  • Display a regional conditions map by resolving spot location lat/lon from search_spots and layering current conditions from get_popular_spots.
  • Aggregate historical forecast accuracy by storing timestamped wave and weather responses and comparing them against later actuals.
  • Enrich a surf camp booking platform with live break conditions and camera availability from the get_popular_spots cameras field.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Magicseaweed have an official developer API?+
Magicseaweed previously offered a public forecast API for developers, documented at magicseaweed.com/developer/forecast-api. As of recent years that program has been closed to new signups. The Parse API provides an alternative way to access the same forecast and spot data without requiring direct API credentials from Magicseaweed.
What does `get_spot_forecast` return and how do I control the time range?+
It returns four arrays — wave, wind, tides, and weather — each containing objects with a timestamp field for alignment. You control the horizon using the days parameter, which accepts integers from 1 to 16. Omitting days returns the default forecast window. The associated object in the response provides the UTC offset and units needed to interpret raw timestamps and measurement values correctly.
Does the API return surf spot user reviews or crowd ratings?+
Not currently. The API covers forecast data (wave, wind, tide, weather), spot metadata (name, location, breadcrumbs), and current conditions for popular breaks. User-generated reviews, crowd ratings, or session logs are not included in the current endpoints. You can fork this API on Parse and revise it to add an endpoint targeting that data.
Can I retrieve historical forecast or observed wave data?+
The endpoints return forward-looking forecast data from the current date. Historical wave observations or archived forecast records are not exposed by the current three endpoints. You can fork this API on Parse and revise it to add a historical data endpoint if that data is accessible on the source.
How do I find the correct spot_id for a location like 'Jeffreys Bay' or 'Uluwatu'?+
Pass the location name as the query parameter to search_spots. The response returns an array of matching objects, each with an id, name, breadCrumbs (which shows the region and country hierarchy), and a type field. Use type: spot results and match on breadCrumbs to resolve ambiguity when multiple spots share a name. The id from that object is the spot_id value for get_spot_forecast.
Page content last updated . Spec covers 3 endpoints from magicseaweed.com.
Related APIs in WeatherSee all →
surfline.com API
Check real-time surf conditions, forecasts for waves and wind, tide predictions, and live camera feeds from thousands of surf spots around the world. Browse spots by geographic region and access detailed weather data to plan your perfect surfing session.
weatherspark.com API
Get historical weather data, current METAR reports, and monthly climate summaries for any location by searching WeatherSpark's comprehensive weather database. Access detailed weather insights including temperature trends, precipitation patterns, and atmospheric conditions to power weather-dependent applications and analysis.
metoffice.gov.uk API
Access detailed UK weather forecasts, real-time lightning tracking, and weather warnings from the Met Office. Search locations to retrieve hourly, daily, regional, and long-range predictions, and monitor storm activity with spot forecasts across any geographic area.
weatherforecast.com API
Get detailed 12-day weather forecasts for any location worldwide, with temperature, wind, rain, humidity, and UV index data updated three times daily. Search locations and retrieve comprehensive weather information suitable for travel planning, research, and general forecasting needs.
weatherunderground.com API
Get real-time weather data and 10-day forecasts for any location, with access to current conditions like temperature, humidity, and wind speed. Search for locations and receive detailed weather narratives to plan your day or week ahead.
openweathermap.org API
Search for cities and retrieve live weather conditions and forecasts (current, minutely precipitation, hourly and daily) by coordinates or by city name.
meteo.pl API
Get detailed weather forecasts with temperature, pressure, wind, precipitation, and cloud data for any location using multiple weather models (UM, GFS) from Poland's Institute of Meteorology and Water Management. Search locations and access available forecasts to plan ahead with comprehensive meteorological information.
accuweather.com API
Get real-time weather conditions, multi-day forecasts, and health alerts for any location worldwide. Search cities and access detailed data including allergen information and air quality to plan your activities with confidence.