{
 "openapi": "3.1.0",
 "info": {
  "title": "notfiction",
  "version": "1.0.0",
  "description": "Is it real? News scored by how many independent newsrooms report it. Check claims and links against what dozens of newsrooms report, get top stories, search, full coverage and who broke a story first. Free, no key. Please cite notfiction.com and the original outlets. Results report coverage, not truth.",
  "contact": {
   "name": "notfiction",
   "url": "https://notfiction.com/developers",
   "email": "shane@notfiction.com"
  }
 },
 "servers": [
  {
   "url": "https://notfiction.com"
  }
 ],
 "paths": {
  "/api/v1/check": {
   "get": {
    "operationId": "checkClaim",
    "summary": "Is it real? Check a claim, headline or link",
    "description": "Check whether a rumor, headline, claim or link (X/TikTok/YouTube post, article) is being reported by real newsrooms. Compares it with what 37 newsrooms (BBC, NYT, Fox News, NPR, Guardian, CBS, NBC and more) are reporting now and have reported since November 2026, flags satire sites and old news, and returns a verdict, the matching coverage with links, and a public answer page. Use when a user asks \"is this real?\", \"is this fake news?\", or shares a link to check. It reports coverage; it is not a fact-check.",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "description": "The claim in plain words, a headline, or a link.",
      "schema": {
       "type": "string",
       "minLength": 3,
       "maxLength": 500
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "md for Markdown instead of JSON.",
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "md"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The answer, with links to notfiction and the original reporting.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/search": {
   "get": {
    "operationId": "searchNews",
    "summary": "Search current and recent news",
    "description": "Search current and recent news stories by person, place, topic or headline words. Each result says how many independent newsrooms reported it (the newsroom score), who reported it first, and links to the original reporting.",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 25,
       "default": 10
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "md for Markdown instead of JSON.",
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "md"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The answer, with links to notfiction and the original reporting.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/stories": {
   "get": {
    "operationId": "topStories",
    "summary": "Top stories right now",
    "description": "The biggest news stories right now, ranked by how many independent newsrooms are reporting them and how recent they are. Optionally one section. Includes the facts the coverage agrees on when available.",
    "parameters": [
     {
      "name": "section",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "top",
        "latest",
        "news",
        "entertainment",
        "sports",
        "business",
        "tech"
       ],
       "default": "top"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 50,
       "default": 10
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "md for Markdown instead of JSON.",
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "md"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The answer, with links to notfiction and the original reporting.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/story/{id}": {
   "get": {
    "operationId": "getStory",
    "summary": "Full coverage of one story",
    "description": "Everything about one story: every outlet reporting it in the order they published (with links), who was first and who confirmed it, the facts the coverage agrees on, where outlets differ, and claims only one outlet makes.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "md for Markdown instead of JSON.",
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "md"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The answer, with links to notfiction and the original reporting.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/briefing": {
   "get": {
    "operationId": "newsBriefing",
    "summary": "Today’s briefing",
    "description": "A short briefing: the ~10 biggest stories that 3+ newsrooms are reporting, each with the facts their coverage agrees on. Good for \"what's going on today?\"",
    "parameters": [
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "md for Markdown instead of JSON.",
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "md"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The answer, with links to notfiction and the original reporting.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/record": {
   "get": {
    "operationId": "newsroomTrackRecord",
    "summary": "Who broke the news first",
    "description": "Which newsrooms break stories first that others then confirm. With no newsroom: the 30-day ranking. With a newsroom name: its 90-day record and recent scoops.",
    "parameters": [
     {
      "name": "newsroom",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "md for Markdown instead of JSON.",
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "md"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The answer, with links to notfiction and the original reporting.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/game": {
   "get": {
    "operationId": "realOrFictionGame",
    "summary": "Today’s Real or Fiction? headlines",
    "description": "Today's Real or Fiction? game: five headlines, some real news and some from satire sites. Returns the headlines (not the answers) and the link to play.",
    "parameters": [
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "md for Markdown instead of JSON.",
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "md"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The answer, with links to notfiction and the original reporting.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  }
 }
}