Common Response Fields

The following parameters are applicable for all requests that return a list of results:

Response Field Type Description
count String The total numer of contributions.
limit String The number of contributions returned on each page.
pages String The total number of pages.
page String The current page.  The index of the first page is 1.

 

metadata

 

Object

 

If metadata=1 is passed, metadata will be returned about the list of results, including options for sorting and narrowing the result set.

sort_bys Object[] Options for sorting the result set.
id String The sort by ID.
name String The user-friendly sort name.
link String A link to the result set sorted by this sort_by.
narrow_bys Object[] Options for narrowing the result set.
id String The narrow by ID.
name String The user-friendly name of this narrow_by.
narrow_tos Object[] Options for narrowing the result set to.
id String The narrow to ID.
name String The user-friendly name of the narrow to.
count Integer The number of results that would be returned by this narrow to.
link String A link to the result set narrowed to this narrow_to.

Example Request

GET https://api.bibliocommons.com/v1/titles?library=examplepl&q=Harry+Potter&sort=title&title_format=BK&metadata=1&api_key={key}

Response:

{
  "count": 77,
  "limit": 10,
  "pages": 8,
  "page": 1,
  "titles": [
    {
      "id": "533266333", 
      "title": "All about J.K. Rowling",
      "format": {
        "id": "BK",
        "name": "Book"
      },
      "details_url": "http://examplepl.bibliocommons.com/item/show/533266333",
      /* ... */
    },
    /* ... */
  ],
  "metadata": {
    "sort_bys": [
      {
        "id": "title",
        "name": "Title",
        "link": "https://api.bibliocommons.com/v1/titles?library=examplepl&q=Harry+Potter&sort=title&title_format=BK&metadata=1&api_key={api_Key}"
      },

      {
        "id": "author",
        "name": "Author",
        "link": "https://api.bibliocommons.com/v1/titles?library=examplepl&q=Harry+Potter&sort=author&title_format=BK&metadata=1&api_key={api_Key}"
      },
      ...
    ],
    "narrow_bys": [ 
      {
        "id": "available_at",
        "name": "Available", 
        "narrow_tos": [
          {
            "id": "_anywhere_",
            "name": "Available somewhere",
            "count": 62, 
            "link": "https://api.bibliocommons.com/v1/titles?library=examplepl&q=Harry+Potter&sort=author&title_format=BK&available_at=_anywhere_&metadata=1&api_key={api_Key}"
          },
          {
            "id": "MA",
            "name": "Main Branch",
            "count": 29,
            "link": "https://api.bibliocommons.com/v1/titles?library=examplepl&q=Harry+Potter&sort=author&title_format=BK&available_at=MA&metadata=1&api_key={api_Key}"
          },
          ...
        ]
      },
      ...
    ]
  }       
}