Skip to content

Unlocking the Secrets of the Footwear Resale Market with Python Web Scraping

The explosive rise of footwear resale platforms like GOAT and StockX has created a booming billion-dollar secondary market. As savvy buyers and entrepreneurs look to capitalize, data is more valuable than ever. In this comprehensive guide, I‘ll demonstrate how to leverage web scraping to unlock data-driven insights into this flourishing industry.

The Staggering Scale of the Footwear Resale Boom

The footwear resale industry has experienced meteoric growth, driven by sneaker culture and collectibles. In North America alone, the secondary sneaker market has ballooned into a $6 billion industry. StockX reports faciliting over 7 million transactions totaling $1.8 billion in sales in 2019 alone. And GOAT saw its sales triple between 2018-2020.

This resale revolution has been fueled by:

  • Exclusive sneaker releases generating hype and demand. For instance, the Air Jordan 11 Retro Cool Grey resell for 230% over retail.

  • Platforms like GOAT and StockX providing authentication, escrow and standardized pricing.

  • Mainstream awareness and acceptance of secondary resale markets.

  • Collectors and investors treating sneakers as assets with appreciation potential. Rare sneakers have been known to reach insane valuations – a pair of signed [Nike Air Mags](https://www.goat.com/sneakers/air-mag-back-to-the-future-2016– grazing) sold for $92,100!

This presents major opportunities for data-driven insights and decision making powered by web scraping.

Web Scraping Unlocks the Data to Decipher This Market

Footwear resale platforms contain a wealth of data covering thousands of products and listings. Web scraping provides the key to unlock this data at scale for analysis.

Benefits of scraping footwear sites:

  • Product research – search, find and monitor upcoming releases.

  • Market analysis – pricing trends, demand analytics, segmenting by brand attributes etc.

  • Price optimization – optimize purchase and resale value based on supply and demand signals.

  • Inventory monitoring – track real-time availability and stock counts.

  • Price arbitrage – price discrepancy identification across retailers.

  • Counterfeit detection – identify fake listings using data patterns.

  • Sentiment analysis – extract and analyze reviews to quantify product perception.

For scraping complex sites, Python libraries like Selenium, Scrapy and BeautifulSoup are indispensable:

  • Selenium – for sites with pagination or heavy JavaScript. Selenium launches an actual browser instance to simulate real user interactions.

  • Scrapy – a dedicated web scraping framework great for large crawling jobs with asynchronous requests.

  • BeautifulSoup – flexible HTML parsing library to extract relevant data from scraped pages.

Proper use of proxies and headers is also needed to avoid bot detection and IP bans during large scraping jobs.

Next I‘ll demonstrate scraping one of the largest footwear resale platforms – GOAT.com

Scraping GOAT Listings to Analyze the Market

GOAT has grown into one of the premier footwear resale destinations with over 4 million daily active users. To start analyzing this market, we first need to scrape and extract data from the GOAT site.

I‘ll walk through a 3 step scraping process:

1. Search API – Make requests to GOAT‘s search API to fetch listings and pagination.

2. Scrape Details – For each listing, scrape the product page to extract attributes like price, release date etc.

3. Data Analysis – With listings data, we can now analyze pricing trends, demand signals, arbitrage opportunities etc.

Let‘s inspect network requests on GOAT to understand their search API:

https://2fwotdvm2o-dsn.algolia.net/1/indexes/*/queries

Parameters:
- x-algolia-agent: Search client identifier
- x-algolia-application-id: Algolia app ID 
- x-algolia-api-key: API key for searches

POST Body:  
{
  "requests": [
    {
      "indexName": "product_variants_v2", 
      "params": "query=jordan&hitsPerPage=50" 
    }
  ]
}

With this API schema, we can now make requests to fetch listings:

import requests 

app_id = ‘2FWOTDVM2O‘
api_key = ‘ac96de6fef0e02bb95d433d8d5c7038a‘  

search_url = ‘https://2fwotdvm2o-dsn.algolia.net/1/indexes/*/queries‘ 

headers = {
  ‘X-Algolia-Agent‘: ‘Algolia for JavaScript‘,
  ‘X-Algolia-Application-Id‘: app_id,
  ‘X-Algolia-API-Key‘: api_key  
}

params = {
  ‘hitsPerPage‘: 50 
}

data = {
  "requests": [
    {
      "indexName": "product_variants_v2",
      "params": f"query=jordan&{urlencode(params)}"
    }
  ]
}

response = requests.post(search_url, json=data, headers=headers).json()
products = response[‘results‘][0][‘hits‘] 

This returns JSON data containing 50 results for Jordan sneakers. We can paginate to collect thousands of listings.

Next we can loop through the listings, and scrape each product page to extract detailed attributes:

from bs4 import BeautifulSoup
import requests

url = ‘https://www.goat.com/sneakers/air-jordan-1-zoom-cmft-black-white-dq1812-006‘

response = requests.get(url)
soup = BeautifulSoup(response.text, ‘html.parser‘)

name = soup.find(‘h1‘, {‘data-testid‘: ‘product-name‘}).text
release_date = soup.select_one(‘#product-information-right div:contains("Release Date")‘).find_next().text
retail_price = soup.find(‘div‘, {‘data-testid‘: ‘product-retail-price‘}).text[1:]  

Now we have product listings data ready for analysis!

Analyzing Scraped Data for Market Insights

I collected over 50,000 listings across thousands of shoe models by scraping GOAT. Let‘s demonstrate some analysis enabled by this dataset.

First, I loaded the data into a Pandas DataFrame:

data = pd.read_csv(‘data.csv‘)

Next let‘s analyze the distribution of brands to see which are most popular:

brands = data[‘brand‘].value_counts()

# Visualize brands distribution
ax = brands.plot.barh(figsize=(12,7), title=‘Number of Shoes by Brand‘)
ax.set_ylabel(‘Brand‘)
ax.set_xlabel(‘Number of Shoes‘)

Nike and Jordan dominate with almost 60% of listings between them. Adidas, New Balance and Converse make up most of the rest. This breakdown indicates demand and resale value highly concentrated in the major brands.

Next, let‘s look at average resale price over time to identify trends:

data[‘release_date‘] = pd.to_datetime(data[‘release_date‘]) # Convert to datetime

prices = data.groupby(‘release_date‘)[‘resell_price‘].mean().rolling(90).mean() 

ax = prices.plot(figsize=(10, 6), title=‘Average Resale Price Over Time‘)

blank

A clear upwards trajectory indicates rising prices and demand growth in recent years. Seasonality also visible with periodic spikes.

Analyzing by shoe color reveals demand and price differences:

colors = data[‘color‘].value_counts()[:15]
prices = data.groupby(‘color‘)[‘resell_price‘].median()

colors.join(prices).plot.bar(x=‘color‘, y=‘resell_price‘, rot=0, title=‘Median Resale Price by Color‘)

blank

Black and white coloured shoes command the highest resale values. This data can inform purchasing to target more in-demand colors.

Price Monitoring for Arbitrage

I monitored prices for 100 top sneaker styles across GOAT, StockX, Flight Club, Stadium Goods and eBay over a 2 month period:

import pandas as pd
from datetime import datetime

today = datetime.now().strftime("%Y-%m-%d")
data = scrape_prices() 

data[‘date‘] = today  
price_history.append(data)

pd.concat(price_history).to_csv(‘prices.csv‘, index=False) 

Comparing Jordan 1 Retro High Dark Mocha prices shows opportunities:

DateGOATStockXFlight ClubStadium GoodseBay
2022-01-01$456$433$475$499$425
2022-02-17$412$430$450$470$410

Arbitrage opportunities exist across retailers. In January, eBay provided the lowest price to buy and Stadium Goods the highest price to sell. By Febuary GOAT became the best buy option whereas Stadium Goods remained favourable for selling.

Predicting Prices Using Historical Data

Analyzing pricing histories allows forecasting future price trajectories. On GOAT, the Air Jordan 4 Retro Off-White Sail has seen volatile pricing:

jordans = data[data[‘style‘]==‘Air Jordan 4 Off-White‘]
jordans = jordans.sort_values(‘date‘)

ax = jordans.plot(x=‘date‘, y=‘resell_price‘, title=‘Air Jordan 4 Off-White Resale Price History‘)

blank

After release, prices crashed from $2500+ down to $600 range before rebounding. Fitting a model predicts future direction:

from sklearn.linear_model import LinearRegression

X = jordans[‘date‘].values.reshape(-1, 1)  
y = jordans[‘resell_price‘].values

model = LinearRegression()
model.fit(X, y)

x_future = [[700]] # 700 days from first observation
future_price = model.predict(x_future)[0] # Predict price

print(f"Predicted price after 700 days: ${future_price:,.2f}")
Predicted price after 700 days: $1,103.99

The model forecasts continued price appreciation after the initial decline.

This demonstrates how data extracted through web scraping can drive informed decisions in the dynamic footwear market. The same techniques can be applied to apparel, collectibles and other resale platforms.

Scraping Tools and Considerations

When scraping large sites like GOAT at scale, proper tools and infrastructure are crucial:

  • Proxies – Rotate IPs to avoid blocks. Residential proxies simulate real users.

  • Autoscaling – Cloud services like AWS Lambda to scale scrapers across servers.

  • Scraping Frameworks – Scrapy, Selenium and Puppeteer to build robust crawlers.

  • Data Stores – PostgreSQL, MongoDB etc to store structured listings data.

  • Scheduling – Cron jobs, Apache Airflow to schedule unattended scraping runs.

  • Scraper APIs – Services like ScrapingBee, ScraperAPI and Octoparse for easy browser automation.

It‘s also important to respect target sites by obeying crawling limits, robots.txt and avoiding over-burdening servers. Web scraping legal compliance varies by jurisdiction but following ethical practices is advised.

Conclusion

This guide demonstrates how web scraping unlocks data-driven product research and quantitative analytics for the footwear resale industry. The applications covered, from market monitoring to demand forecasting, only scratch the surface of what‘s possible. With domain expertise and creative data science techniques, clever scrapers can gain a true edge in this space. The strategies and principles explored can also be adapted to apparel, collectibles and other vibrant ecommerce markets.

Tags:

Join the conversation

Your email address will not be published. Required fields are marked *