ScrapeThisSite APIscrapethissite.com ↗
Retrieve all 250 countries from ScrapeThisSite with name, capital, population, and area in km². Filter by name substring, page with limit/offset.
What is the ScrapeThisSite API?
The ScrapeThisSite Countries API exposes one endpoint — list_countries — that returns up to 250 country records from the public Countries of the World listing. Each record includes the country name, capital city, population as an integer, and land area in square kilometres. An optional name filter and limit/offset pagination let you slice the dataset without making multiple round trips.
curl -X GET 'https://api.parse.bot/scraper/15a584a3-8d15-4f64-9864-fc067a8882b0/list_countries?name=united' \ -H 'X-API-Key: $PARSE_API_KEY'
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 scrapethissite-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.
"""Walkthrough: Countries of the World — browse, filter, and inspect."""
from parse_apis.scrapethissite_com_api import ScrapethissiteCom, InputFormatInvalid
client = ScrapethissiteCom()
# List all countries, capped at 10 total items.
for country in client.countries.list(limit=10):
print(country.name, country.capital, f"pop={country.population}, area={country.area_km2} km²")
# Filter by name substring and grab the first match.
hit = client.countries.list(name="united", limit=1).first()
if hit is not None:
print(f"{hit.name} — capital: {hit.capital}, population: {hit.population}")
# Demonstrate typed-error handling for invalid input.
try:
bad = client.countries.list(offset="abc", limit=5) # type: ignore[arg-type]
bad.first()
except InputFormatInvalid as e:
print(f"Caught expected error: {e.message}")
print("exercised: countries.list (all + filtered + error handling)")
Returns countries from the public listing, one record per country with name, capital, population (integer) and area_km2 (number, square kilometres). The whole listing (250 countries) is fetched in one round trip and filtered/paged locally, so every call costs the same. Optional case-insensitive substring filter on the country name; a filter that matches nothing returns an empty countries array with status success. Paging is controlled by limit (default 5, clamped to 250) and offset (default 0); has_more is true when further records exist past offset+count within the matched set. matched_total is the number of countries matching the filter; site_total is the total number of countries on the site. Non-integer limit/offset return a stale_input error. Records are returned in the site's own order.
| Param | Type | Description |
|---|---|---|
| name | string | Case-insensitive substring to match against the country name (e.g. 'united' matches 'United Kingdom'). Omitted = all countries. |
| limit | integer | Maximum number of countries to return; values above 250 are clamped to 250. |
| offset | integer | Number of matched countries to skip before returning results. |
{
"type": "object",
"fields": {
"count": "number of records in this response",
"limit": "limit applied after clamping",
"offset": "offset applied",
"has_more": "true when more matched records exist beyond this page",
"countries": "array of country records: name, capital, population (integer), area_km2 (number, square kilometres)",
"site_total": "total number of countries on the site listing",
"matched_total": "number of countries matching the name filter (all countries when no filter)"
},
"sample": {
"data": {
"count": 3,
"limit": 10,
"offset": 0,
"has_more": false,
"countries": [
{
"name": "United Arab Emirates",
"capital": "Abu Dhabi",
"area_km2": 82880,
"population": 4975593
},
{
"name": "United Kingdom",
"capital": "London",
"area_km2": 244820,
"population": 62348447
},
{
"name": "United States",
"capital": "Washington",
"area_km2": 9629091,
"population": 310232863
}
],
"site_total": 250,
"matched_total": 3
},
"status": "success"
}
}About the ScrapeThisSite API
What the API Returns
The single list_countries endpoint returns the full 250-country dataset from ScrapeThisSite's Countries of the World page. Each record in the countries array contains four fields: name (string), capital (string), population (integer), and area_km2 (float, square kilometres). The response envelope also includes count, limit, offset, has_more, site_total, and matched_total so you can drive pagination without guessing.
Filtering and Pagination
The name parameter accepts a case-insensitive substring, so passing united matches United Kingdom, United States, and United Arab Emirates in one call. The limit parameter caps the number of records returned and is silently clamped to 250 if you pass a higher value. offset skips that many matched records before returning results. Together, has_more and matched_total give you everything needed to build a paginated loop. All 250 countries are fetched per call regardless of filter, so a filtered request costs the same as an unfiltered one.
Data Coverage
The source listing covers 250 countries with consistent fields across all records. Population figures are integers and area values are decimal numbers in km². The dataset is well-suited for geography reference lookups, seeding test fixtures, or validating country lists in application code. There are no missing capitals or null population values in the published listing.
The ScrapeThisSite API is a managed, monitored endpoint for scrapethissite.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when scrapethissite.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 scrapethissite.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?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Seed a test database with 250 real country names, capitals, and population figures.
- Validate that a country-selector dropdown in a web form contains accurate names.
- Filter countries by name substring to build a fast autocomplete backend.
- Rank countries by population or area_km2 for a data visualisation project.
- Cross-reference capital city names against another geographic dataset.
- Generate geography quiz questions using name, capital, and population fields.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does ScrapeThisSite have an official developer API?+
What does the name filter actually match against?+
name parameter performs a case-insensitive substring match against the country name field only. Passing 'stan' returns Afghanistan, Kazakhstan, Pakistan, and any other country whose name contains that string. It does not match against capital city names.