{
 "openapi": "3.1.0",
 "info": {
  "title": "Deduped public API",
  "version": "1.0.0",
  "description": "Read-only JSON: AI use cases generated from hot AI repos, the hot repos and the daily AI news brief. Static files, no key, no rate plan, rebuilt daily. Filter and search client side (search.json is one small file). Fields are only ever added.",
  "contact": {
   "email": "hello@dedupedai.com",
   "url": "https://dedupedai.com/api/"
  },
  "license": {
   "name": "Free to use with a link back to the use case url"
  }
 },
 "servers": [
  {
   "url": "https://dedupedai.com/api/v1"
  }
 ],
 "externalDocs": {
  "url": "https://dedupedai.com/llms.txt",
  "description": "Agent guide"
 },
 "paths": {
  "/index.json": {
   "get": {
    "operationId": "getIndex",
    "summary": "API index: endpoints and counts",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Unknown id or slug"
     }
    }
   }
  },
  "/usecases.json": {
   "get": {
    "operationId": "listUseCases",
    "summary": "Every use case, light records, best first per repo",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "schema_version",
          "generated",
          "count",
          "items"
         ],
         "properties": {
          "schema_version": {
           "type": "integer"
          },
          "generated": {
           "type": "string",
           "description": "YYYY-MM-DD"
          },
          "count": {
           "type": "integer"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string",
              "description": "repo-slug--use-case-slug"
             },
             "repo": {
              "type": "string",
              "description": "owner/name"
             },
             "title": {
              "type": "string"
             },
             "summary": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "tags": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "lang": {
              "type": "string"
             },
             "date": {
              "type": "string"
             },
             "seen_in_the_wild": {
              "type": "boolean"
             },
             "best": {
              "type": "boolean"
             },
             "score": {
              "type": "number"
             },
             "url": {
              "type": "string",
              "description": "Human page"
             },
             "json": {
              "type": "string"
             },
             "md": {
              "type": "string"
             },
             "api": {
              "type": "string",
              "description": "This API's full record"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown id or slug"
     }
    }
   }
  },
  "/usecases/{id}.json": {
   "get": {
    "operationId": "getUseCase",
    "summary": "One use case: steps, agent_prompt, requirements, risks, caveat",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "https://dedupedai.com/use-cases/schema.json"
        }
       }
      }
     },
     "404": {
      "description": "Unknown id or slug"
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Use case id, e.g. owner-repo--use-case-slug"
     }
    ]
   }
  },
  "/search.json": {
   "get": {
    "operationId": "searchIndex",
    "summary": "Compact search index for client side matching",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "schema_version",
          "generated",
          "count",
          "items"
         ],
         "properties": {
          "schema_version": {
           "type": "integer"
          },
          "generated": {
           "type": "string",
           "description": "YYYY-MM-DD"
          },
          "count": {
           "type": "integer"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object"
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown id or slug"
     }
    }
   }
  },
  "/repos.json": {
   "get": {
    "operationId": "listRepos",
    "summary": "Hot AI repos of the last 90 days, best first",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "schema_version",
          "generated",
          "count",
          "items"
         ],
         "properties": {
          "schema_version": {
           "type": "integer"
          },
          "generated": {
           "type": "string",
           "description": "YYYY-MM-DD"
          },
          "count": {
           "type": "integer"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "repo": {
              "type": "string",
              "description": "owner/name"
             },
             "slug": {
              "type": "string"
             },
             "url": {
              "type": "string",
              "description": "GitHub URL"
             },
             "title": {
              "type": "string"
             },
             "what": {
              "type": "string"
             },
             "language": {
              "type": "string"
             },
             "stars": {
              "type": [
               "integer",
               "null"
              ]
             },
             "gain": {
              "type": [
               "integer",
               "null"
              ]
             },
             "uc_n": {
              "type": "integer"
             },
             "use_cases": {
              "type": "string",
              "description": "Use case page for this repo"
             },
             "api": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown id or slug"
     }
    }
   }
  },
  "/repos/{slug}.json": {
   "get": {
    "operationId": "getRepo",
    "summary": "One hot repo with its use cases",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Unknown id or slug"
     }
    },
    "parameters": [
     {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Repo slug: owner-name lowercased"
     }
    ]
   }
  },
  "/news.json": {
   "get": {
    "operationId": "getNews",
    "summary": "Today's deduped AI news brief",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "schema_version",
          "generated",
          "count",
          "items"
         ],
         "properties": {
          "schema_version": {
           "type": "integer"
          },
          "generated": {
           "type": "string",
           "description": "YYYY-MM-DD"
          },
          "count": {
           "type": "integer"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rank": {
              "type": "integer"
             },
             "top_story": {
              "type": "boolean"
             },
             "title": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "coverage_tag": {
              "type": "string"
             },
             "body": {
              "type": "string"
             },
             "story_url": {
              "type": [
               "string",
               "null"
              ]
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown id or slug"
     }
    }
   }
  }
 }
}
