# Heritage Auctions Sports Archive Scraper - Past Lots & Grades (`jungle_synthesizer/heritage-auctions-sports-archive-scraper`) Actor

Scrape the Heritage Auctions sports past-results archive (sports.ha.com): lot titles, full descriptions, PSA/BGS/SGC/CGC grades, year, era, bid counts, sale dates and images. Search by player or keyword, or give lot URLs. Sale prices are members-only on Heritage and are not included.

- **URL**: https://apify.com/jungle_synthesizer/heritage-auctions-sports-archive-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** E-commerce, Sports
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 record scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Heritage Auctions Sports Archive Scraper - Past Lots & Grades

Scrape the Heritage Auctions sports past-results archive (sports.ha.com): lot titles, full descriptions, grading service and grade (PSA/BGS/SGC/CGC), year and era, category, bid counts, sale dates and images for sports cards and memorabilia. Search by player or keyword, or give specific lot URLs.

**Sale prices are not included.** Heritage shows the realized price, hammer price and estimates to signed-in members only, and this actor reads what a visitor sees without signing in.

### What you get

Each result record contains:

| Field                | Description                                                                           |
|----------------------|---------------------------------------------------------------------------------------|
| `lot_id`             | Heritage lot id: auction id and lot number joined by a dash                           |
| `lot_url`            | Lot page URL on sports.ha.com                                                         |
| `lot_number`         | Lot number within the auction                                                         |
| `auction_id`         | Heritage auction (sale) number                                                        |
| `auction_name`       | Auction name, e.g. "2024 August 23 - 25 Summer Platinum Night Sports Auction"         |
| `title`              | Lot title as listed                                                                   |
| `description`        | Full lot description                                                                  |
| `category`           | Heritage category, e.g. "Baseball Cards" or "Boxing Collectibles"                     |
| `subcategory`        | Heritage sub-category, e.g. "Singles (1980-Now)" or "Uniforms"                        |
| `sport`              | Sport taken from the category, e.g. "Baseball"                                        |
| `era`                | Era judged from the year in the title: `pre-war` / `vintage` / `modern`               |
| `year`               | Year from the lot title                                                               |
| `card_number`        | Card number from the lot title, when it has one                                       |
| `grader`             | Grading service named in the title: PSA / BGS / SGC / CGC / CSG / HGA / GAI, or `raw` |
| `grade`              | Grade as written in the title, e.g. "Gem Mint 10"                                     |
| `grade_numeric`      | Numeric part of the grade, when the grade has one                                     |
| `autograph`          | `true` if the title says the lot is signed or autographed                             |
| `memorabilia`        | `true` if the title describes game-used, worn or other memorabilia                    |
| `bid_count`          | Bids plus registered phone bidders on the lot                                         |
| `buyers_premium_pct` | Buyer's premium percentage of the auction                                             |
| `sold_at`            | Sale date (YYYY-MM-DD)                                                                |
| `image_urls`         | Lot image URLs                                                                        |

Fields that depend on the title (`card_number`, `grader`, `grade`, `grade_numeric`) are empty for lots whose title does not name them, such as memorabilia and ungraded items.

### Input

| Parameter       | Type    | Description |
|-----------------|---------|-------------|
| `searchQueries` | array   | Keywords to search the archive for, e.g. `["mickey mantle"]`. Each query is walked page by page until Max Items is met. |
| `lotUrls`       | array   | Specific lot pages to fetch. Use together with, or instead of, Search Queries. |
| `sport`         | string  | Keep only one sport: `baseball`, `basketball`, `football`, `hockey`, `boxing`, `golf`, `soccer`, `olympics`. Leave blank for all. |
| `era`           | string  | Keep only one era: `pre-war` (before 1948), `vintage` (1948-1980), `modern` (1981 onward). Leave blank for all. |
| `maxItems`      | integer | Maximum lots to return. `0` = unlimited. Default: 200 |

Provide at least one of `searchQueries` or `lotUrls`.

#### Example: search for a player

```json
{
    "searchQueries": ["mickey mantle"],
    "maxItems": 50
}
```

#### Example: only modern hockey lots

```json
{
    "searchQueries": ["gretzky"],
    "sport": "hockey",
    "era": "modern",
    "maxItems": 100
}
```

#### Example: fetch specific lots

```json
{
    "lotUrls": [
        "https://sports.ha.com/itm/basketball-cards/singles-1980-now-/1986-fleer-michael-jordan-57-psa-gem-mint-10/a/50039-50122.s"
    ]
}
```

### Notes

- Raise the run's memory to fetch faster: a larger run reads several lots at once.
- The era is a label derived from the year in the lot title, so a lot with no year in its title has no era.
- Lots Heritage has removed are skipped.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

## `searchQueries` (type: `array`):

One or more keywords searched across the Heritage Auctions sports past-results archive (a player, a set, a card number, e.g. "mickey mantle"). Each query is walked page by page until Max Items is met.

## `lotUrls` (type: `array`):

Specific lot pages to fetch, e.g. https://sports.ha.com/itm/baseball-cards/singles-1950-1959-/1952-topps-mickey-mantle-311-sgc-mint-95-1985-rosen-find-finest-known-example-/a/50058-53014.s. Use together with, or instead of, Search Queries.

## `sport` (type: `string`):

Keep only lots in this sport (taken from the lot's category). Leave blank for every sport.

## `era` (type: `string`):

Keep only lots from this era, judged from the year in the lot title: pre-war is before 1948, vintage is 1948 to 1980, modern is 1981 onward.

## `maxItems` (type: `integer`):

Maximum number of lots to return. 0 = unlimited.

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "searchQueries": [
    "mickey mantle"
  ],
  "maxItems": 200
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "searchQueries": [
        "mickey mantle"
    ],
    "sport": "",
    "era": "",
    "maxItems": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/heritage-auctions-sports-archive-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "searchQueries": ["mickey mantle"],
    "sport": "",
    "era": "",
    "maxItems": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/heritage-auctions-sports-archive-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "searchQueries": [
    "mickey mantle"
  ],
  "sport": "",
  "era": "",
  "maxItems": 200
}' |
apify call jungle_synthesizer/heritage-auctions-sports-archive-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jungle_synthesizer/heritage-auctions-sports-archive-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/oSFOkoSVtYqiRxAQN/builds/wP46FccEwHIbUGYTZ/openapi.json
