Datasette JSON Extractor
Pricing
from $0.35 / 1,000 record extracteds
Datasette JSON Extractor
Point at ANY Datasette instance and pull structured data via its uniform JSON API. Discover every database + table, page a table's rows into a clean dataset, or run a read-only SQL query. Works on any datasette publish site with no per-site scraper. Pay per record.
Pricing
from $0.35 / 1,000 record extracteds
Rating
0.0
(0)
Developer
Datamule
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
6 days ago
Last modified
Categories
Share
Extract a bounded dataset from any public or authorized Datasette instance: discover databases and tables, page table rows, or run a read-only SQL query through Datasette's JSON API.
Try it now
Run this exact input against Datasette's public reference instance. It reads at most 25 genuine rows from a table with a compound primary key.
{"baseUrl":"https://latest.datasette.io","database":"fixtures","table":"compound_three_primary_keys","listDatabasesOnly":false,"maxRecords":25,"pageSize":25}
Example output
The first genuine source row is:
{"content":"a-a-a","pk1":"a","pk2":"a","pk3":"a"}
The Actor preserves its source identity, spreads the table columns, builds the compound key, and keeps the original row losslessly in raw:
{"_source": "https://latest.datasette.io","_database": "fixtures","_table": "compound_three_primary_keys","_mode": "row","_rowIndex": 0,"primaryKey": "a,a,a","pk1": "a","pk2": "a","pk3": "a","content": "a-a-a","raw": {"content":"a-a-a","pk1":"a","pk2":"a","pk3":"a"}}
Pricing
The active pay-per-event price is $0.0005 per record. A record is one emitted table in discovery mode or one emitted row in rows/SQL mode. The try-now input can emit no more than 25 records, so its event-charge ceiling is 25 × $0.0005 = $0.0125. This ceiling excludes Apify infrastructure usage.
Your run's maximum cost is respected. The Actor checks the budget before it contacts the Datasette instance and before each page. When the next record would go over the limit, it stops and keeps what was already delivered. You are only charged for records that land in your dataset.
Inputs and modes
The mode is selected from the input:
- Discovery: omit
tableandsqlto emit one record per database/table pair. - Rows: set
databaseandtableto page that table until it ends ormaxRecordsis reached. - SQL: set
sqlto use Datasette's read-only SQL API. SQL takes precedence overtable.
| Field | Description |
|---|---|
baseUrl (required) | Datasette instance root, such as https://latest.datasette.io. Do not include /-/databases.json. Path-mounted instances work, and the Actor can recover the root when given a database or table URL. |
database | Database name. Leave empty for discovery; rows/SQL mode can infer it only when the instance exposes one non-memory database. |
table | Exact table or view name. Setting it selects rows mode. |
sql | Optional read-only SQL query; takes precedence over table. |
listDatabasesOnly | Discovery switch. The default is false; discovery is still selected when both table and sql are empty. |
maxRecords | Total output cap across every mode. Default: 25. Minimum: 1. |
pageSize | Rows requested per page in rows mode. Default: 25; maximum: 1000; the source server may impose a lower cap. |
bearerToken | Optional bearer token for an authorized private instance. It is never logged. |
extraHeaders | Optional JSON object of request headers, such as an API-gateway key. Header values are never logged. |
Output field dictionary
| Field | Meaning |
|---|---|
_source | Resolved Datasette instance root used for the request. |
_database | Source database name. |
_table | Source table/view name, or null for SQL output. |
_mode | table for discovery, row for table rows, or sql for query results. |
_rowIndex | Zero-based emitted-row index for rows/SQL output; null in discovery. |
primaryKey | Comma-joined declared primary-key values when available. |
raw | Lossless original source object. |
databaseName, tableName | Discovery identity fields. |
rowCount, columns, primaryKeys, isView | Discovery metadata reported by Datasette. |
tableUrl, databaseUrl | Direct source links on discovery records. |
| Source columns | Rows/SQL fields are also spread to top-level keys. A collision with an Actor-managed key is renamed with a field_ prefix. |
Recurring agent use cases
- Let a research agent collect a small repeatable slice of a public Datasette table for comparison or monitoring.
- Let a coding or data agent discover databases, table names, columns, and keys before choosing an extraction target.
- Feed civic, archival, or research workflows with bounded rows from deployments that expose the standard Datasette API.
- Query an owned Datasette deployment from a personal agent by supplying its authorized bearer token or gateway headers.
Coverage, freshness, and limits
- The Actor targets standard Datasette JSON endpoints. It does not parse arbitrary websites or bypass a deployment's authentication and authorization rules.
- Data is fetched at run time and is only as fresh and complete as the upstream Datasette instance. The Actor does not maintain its own snapshot or cache.
- Cursor paging is not a transactional snapshot: rows can change if the upstream table is modified during a run.
maxRecordsbounds emitted and billable records. Datasette may apply its own page-size, query, timeout, visibility, or SQL restrictions.- Empty source tables and zero-row SQL results produce zero records; the Actor does not fabricate fallback data.
- Use only instances and data you are authorized to access, and follow the source's terms and applicable data rules.
Troubleshooting
- Bad root URL /
/-/databases.jsonnot found: provide the instance root, not the JSON endpoint. For a path-mounted deployment, include its mount prefix. The Actor can strip a pasted database/table suffix, but it cannot infer an unrelated proxy path. - HTML or non-JSON response: the URL is probably a website page, sign-in page, or proxy error rather than a Datasette JSON root. Open
<baseUrl>/-/databases.jsonand confirm it returns JSON. - 401 or 403 authentication error: supply an authorized
bearerTokenor the requiredextraHeaders. The Actor does not obtain credentials or bypass access controls. - Database missing: run discovery first and copy the exact database name. On multi-database instances, rows and SQL modes require an explicit
database. - Table missing: copy the exact table/view name from discovery, including spaces and punctuation, and verify it belongs to the selected database.
- Empty results: confirm that the table has rows or that the SQL filter matches data. A valid empty response exits cleanly with zero output records.
- SQL error: verify the selected database, table and column names, and use SQL supported by that deployment. Some instances restrict or disable custom SQL; the source error is surfaced rather than replaced with data.


