1+ {
2+ "swagger" : " 2.0" ,
3+ "info" : {
4+ "title" : " BBC News" ,
5+ "description" : " Unofficial BBC News content retrieval providing articles, languages, and latest news feeds." ,
6+ "version" : " 1.0" ,
7+ "contact" : {
8+ "name" : " Dan Romano + Sayad Uddin Tahsin" ,
9+ 10+ "url" : " https://bbc-news-api.vercel.app"
11+ }
12+ },
13+ "host" : " bbc-news-api.vercel.app" ,
14+ "basePath" : " /" ,
15+ "schemes" : [
16+ " https"
17+ ],
18+ "securityDefinitions" : {},
19+ "security" : [],
20+ "paths" : {
21+ "/news" : {
22+ "get" : {
23+ "summary" : " Get news by topic" ,
24+ "description" : " Retrieve BBC news articles filtered by category or topic." ,
25+ "operationId" : " GetNewsByTopic" ,
26+ "x-ms-visibility" : " important" ,
27+ "parameters" : [
28+ {
29+ "name" : " topic" ,
30+ "in" : " query" ,
31+ "type" : " string" ,
32+ "x-ms-summary" : " Topic or category name" ,
33+ "description" : " The BBC news topic or category (e.g., 'world', 'technology', 'sport')." ,
34+ "required" : false ,
35+ "x-ms-visibility" : " important"
36+ },
37+ {
38+ "name" : " limit" ,
39+ "in" : " query" ,
40+ "type" : " integer" ,
41+ "x-ms-summary" : " Maximum number of results" ,
42+ "description" : " Limits the number of articles returned (default 10)." ,
43+ "required" : false ,
44+ "default" : 10 ,
45+ "x-ms-visibility" : " important"
46+ },
47+ {
48+ "name" : " lang" ,
49+ "in" : " query" ,
50+ "type" : " string" ,
51+ "x-ms-summary" : " Language code" ,
52+ "description" : " Filter results by language (e.g., 'english')." ,
53+ "required" : false ,
54+ "x-ms-visibility" : " important"
55+ }
56+ ],
57+ "responses" : {
58+ "200" : {
59+ "description" : " Successful response" ,
60+ "schema" : {
61+ "$ref" : " #/definitions/NewsResponse"
62+ }
63+ },
64+ "default" : {
65+ "description" : " Unexpected error"
66+ }
67+ }
68+ }
69+ },
70+ "/latest" : {
71+ "get" : {
72+ "summary" : " Get latest BBC news" ,
73+ "description" : " Retrieve the most recent BBC news articles across all categories." ,
74+ "operationId" : " GetLatestNews" ,
75+ "x-ms-visibility" : " important" ,
76+ "parameters" : [
77+ {
78+ "name" : " limit" ,
79+ "in" : " query" ,
80+ "type" : " integer" ,
81+ "x-ms-summary" : " Maximum number of results" ,
82+ "description" : " Limits the number of latest articles returned (default 10)." ,
83+ "required" : false ,
84+ "default" : 10 ,
85+ "x-ms-visibility" : " important"
86+ },
87+ {
88+ "name" : " lang" ,
89+ "in" : " query" ,
90+ "type" : " string" ,
91+ "x-ms-summary" : " Language code" ,
92+ "description" : " Filter latest articles by language (e.g., 'english')." ,
93+ "required" : false ,
94+ "x-ms-visibility" : " important"
95+ }
96+ ],
97+ "responses" : {
98+ "200" : {
99+ "description" : " Successful response" ,
100+ "schema" : {
101+ "$ref" : " #/definitions/NewsResponse"
102+ }
103+ },
104+ "default" : {
105+ "description" : " Unexpected error"
106+ }
107+ }
108+ }
109+ },
110+ "/languages" : {
111+ "get" : {
112+ "summary" : " List available languages" ,
113+ "description" : " Retrieve all supported BBC News languages and their codes." ,
114+ "operationId" : " GetLanguages" ,
115+ "x-ms-visibility" : " important" ,
116+ "responses" : {
117+ "200" : {
118+ "description" : " Successful response" ,
119+ "schema" : {
120+ "$ref" : " #/definitions/LanguagesResponse"
121+ }
122+ },
123+ "default" : {
124+ "description" : " Unexpected error"
125+ }
126+ }
127+ }
128+ }
129+ },
130+ "definitions" : {
131+ "NewsItem" : {
132+ "type" : " object" ,
133+ "properties" : {
134+ "title" : {
135+ "type" : " string" ,
136+ "description" : " Headline of the news article."
137+ },
138+ "description" : {
139+ "type" : " string" ,
140+ "description" : " Short summary or intro of the article."
141+ },
142+ "link" : {
143+ "type" : " string" ,
144+ "description" : " Direct URL to the BBC article."
145+ },
146+ "category" : {
147+ "type" : " string" ,
148+ "description" : " Category or topic of the article."
149+ },
150+ "published" : {
151+ "type" : " string" ,
152+ "description" : " Publication timestamp in ISO format."
153+ },
154+ "thumbnail" : {
155+ "type" : " string" ,
156+ "description" : " Thumbnail image URL."
157+ }
158+ }
159+ },
160+ "NewsResponse" : {
161+ "type" : " object" ,
162+ "properties" : {
163+ "status" : {
164+ "type" : " integer" ,
165+ "format" : " int32" ,
166+ "description" : " Response status message."
167+ },
168+ "results" : {
169+ "type" : " array" ,
170+ "items" : {
171+ "$ref" : " #/definitions/NewsItem"
172+ }
173+ }
174+ }
175+ },
176+ "LanguagesResponse" : {
177+ "type" : " object" ,
178+ "properties" : {
179+ "languages" : {
180+ "type" : " array" ,
181+ "items" : {
182+ "type" : " object" ,
183+ "properties" : {
184+ "code" : {
185+ "type" : " string" ,
186+ "description" : " Language code (e.g., 'en')."
187+ },
188+ "name" : {
189+ "type" : " string" ,
190+ "description" : " Language name (e.g., 'English')."
191+ }
192+ }
193+ }
194+ }
195+ }
196+ }
197+ },
198+ "x-ms-connector-metadata" : [
199+ {
200+ "propertyName" : " Website" ,
201+ "propertyValue" : " https://bbc-news-api.vercel.app/documentation"
202+ },
203+ {
204+ "propertyName" : " Privacy policy" ,
205+ "propertyValue" : " https://www.bbc.com/privacy"
206+ },
207+ {
208+ "propertyName" : " Categories" ,
209+ "propertyValue" : " Communication"
210+ }
211+ ]
212+ }
0 commit comments