# Courtyard.io Scraper (`codingfrontend/courtyard-io-scraper`) Actor

Extract public graded-card listings, certification grades, prices, fair-market-value estimates, and deal scores from Courtyard.io's marketplace.

- **URL**: https://apify.com/codingfrontend/courtyard-io-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### Courtyard.io Scraper

CSV rank: 506. This Actor reads Courtyard.io's public marketplace search index and returns sanitized graded-card and collectible listings. It is designed for public price research, certification comparisons, deal-score monitoring, and bounded inventory snapshots.

### What does Courtyard.io Scraper do?

The Actor uses Courtyard's public configuration and public Algolia-compatible search proxy. It supports full-text search, category, grader, set, sort order, bounded pages, and a maximum of 100 listing rows. It requests only marketplace fields needed for the output; owner, maker, wallet, and user identity fields are intentionally omitted.

### Input

All fields are optional. The Input tab contains the authoritative schema.

```json
{
  "searchQuery": "Pokemon",
  "grader": "PSA",
  "sortBy": "recentlyListed",
  "maxItems": 10,
  "maxPages": 1,
  "timeoutSecs": 30,
  "maxRetries": 1,
  "includeDiagnostics": true
}
```

`sortBy` accepts `recentlyListed`, `priceLowToHigh`, `priceHighToLow`, `recentlyAdded`, `recentlySold`, or `bestDeals`. Requests use HTTPS, bounded timeouts, bounded retries, and a response-size cap. `fixtureFile` is an explicit repository-local JSON QA input and is never a network fallback.

### Output

Normal rows use `recordType: "marketplace_listing"`, a stable `recordId`, `dataAvailable: true`, `found: true`, public asset URLs, typed price and certification fields, and `scrapedAt`. Live rows have `sourceBacked: true`, `targetSpecificFieldsClaimed: true`, `accessStatus: "available"`, and `provenance: "public_courtyard_algolia"`. Fixture rows are marked `fixtureMode: true`, `sourceBacked: false`, `accessStatus: "fixture"`, and `provenance: "local_qa_fixture_json"`; they are excluded from live counts.

When public access fails, returns a challenge, or produces no usable hits, the Actor emits a diagnostic row (unless `includeDiagnostics` is false) with a machine-readable error code and truthful availability flags. It does not claim that a challenge page or empty response is a listing.

### Data fields

| Field | Description |
| --- | --- |
| `title`, `category`, `set`, `cardNumber`, `year`, `variant` | Public collectible catalog fields |
| `grader`, `grade`, `certification`, `certificationNumber` | Public grading details |
| `price`, `priceUsd`, `latestListing` | Public current listing price data |
| `estimatedValueUsd`, `estimatedValueConfidence`, `dealScore` | Public marketplace estimates and signals |
| `createdAt`, `listedAt`, `lastSaleDate` | Public timestamps |
| `assetUrl`, `imageUrl`, `sourceUrl` | Public provenance links |

### Run summary and downloads

The reconciled run summary is written to `OUTPUT_SUMMARY` and the compatibility aliases `RUN_SUMMARY`, `OUTPUT`, and `SUMMARY`. It reports normal rows, diagnostic rows, fixture rows, source-backed rows, pages, request attempts, retries, failures, provenance, and completion status.

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Pricing and limitations

The Actor makes short, bounded public HTTP requests. Actual cost depends on your Apify plan and run duration; use `maxItems` and `maxPages` to keep scheduled runs predictable. Courtyard may change its public index, fields, availability, or access policy. The Actor does not log in, solve CAPTCHAs, use stealth, bypass access controls, or call private APIs. Respect Courtyard's terms, robots guidance, rate limits, applicable law, and privacy obligations.

### Support

For an issue, include the run ID, sanitized input, `OUTPUT_SUMMARY`, and diagnostic code. Do not include credentials, cookies, authorization headers, or private identity data. Inventory listing: [apify.com/devcake/courtyard-io-scraper](https://apify.com/devcake/courtyard-io-scraper).

# Actor input Schema

## `searchQuery` (type: `string`):

Optional full-text search, for example Pokemon, Topps, or Messi.

## `category` (type: `string`):

Optional exact public marketplace category facet.

## `grader` (type: `string`):

Optional exact certification grader facet, such as PSA, BGS, or CGC.

## `setName` (type: `string`):

Optional exact public card-set facet.

## `sortBy` (type: `string`):

Public marketplace index to query.

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

Maximum number of sanitized marketplace records to emit.

## `maxPages` (type: `integer`):

Maximum number of public Algolia result pages to query.

## `timeoutSecs` (type: `integer`):

Bounded timeout for each public Courtyard request.

## `maxRetries` (type: `integer`):

Bounded retries for transient public HTTP failures. Access challenges are not retried.

## `includeDiagnostics` (type: `boolean`):

Emit explicit diagnostic rows for source failures and empty public results.

## `fixtureFile` (type: `string`):

Optional repository-local Algolia-style fixture for deterministic QA; the path must stay inside the Actor directory.

## Actor input object example

```json
{
  "searchQuery": "",
  "category": "",
  "grader": "",
  "setName": "",
  "sortBy": "recentlyListed",
  "maxItems": 10,
  "maxPages": 1,
  "timeoutSecs": 30,
  "maxRetries": 1,
  "includeDiagnostics": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

Default dataset of public card and listing data.

## `runSummary` (type: `string`):

Run status, source provenance, request counters, and normal/diagnostic row counts.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/courtyard-io-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/courtyard-io-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 '{}' |
apify call codingfrontend/courtyard-io-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codingfrontend/courtyard-io-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/UE9V1ONSZZvbiMudN/builds/9SQahAHYdKENhdt3V/openapi.json
