@datafire/nytimes_archive
v5.0.0
Published
DataFire integration for Archive
Downloads
14
Readme
@datafire/nytimes_archive
Client library for Archive
Installation and Usage
npm install --save @datafire/nytimes_archive
let nytimes_archive = require('@datafire/nytimes_archive').create({
apikey: ""
});
.then(data => {
console.log(data);
});
Description
The Archive API provides lists of NYT articles by month going back to 1851. You can use it to build your own local database of NYT article metadata.
Actions
year.month.json.get
The Archive API provides lists of NYT articles by month going back to 1851. Simply pass in the year and month you want and it returns a JSON object with all articles for that month.
nytimes_archive.year.month.json.get({
"year": 0,
"month": 0
}, context)
Input
- input
object
- year required
integer
: The year (e.g. 2016). - month required
integer
: The month number (e.g. 1 for January).
- year required
Output
- output
object
- response
object
- docs
array
- items Doc
- meta
object
- hits
integer
- offset
integer
- time
integer
- hits
- docs
- response
Definitions
Doc
- Doc
object
- _id
string
- abstract
string
- blog
array
- byline
object
- organization
string
- original
string
- person
array
- organization
- document_type
string
- headline
object
- kicker
string
- main
string
- kicker
- keywords
object
- name
string
- rank
string
- value
string
- name
- lead_paragraph
string
- multimedia
array
- items
object
- caption
string
- copyright
string
- format
string
- height
integer
- subtype
string
- type
string
- url
string
- width
integer
- caption
- items
- news_desK
string
- print_page
string
- pub_date
string
- section_name
string
- slideshow_credits
string
- snippet
string
- source
string
- subsection_name
string
- type_of_material
string
- web_url
string
- word_count
string
- _id