Skip to content
bkmark.it
Docs menu

API reference

Import and export

Bring a library in from a browser, Pocket or Raindrop file, and take it all out again.

post /v1/import

Import a bookmarks file. It is stored and parsed by a job (202); progress over SSE and GET /v1/import/:id. dryRun stops at `analyzed` with what would happen. One import at a time (409).

Key or token with bookmarks:write Returns 202

Body

Body fields
NameTypeDescription
formatrequiredenumOne of netscape, pocket, raindrop, bkmark.
datarequiredstring1–10,000,000 characters.
dryRunbooleanDefault false.

Example

curl -X POST 'https://api.bkmark.it/v1/import' \
  -H "Authorization: Bearer $BKMARK_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"format":"netscape","data":"text"}'
Response fields (9)
Response fields
NameTypeDescription
importIdrequireduuid
statusrequiredenumOne of queued, running, analyzed, completed, failed.
totalrequiredinteger-9007199254740991–9007199254740991.
processedrequiredinteger-9007199254740991–9007199254740991.
importedrequiredinteger-9007199254740991–9007199254740991.
duplicatesrequiredinteger-9007199254740991–9007199254740991.
invalidrequiredinteger-9007199254740991–9007199254740991.
analysisrequiredobject or null
totalrequiredinteger-9007199254740991–9007199254740991.
newrequiredinteger-9007199254740991–9007199254740991.
duplicatesrequiredinteger-9007199254740991–9007199254740991.
invalidrequiredinteger-9007199254740991–9007199254740991.
newCollectionsrequiredstring[]
tagsrequiredinteger-9007199254740991–9007199254740991.
errorrequiredstring or null

post /v1/import/{id}/start

Import the file of an analyzed dry run.

Key or token with bookmarks:write Returns 202

Parameters

Parameters
NameTypeDescription
idrequireduuidIn the path.

Example

curl -X POST 'https://api.bkmark.it/v1/import/0c9d3a52-6f1e-4b8a-9d2f-5e7a1b3c4d6e/start' \
  -H "Authorization: Bearer $BKMARK_TOKEN"
Response fields (9)
Response fields
NameTypeDescription
importIdrequireduuid
statusrequiredenumOne of queued, running, analyzed, completed, failed.
totalrequiredinteger-9007199254740991–9007199254740991.
processedrequiredinteger-9007199254740991–9007199254740991.
importedrequiredinteger-9007199254740991–9007199254740991.
duplicatesrequiredinteger-9007199254740991–9007199254740991.
invalidrequiredinteger-9007199254740991–9007199254740991.
analysisrequiredobject or null
totalrequiredinteger-9007199254740991–9007199254740991.
newrequiredinteger-9007199254740991–9007199254740991.
duplicatesrequiredinteger-9007199254740991–9007199254740991.
invalidrequiredinteger-9007199254740991–9007199254740991.
newCollectionsrequiredstring[]
tagsrequiredinteger-9007199254740991–9007199254740991.
errorrequiredstring or null

get /v1/import/{id}

Progress of an import you started.

Key or token with bookmarks:read Returns 200

Parameters

Parameters
NameTypeDescription
idrequireduuidIn the path.

Example

curl 'https://api.bkmark.it/v1/import/0c9d3a52-6f1e-4b8a-9d2f-5e7a1b3c4d6e' \
  -H "Authorization: Bearer $BKMARK_TOKEN"
Response fields (9)
Response fields
NameTypeDescription
importIdrequireduuid
statusrequiredenumOne of queued, running, analyzed, completed, failed.
totalrequiredinteger-9007199254740991–9007199254740991.
processedrequiredinteger-9007199254740991–9007199254740991.
importedrequiredinteger-9007199254740991–9007199254740991.
duplicatesrequiredinteger-9007199254740991–9007199254740991.
invalidrequiredinteger-9007199254740991–9007199254740991.
analysisrequiredobject or null
totalrequiredinteger-9007199254740991–9007199254740991.
newrequiredinteger-9007199254740991–9007199254740991.
duplicatesrequiredinteger-9007199254740991–9007199254740991.
invalidrequiredinteger-9007199254740991–9007199254740991.
newCollectionsrequiredstring[]
tagsrequiredinteger-9007199254740991–9007199254740991.
errorrequiredstring or null

get /v1/export

Download the library as bkmark JSON (with highlights and notes when the caller has highlights:read), browser HTML or CSV.

Key or token with bookmarks:read Returns 200

Parameters

Parameters
NameTypeDescription
formatenumOne of json, html, csv. Default "json".

Example

curl 'https://api.bkmark.it/v1/export' \
  -H "Authorization: Bearer $BKMARK_TOKEN"