Skip to contents

Access the item metadata from an Internet Archive item

Usage

ia_metadata(items)

Arguments

items

A list object describing an Internet Archive items returned from the API.

Value

A data frame containing the metadata, with columns id for the item identifier, field for the name of the metadata field, and value for the metadata values.

Examples

ats_query <- c("publisher" = "american tract society")
ids       <- ia_search(ats_query, num_results = 3)
#> 1481 total items found. This query requested 3 results.
items     <- ia_get_items(ids)
#> Getting lifeofrevdavidbr00brai
#> Getting lordofglorys00warf
#> Getting manualofamerican00hard
metadata  <- ia_metadata(items)
#> Warning: `data_frame()` was deprecated in tibble 1.1.0.
#>  Please use `tibble()` instead.
#>  The deprecated feature was likely used in the internetarchive package.
#>   Please report the issue at
#>   <https://github.com/ropensci/internetarchive/issues>.
metadata
#> # A tibble: 142 × 3
#>    id                     field        value                                    
#>    <chr>                  <chr>        <chr>                                    
#>  1 lifeofrevdavidbr00brai title        The Life of Rev. David Brainerd, chiefly…
#>  2 lifeofrevdavidbr00brai creator1     Brainerd, David, 1718-1747               
#>  3 lifeofrevdavidbr00brai creator2     Edwards, Jonathan, 1703-1758             
#>  4 lifeofrevdavidbr00brai creator3     Flavel, John, 1630?-1691. Treatise on ke…
#>  5 lifeofrevdavidbr00brai subject      Indians of North America--Missions       
#>  6 lifeofrevdavidbr00brai description1 First edition, Boston, 1749, published u…
#>  7 lifeofrevdavidbr00brai description2 With copy 1 is bound: A Treatise on keep…
#>  8 lifeofrevdavidbr00brai publisher    New York : American Tract Society        
#>  9 lifeofrevdavidbr00brai date         1800                                     
#> 10 lifeofrevdavidbr00brai language     eng                                      
#> # ℹ 132 more rows