Skip to content

Instantly share code, notes, and snippets.

@justin2004
Last active April 16, 2025 20:32
Show Gist options
  • Select an option

  • Save justin2004/315b5ce247665368290ab4f4c4b9faef to your computer and use it in GitHub Desktop.

Select an option

Save justin2004/315b5ce247665368290ab4f4c4b9faef to your computer and use it in GitHub Desktop.
newsapi_everything.json
{
"openapi": "3.0.3",
"info": {
"title": "News API",
"version": "1.0.0",
"description": "Simple OpenAPI spec for /everything endpoint"
},
"servers": [
{
"url": "https://newsapi.org"
}
],
"paths": {
"/everything": {
"get": {
"summary": "Get all news articles",
"operationId": "getEverything",
"responses": {
"200": {
"description": "Successful response with news articles",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EverythingResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"EverythingResponse": {
"type": "object",
"required": [
"status",
"totalResults",
"articles"
],
"properties": {
"status": {
"type": "string"
},
"totalResults": {
"type": "integer"
},
"articles": {
"type": "array",
"items": {
"type": "object",
"required": [
"source",
"author",
"title",
"description",
"url",
"urlToImage",
"publishedAt",
"content"
],
"properties": {
"source": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "string",
"nullable": true
},
"name": {
"type": "string"
}
}
},
"author": {
"type": "string",
"nullable": true
},
"title": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"url": {
"type": "string"
},
"urlToImage": {
"type": "string",
"nullable": true
},
"publishedAt": {
"type": "string"
},
"content": {
"type": "string"
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment