Back to top

API for Beit-Hatfutsot Databases

Welcome to the docs for the API server of the museum of the Jewish people.

Read this if you think the Jewish people haven’t suffered enough.

Item

Get Item/s

Get Item/s
GET/v1/item/{slugs}

Get specific items according to their slugs

Example URI

GET /v1/item/place_paris,person_1130;0.I3552
URI Parameters
HideShow
slugs
string (required) Example: place_paris,person_1130;0.I3552

Comma-separated list of slugs to fetch

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
        // list of item objects (see Item Models section for details)
        {
          "PlaceTypeDesc": {
            "En": "City",
            "He": "\u05e2\u05d9\u05e8"
          },
          // plain text, long article about this place (may contain newlines)
          "UnitText1": {
            "En": "",
            "He": ""
          },
          // the BHP item id
          "UnitId": 72312,
          // slug is comprised of "place_header"
          "Slug": {
            "En": "place_paris",
            "He": "\u05de\u05e7\u05d5\u05dd_\u05e4\u05e8\u05d9\u05e1"
          },
          // name of the place
          "Header": {
            "En": "PARIS",
            "He": "\u05e4\u05e8\u05d9\u05e1"
          }
        },
        {
          // the BHP item id
          "UnitId": 72312,
          // person slugs contain the tree number, version and person id (within that tree)
          // person slugs are the same for both english and hebrew
          "Slug": {
            "En": "person_1130%3B0.I3552",
            "He": "person_1130%3B0.I3552"
          },
          // name of the person - same value is in both english and hebrew
          "Header": {
            "En": "Moshe Fakeuser",
            "He": "Moshe Fakeuser"
          }
        }
    ]

Item Models

Every item represents an item in one of our collections.

Each item have some common properties and some unique properties depending on the collection.

Item

The base item, includes attributes common to all collections.

  • Model (application/json)

    {
            // every item gets a unique slug which identifies the item
            "Slug": {
              "En": "UNIQUE_ITEM_SLUG_IN_ENGLISH",
              "He": "UNIQUE_ITEM_SLUG_IN_HEBREW"
            },
            // every item has a header title / text, the value depends on the item
            // for example - for place, it will be the name of the place, for person - the name of the person etc..
            "Header": {
              "En": "ENGLISH_HEADER",
              "He": "HEBREW_HEADER"
            }
          }

Place

Extends the base item with place specific attributes

  • Model (application/json)

    {
            "PlaceTypeDesc": {
              "En": "City",
              "He": "\u05e2\u05d9\u05e8"
            },
            // plain text, long article about this place (may contain newlines)
            "UnitText1": {
              "En": "",
              "He": ""
            },
            // the BHP item id
            "UnitId": 72312,
            // slug is comprised of "place_header"
            "Slug": {
              "En": "place_paris",
              "He": "\u05de\u05e7\u05d5\u05dd_\u05e4\u05e8\u05d9\u05e1"
            },
            // name of the place
            "Header": {
              "En": "PARIS",
              "He": "\u05e4\u05e8\u05d9\u05e1"
            }
          }

Person

Extends the base item with person specific attributes

  • Model (application/json)

    {
            // the BHP item id
            "UnitId": 72312,
            // person slugs contain the tree number, version and person id (within that tree)
            // person slugs are the same for both english and hebrew
            "Slug": {
              "En": "person_1130%3B0.I3552",
              "He": "person_1130%3B0.I3552"
            },
            // name of the person - same value is in both english and hebrew
            "Header": {
              "En": "Moshe Fakeuser",
              "He": "Moshe Fakeuser"
            }
          }

Suggest

General suggestions

General suggestions
GET/v1/suggest/*/{input}

Get suggestion of BH DBS titles in which the first characters match the user’s search input. The API returns only suggestions that “Start with” the typed input, though it also includes empty “phonetic” and “contains” fields, which are currently inactive. In this View, the API suggests completion of a query from all databases (Places, Personalities, PhotoUnits, FamilyNames, Persons and Movies).

Example URI

GET /v1/suggest/*/li
URI Parameters
HideShow
input
string (required) Example: li

Must be more than one character.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "phonetic": {
    "personalities": [],
    "places": [],
    "persons": [],
    "movies": [],
    "photoUnits": [],
    "familyNames": []
  },
  "contains": {},
  "starts_with": {
    "personalities": [
      "Liberman, David",
      "Lichtblau, Leon ",
      "Lichtenstadt, Avraham Aharon ",
      "Lichtenstein, Hillel Ben Barukh",
      "Liebermann, Max",
      "Liebermann, Rolf",
      "Lieberson, Goddard"
    ],
    "places": [
      "Lichtenfels",
      "Lida, Belorussia",
      "Liepaja",
      "Liezere",
      "Ligatne",
      "Ligumai",
      "Lille"
    ],
    "persons": [
      " Libicki",
      " Lia",
      " Lia",
      " Liba",
      "?Li?S Feldman",
      "Li Ben Simol",
      "Li Berman"
    ],
    "movies": [
      " Living Moments In Jewish Spain (Hebrew)",
      "Lita- Clip",
      "Living Moments In Jewish Spain (Spanish)",
      "Living Moments In Jewish Spain (English)"
    ],
    "photoUnits": [
      "\"Libraries Are Culture'S Armies\". Caricature, New York, 1900-20",
      "\"Lid Un Ballade\" By Itzik Manger, New York 1952",
      "Liath And Her Friend Are Crying, Givat Washington, Israel, 1985",
      "Liba Beila Samsonov. Tartu, Estonia, 1894",
      "Libe-Haviva Winokur And Friends, Poland, Late  1920S",
      "Libe-Haviva Winokur And Friends, Poland, Late  1920S",
      "Libe-Haviva Winokur And Friends, Korycin, Poland, Late 1920S\r\n"
    ],
    "familyNames": [
      "Libenson",
      "Liber",
      "Liberati",
      "Liberati",
      "Liberbaum",
      "Liberman",
      "Libermanas"
    ]
  }
}

Suggest by specific collection

Suggest by specific collection
GET/v1/suggest/{collection}/{input}

Get suggestion of any DB collection titles in which the first characters match the user’s search input. The API returns only suggestions that “Start with” the typed input, though it also includes empty “phonetic” and “contains” fields, which are currently inactive.

Example URI

GET /v1/suggest/places/pr
URI Parameters
HideShow
input
string (required) Example: pr

Must be more than one character.

collection
string (required) Example: places

Choices: places photoUnits familyNames personalities persons movies

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "phonetic": [],
  "contains": [],
  "starts_with": [
    "Praszka",
    "Preili",
    "Presov",
    "Pretoria",
    "Preveza",
    "Priekule",
    "Prienai"
  ]
}

Linkify

Linkify

Linkify
POST/v1/linkify

Given a block of html (or any unicode text) - returns a list of item titles and urls which appear in the text.

should send a standard form-urlencoded POST request containing parameter of html with value of the block of text to linkify

Example URI

POST /v1/linkify
Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
html=the_html_to_linkify
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "familyNames": [
    {
      "url": "http://dbs.bh.org.il/familyname/deri",
      "title": "DER'I"
    }
  ],
  "personalities": [
    {
      "url": "http://dbs.bh.org.il/luminary/davydov-karl-yulyevich",
      "title": "Davydov, Karl Yulyevich"
    }
  ],
  "places": [
    {
      "url": "http://dbs.bh.org.il/place/bourges",
      "title": "BOURGES"
    },
    {
      "url": "http://dbs.bh.org.il/place/bozzolo",
      "title": "BOZZOLO"
    }
  ]
}

Generated by aglio on 20 Jun 2017