{ "swagger": "2.0", "info": { "version": "2.0.0", "title": "Top Stories", "description": "The Top Stories API provides lists of articles and associated images by section.", "logo": { "url": "img/logo_api_top_stories_150x150.png" } }, "host": "api.nytimes.com", "schemes": [ "http", "https" ], "basePath": "/svc/topstories/v2", "produces": [ "application/json" ], "security": [ { "apikey": [ ] } ], "paths": { "\/{section}.{format}": { "get": { "summary": "Top Stories", "description": "The Top Stories API returns a list of articles and associated images currently on the specified section. Support JSON and JSONP.\n", "parameters": [ { "name": "section", "in": "path", "description": "The section the story appears in.", "required": true, "type": "string", "enum": [ "home", "opinion", "world", "national", "politics", "upshot", "nyregion", "business", "technology", "science", "health", "sports", "arts", "books", "movies", "theater", "sundayreview", "fashion", "tmagazine", "food", "travel", "magazine", "realestate", "automobiles", "obituaries", "insider" ], "x-consoleDefault": "home" }, { "name": "format", "in": "path", "description": "if this is JSONP or JSON", "required": true, "type": "string", "enum": [ "json", "jsonp" ], "x-consoleDefault": "json" }, { "name": "callback", "in": "query", "description": "The name of the function the API call results will be passed to. Required when using JSONP. This parameter has only one valid value per section. The format is {section_name}TopStoriesCallback.\n", "required": false, "type": "string" } ], "tags": [ "Stories" ], "responses": { "200": { "description": "An array of articles", "schema": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#\/definitions\/Article" } } } } } } } } }, "definitions": { "Article": { "type": "object", "properties": { "section": { "type": "string" }, "subsection": { "type": "string" }, "title": { "type": "string" }, "abstract": { "type": "string" }, "url": { "type": "string" }, "thumbnail_standard": { "type": "string" }, "short_url": { "type": "string" }, "byline": { "type": "string" }, "item_type": { "type": "string" }, "updated_date": { "type": "string" }, "created_date": { "type": "string" }, "published_date": { "type": "string" }, "material_type_facet": { "type": "string" }, "kicker": { "type": "string" }, "des_facet": { "type": "array", "items": { "type": "string" } }, "org_facet": { "type": "array", "items": { "type": "string" } }, "per_facet": { "type": "array", "items": { "type": "string" } }, "geo_facet": { "type": "array", "items": { "type": "string" } }, "multimedia": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" }, "format": { "type": "string" }, "height": { "type": "integer" }, "width": { "type": "integer" }, "type": { "type": "string" }, "subtype": { "type": "string" }, "caption": { "type": "string" }, "copyright": { "type": "string" } } } }, "related_urls": { "type": "array", "items": { "type": "object", "properties": { "suggested_link_text": { "type": "string" }, "url": { "type": "string" } } } } } } }, "securityDefinitions": { "apikey": { "type": "apiKey", "name": "api-key", "in": "query" } } }