search

Search the National Library's catalog - books, newspapers, journals, photos, maps, music, manuscripts, radio/TV and more, both physical and digitized. Digitized text (OCR) is matched too by default, so a query can surface newspaper or book pages that mention a term even when it's not in the title.

Signature: search(q: string, required; media_type: string, optional, default None; language: string, optional, default None; county: string, optional, default None; year_from: integer, optional, default None; year_to: integer, optional, default None; digital_only: yes/no, optional, default False; sort: string, optional, default None; page: integer, optional, default 0; size: integer, optional, default 10; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)

Direct GET

For navigating agents: open the HTML page with parameters in the URL. The result is fetched and displayed without screenshots or form filling.

Open this validated HTML GET URL

https://allemannsdata.com/wiki/kilder/nasjonalbiblioteket/search/?q={q}&media_type={media_type}&language={language}&county={county}&year_from={year_from}&year_to={year_to}&digital_only=false&sort={sort}&page=0&size=10&limit=25&offset=0

Replace {q}, {media_type}, {language}, {county}, {year_from}, {year_to}, {digital_only}, {sort}, {page}, {size} with values. Remove unused optional parameters from the URL.

For software and dashboards: Read the operation descriptor. The JSON GET template is https://allemannsdata.com/wiki/api/v1/kilder/nasjonalbiblioteket/search?q={q}&media_type={media_type}&language={language}&county={county}&year_from={year_from}&year_to={year_to}&digital_only=false&sort={sort}&page=0&size=10&limit=25&offset=0. Open this exact request as JSON.

ParameterRequirementJSON typeDescription
qrequiredstringFree-text query. Supports field-restricted terms too, e.g. "subject:fiske year:1970" combined with free text.
media_typeoptionalunionRestrict to one type, e.g. aviser (newspapers), bøker (books), tidsskrift (journals), bilder (photos), musikk, kart (maps), film, plakater (posters), noter (sheet music), radio, fjernsyn. See get_aggregations(q="*", group_by="mediatype") for the full list with counts.
languageoptionalunionLanguage filter - values are inconsistent in the catalog (mixes codes like "nob" and labels like "Norsk bokmål"); check get_aggregations(q=q, group_by="languages") first if unsure.
countyoptionalunionNorwegian county name, e.g. "Troms", "Oslo".
year_fromoptionalunionRestrict to items published/issued in this year range (inclusive).
year_tooptionalunionRestrict to items published/issued in this year range (inclusive).
digital_onlyoptionalbooleanOnly items that have been digitized.
sortoptionalunionOne of date, title, otherid, firstDigitalContentTime, optionally suffixed ",desc" (default: relevance).
pageoptionalintegerZero-based page index.
sizeoptionalintegerResults per page, 1 to 100 (default 10).
limitoptionalintegerGateway page size; default 25, maximum 100.
offsetoptionalintegerNumber of list items to skip; default 0.
Generated JavaScript, Python and response structure

Use JSON when the user requests code, machine-readable data, value extraction or further computation. Use the HTML GET page to identify the correct source and verify parameters.

Example for generated JavaScript and Python

https://allemannsdata.com/wiki/api/v1/kilder/nasjonalbiblioteket/search?q={q}&media_type={media_type}&language={language}&county={county}&year_from={year_from}&year_to={year_to}&digital_only=false&sort={sort}&page=0&size=10&limit=25&offset=0

Replace URL placeholders and remove unused optional parameters.

JavaScript in a dashboard

const url = "https://allemannsdata.com/wiki/api/v1/kilder/nasjonalbiblioteket/search?q={q}&media_type={media_type}&language={language}&county={county}&year_from={year_from}&year_to={year_to}&digital_only=false&sort={sort}&page=0&size=10&limit=25&offset=0";
const response = await fetch(url);
if (!response.ok) {
  const failure = await response.json();
  throw new Error(`${failure.error.code}: ${failure.error.message} ${failure.suggestion}`);
}
const result = await response.json();
const data = result.data;

Python without additional packages

import json
from urllib.request import urlopen

url = "https://allemannsdata.com/wiki/api/v1/kilder/nasjonalbiblioteket/search?q={q}&media_type={media_type}&language={language}&county={county}&year_from={year_from}&year_to={year_to}&digital_only=false&sort={sort}&page=0&size=10&limit=25&offset=0"
with urlopen(url) as response:
    result = json.load(response)
data = result["data"]

Response structure

{
  "source": "nasjonalbiblioteket",
  "operation": "search",
  "parameters": {},
  "data": {},
  "entities": [],
  "_meta": {"retrieved_at": "...", "sources": [], "cache": {}},
  "_links": {"self": "...", "source": "...", "wiki": "...", "feedback": "..."}
}
Form for manual use

The form is a fallback for people and browser agents that cannot open the GET URL directly.

Type: string. Free-text query. Supports field-restricted terms too, e.g. "subject:fiske year:1970" combined with free text.
Type: string. Restrict to one type, e.g. aviser (newspapers), bøker (books), tidsskrift (journals), bilder (photos), musikk, kart (maps), film, plakater (posters), noter (sheet music), radio, fjernsyn. See get_aggregations(q="*", group_by="mediatype") for the full list with counts.
Type: string. Language filter - values are inconsistent in the catalog (mixes codes like "nob" and labels like "Norsk bokmål"); check get_aggregations(q=q, group_by="languages") first if unsure.
Type: string. Norwegian county name, e.g. "Troms", "Oslo".
Type: integer. Restrict to items published/issued in this year range (inclusive).
Type: integer. Restrict to items published/issued in this year range (inclusive).
Type: yes/no. Only items that have been digitized.
Type: string. One of date, title, otherid, firstDigitalContentTime, optionally suffixed ",desc" (default: relevance).
Type: integer. Zero-based page index.
Type: integer. Results per page, 1 to 100 (default 10).

Result

Source: National Library of Norway. Retrieved 2026-09-24T23:42:58Z in 0.253 seconds.

total:
9
page:
0
size:
10
items:

9 results

  1. id:
    97afee8ccf743973f88a087ff2ad597a
    urn:
    URN:NBN:no-nb_digavis_marsteinen_null_null_20251106_48_42_1
    title:
    Marsteinen
    creators:
    not reported by source
    year:
    20251106
    publisher:
    not reported by source
    media_types:

    1 results

    1. aviser
    languages:

    1 results

    1. Norsk bokmål
    county:
    Vestland
    digital:
    yes
    public_domain:
    no
    license:
    copyrighted
    viewability:
    NONE
    access_allowed_from:
    NB
    thumbnail:
    https://www.nb.no/services/image/resolver/URN:NBN:no-nb_digavis_marsteinen_null_null_20251106_48_42_1-1_001_hovedavis/full/0,128/0/native.jpg
    viewer_url:
    https://www.nb.no/items/97afee8ccf743973f88a087ff2ad597a
  2. id:
    39b3b16d819eb36f6d739055e570a709
    urn:
    URN:NBN:no-nb_digavis_bergensavisen_null_null_20161220_0_345_1
    title:
    Bergensavisen
    creators:
    not reported by source
    year:
    20161220
    publisher:
    not reported by source
    media_types:

    1 results

    1. aviser
    languages:

    1 results

    1. Norsk bokmål
    county:
    Vestland
    digital:
    yes
    public_domain:
    no
    license:
    copyrighted
    viewability:
    NONE
    access_allowed_from:
    LIBRARY
    thumbnail:
    https://www.nb.no/services/image/resolver/URN:NBN:no-nb_digavis_bergensavisen_null_null_20161220_0_345_1-1_01_seksjonsnavn/full/0,128/0/native.jpg
    viewer_url:
    https://www.nb.no/items/39b3b16d819eb36f6d739055e570a709
  3. id:
    609a869079889e499811a0f9a76e5120
    urn:
    URN:NBN:no-nb_digavis_bergensavisen_null_null_20170123_0_23_1
    title:
    Bergensavisen
    creators:
    not reported by source
    year:
    20170123
    publisher:
    not reported by source
    media_types:

    1 results

    1. aviser
    languages:

    1 results

    1. Norsk bokmål
    county:
    Vestland
    digital:
    yes
    public_domain:
    no
    license:
    copyrighted
    viewability:
    NONE
    access_allowed_from:
    LIBRARY
    thumbnail:
    https://www.nb.no/services/image/resolver/URN:NBN:no-nb_digavis_bergensavisen_null_null_20170123_0_23_1-1_01_seksjonsnavn/full/0,128/0/native.jpg
    viewer_url:
    https://www.nb.no/items/609a869079889e499811a0f9a76e5120
  4. id:
    3fdf7c69e9b1837f37ecd767a7db20f3
    urn:
    URN:NBN:no-nb_digavis_bergensavisen_null_null_20161212_0_337_1
    title:
    Bergensavisen
    creators:
    not reported by source
    year:
    20161212
    publisher:
    not reported by source
    media_types:

    1 results

    1. aviser
    languages:

    1 results

    1. Norsk bokmål
    county:
    Vestland
    digital:
    yes
    public_domain:
    no
    license:
    copyrighted
    viewability:
    NONE
    access_allowed_from:
    LIBRARY
    thumbnail:
    https://www.nb.no/services/image/resolver/URN:NBN:no-nb_digavis_bergensavisen_null_null_20161212_0_337_1-1_01_seksjonsnavn/full/0,128/0/native.jpg
    viewer_url:
    https://www.nb.no/items/3fdf7c69e9b1837f37ecd767a7db20f3
  5. id:
    fee1e406c4dcb1165039f69e4566c525
    urn:
    URN:NBN:no-nb_digavis_bergensavisen_null_null_20170130_0_30_1
    title:
    Bergensavisen
    creators:
    not reported by source
    year:
    20170130
    publisher:
    not reported by source
    media_types:

    1 results

    1. aviser
    languages:

    1 results

    1. Norsk bokmål
    county:
    Vestland
    digital:
    yes
    public_domain:
    no
    license:
    copyrighted
    viewability:
    NONE
    access_allowed_from:
    LIBRARY
    thumbnail:
    https://www.nb.no/services/image/resolver/URN:NBN:no-nb_digavis_bergensavisen_null_null_20170130_0_30_1-1_01_seksjonsnavn/full/0,128/0/native.jpg
    viewer_url:
    https://www.nb.no/items/fee1e406c4dcb1165039f69e4566c525
  6. id:
    6aa335b5cd2afed893788e6dfbe92395
    urn:
    URN:NBN:no-nb_digavis_bergensavisen_null_null_20170114_0_14_1
    title:
    Bergensavisen
    creators:
    not reported by source
    year:
    20170114
    publisher:
    not reported by source
    media_types:

    1 results

    1. aviser
    languages:

    1 results

    1. Norsk bokmål
    county:
    Vestland
    digital:
    yes
    public_domain:
    no
    license:
    copyrighted
    viewability:
    NONE
    access_allowed_from:
    LIBRARY
    thumbnail:
    https://www.nb.no/services/image/resolver/URN:NBN:no-nb_digavis_bergensavisen_null_null_20170114_0_14_1-1_01_seksjonsnavn/full/0,128/0/native.jpg
    viewer_url:
    https://www.nb.no/items/6aa335b5cd2afed893788e6dfbe92395
  7. id:
    8fe34213b70d2660d6c9fcd8c55ace7e
    urn:
    URN:NBN:no-nb_digavis_smaalenenesavis_null_null_20260312_127_30_1
    title:
    Smaalenenes Avis
    creators:
    not reported by source
    year:
    20260312
    publisher:
    not reported by source
    media_types:

    1 results

    1. aviser
    languages:

    1 results

    1. Norsk bokmål
    county:
    Østfold
    digital:
    yes
    public_domain:
    no
    license:
    copyrighted
    viewability:
    NONE
    access_allowed_from:
    LIBRARY
    thumbnail:
    https://www.nb.no/services/image/resolver/URN:NBN:no-nb_digavis_smaalenenesavis_null_null_20260312_127_30_1-1_001_hovedavis/full/0,128/0/native.jpg
    viewer_url:
    https://www.nb.no/items/8fe34213b70d2660d6c9fcd8c55ace7e
  8. id:
    effac534aadb38f0a849644c5c705f7c
    urn:
    URN:NBN:no-nb_digavis_bergensavisen_null_null_20180628_0_171_1
    title:
    Bergensavisen
    creators:
    not reported by source
    year:
    20180628
    publisher:
    not reported by source
    media_types:

    1 results

    1. aviser
    languages:

    1 results

    1. Norsk bokmål
    county:
    Vestland
    digital:
    yes
    public_domain:
    no
    license:
    copyrighted
    viewability:
    NONE
    access_allowed_from:
    LIBRARY
    thumbnail:
    https://www.nb.no/services/image/resolver/URN:NBN:no-nb_digavis_bergensavisen_null_null_20180628_0_171_1-1_001_hovedavis/full/0,128/0/native.jpg
    viewer_url:
    https://www.nb.no/items/effac534aadb38f0a849644c5c705f7c
  9. id:
    1874c2a42ba5b8daf05a097963dca5a2
    urn:
    URN:NBN:no-nb_digavis_bergensavisen_null_null_20231013_0_277_1
    title:
    Bergensavisen
    creators:
    not reported by source
    year:
    20231013
    publisher:
    not reported by source
    media_types:

    1 results

    1. aviser
    languages:

    1 results

    1. Norsk bokmål
    county:
    Vestland
    digital:
    yes
    public_domain:
    no
    license:
    copyrighted
    viewability:
    NONE
    access_allowed_from:
    LIBRARY
    thumbnail:
    https://www.nb.no/services/image/resolver/URN:NBN:no-nb_digavis_bergensavisen_null_null_20231013_0_277_1-1_001_hovedavis/full/0,128/0/native.jpg
    viewer_url:
    https://www.nb.no/items/1874c2a42ba5b8daf05a097963dca5a2
limit:
25
offset:
0
returned:
9
has_more_results:
no
truncated:
no
Will you use the result in generated code?

Open the same result as JSON

Is data missing or incorrect? Send feedback about this result.

Continue exploring

How an AI agent should use this page

Ground rule: Navigate with HTML GET links to keep explanations and relationships. Use the page's JSON alternative only when concrete values must be extracted, compared or computed.

How to use the search lookup

  1. Replace the placeholders in the HTML GET template; remove optional parameters you do not need.
  2. Check types, units, limits and ID formats in the parameter table.
  3. Follow linked results to canonical pages before combining sources.

Misreading to avoid: An empty list means "no results for this lookup". An error message or unavailable source does not mean the data does not exist.

Source-specific next step

Go to the source page for other operations. Use the JSON template only after the HTML result shows that the parameters and source are correct.