SWAPI Star Wars Scraper avatar

SWAPI Star Wars Scraper

Pricing

from $6.00 / 1,000 result items

Go to Apify Store
SWAPI Star Wars Scraper

SWAPI Star Wars Scraper

Collects Star Wars data from the open SWAPI by category and returns each record as a flat row. Supports people, planets, starships, vehicles, species, and films with optional reference resolution.

Pricing

from $6.00 / 1,000 result items

Rating

0.0

(0)

Developer

ParseForge

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

14 days ago

Last modified

Share

ParseForge

SWAPI Star Wars Scraper

Scrape the complete Star Wars universe from SWAPI, the open Star Wars API, and export every character, planet, starship, vehicle, species, and film in one run. Each record arrives as a flat, structured row with all its canonical fields. No API key or authentication needed. Export to CSV, JSON, Excel, or XML.

The Star Wars API (SWAPI) is the definitive open dataset for the Star Wars galaxy, but querying it page by page and resolving cross-referenced URLs takes custom scripting. This Actor reads every SWAPI category you select, paginates through all records up to your limit, and optionally resolves URL references to human-readable names so your dataset is self-contained. You get clean, flat rows ready for analysis, a data app, or a fan project.

Who uses itWhat they scrape SWAPI (The Star Wars API) for
Data journalistsAnalyze the structure and demographics of the Star Wars galaxy for a story or visualization.
Fan site buildersPopulate a Star Wars wiki, database, or character browser with canonical data.
Educators and studentsCreate datasets for teaching APIs, data wrangling, or relational data concepts with a familiar universe.
App developersSeed a Star Wars trivia app, chatbot, or game with structured reference data.

What it does

This Actor collects Star Wars data from SWAPI by category and returns each record as a flat row with all its canonical attributes.

  • ๐Ÿ“‚ Multi-category export: Pick any combination of people, planets, starships, vehicles, species, and films in one run.
  • ๐Ÿ”— Reference resolution: Turn homeworld, film, character, and other URL references into plain-text names so every row is self-contained.
  • ๐Ÿ“ Record capping: Set a maximum number of records to collect per run, from a single sample up to the full galaxy.
  • ๐Ÿ“„ Flat row output: Every SWAPI entity, regardless of its original nesting, is returned as a flat JSON object ready for CSV or table import.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with SWAPI (The Star Wars API) data

๐Ÿ“Š Build a Star Wars data dashboard.

A data journalist exports all people and planets, resolves homeworld names, and loads the flat file into a BI tool to chart character demographics by homeworld.

๐ŸŒ Populate a fan wiki or database.

A fan site developer runs the Actor weekly to refresh a searchable Starship and Vehicle database with the latest canonical fields from SWAPI.

๐ŸŽ“ Teach API concepts with a familiar dataset.

An instructor exports the Films and Species categories to create a ready-to-use dataset for a Python or SQL workshop on joins and data cleaning.

๐Ÿค– Seed a Star Wars trivia bot.

An app developer scrapes all People records with resolved film appearances to build a question bank for a voice-activated Star Wars quiz.

Why choose this scraper

What you get
No API key requiredSWAPI is open. This Actor reads it directly with no registration or authentication.
Self-contained recordsOptional reference resolution replaces URLs with names so you do not need to join data later.
All six categoriesPeople, planets, starships, vehicles, species, and films are available in a single run.
Flat, predictable schemaEvery record is a flat object with consistent keys, regardless of the original SWAPI nesting.

How it compares

No other Store actor targets SWAPI (The Star Wars API) the same way, so the honest comparison is with the alternatives teams actually weigh.

SWAPI Star Wars ScraperBuild it in-houseBy hand
SetupRun it now, zero configDays of engineeringNone, but hours per pull
When SWAPI (The Star Wars API) changesMaintained for youYou fix itYou re-learn the page
Proxies, retries, anti-botBuilt inYour problemBrowser only
OutputFixed JSON schema, CSV/Excel exportWhatever you buildCopy-paste
CostPay per resultEngineering timeAnalyst hours

Configure the run

Drive the Actor by selecting one or more SWAPI categories and optionally enabling reference resolution to enrich URL fields with names. The Input tab lists every parameter.

A first run with the defaults:

{
"categories": [
"people"
],
"maxItems": 10
}

A larger pull:

{
"categories": [
"people"
],
"maxItems": 200
}

Pricing

Pay-per-result: $0.008 per result collected. You pay only for the results written to your dataset.

Results collectedApproximate cost
100 results$0.80
1,000 results$8.00
10,000 results$80.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the SWAPI Star Wars Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to SWAPI (The Star Wars API) through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

$claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/swapi-star-wars-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting fewer records than I expected?

Check the 'Maximum records' setting in your input. The Actor stops collecting once it reaches that limit, even if more records exist in the selected categories.

Why are some fields still showing URLs instead of names?

Make sure the 'Resolve URL references to names' checkbox is enabled in the Advanced section of the input. If it is off, URL fields are returned as raw SWAPI links.

The run is taking a long time. Is that normal?

Reference resolution adds one extra request per URL field. If you selected all categories with resolution enabled, the Actor makes many requests. Disable resolution for a faster run, or reduce the maximum records limit.

Why do I see duplicate records?

The Actor does not deduplicate across categories. If a film appears in the films category and is also referenced elsewhere, it is only collected once per category selection. Check that you did not select overlapping inputs.

FAQ

QuestionAnswer
What is SWAPI?SWAPI, the Star Wars API, is a free and open REST API that provides structured data about the Star Wars universe, including characters, planets, starships, vehicles, species, and films. It is the world's first quantified and programmatically accessible Star Wars dataset.
Do I need an API key or authentication?No. SWAPI is completely open and requires no API key, token, or registration. This Actor reads the public endpoints directly.
What does reference resolution do?When enabled, the Actor follows every URL reference in a record (such as a character's homeworld or a film's characters) and replaces the URL with the target's name. This makes each row self-contained so you do not need to make follow-up requests.
Can I export multiple categories in one run?Yes. Select any combination of people, planets, starships, vehicles, species, and films in the input, and the Actor will collect and export all of them in a single run.
How many records can I collect?You set the maximum number of records per run, from 1 up to 1,000,000. The full SWAPI dataset contains 82 people, 60 planets, 36 starships, 39 vehicles, 37 species, and 6 films.
What output formats are supported?The Actor returns data in the Apify dataset format, which you can export to CSV, JSON, Excel, XML, or other formats from the Apify platform.
Does reference resolution slow down the run?It adds extra HTTP requests for each URL reference, so a run with resolution enabled will take longer. For the full dataset the difference is small, but it is noticeable on larger extractions.
Is the data flat or nested?Every record is returned as a flat object. Array fields like films or residents are kept as arrays, but each array element is a plain value or a resolved name, not a nested object.

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by SWAPI. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.