You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/image-url.jpg%20%22Optional%20title%22?q=api&page=45&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=api
Returns an array of strings in format "username" or "username/projectName"
Found 11885 results for "api"(462ms)
1import { z } from "https://esm.sh/@hono/zod-openapi@0.18.4";
23// Schema that defines presence of an ID in the path
6.coerce
7.number()
8.openapi({ example: 1 }),
9});
1012export const NewUserSchema = z
13.object({
14email: z.string().uuid().openapi({ example: "7ef97801-2cee-4b4b-b5a1-376dd0ce4a1d" }),
15}).openapi("NewUser");
1617// Schema that defines the response of a request to get a user
19.object({
20id: z.number().int(),
21name: z.string().openapi({ example: "Mark Scout" }),
22email: z.string().email().openapi({ example: "mark@lumen.co" }),
23age: z.number().int().openapi({ example: 35 }),
24}).openapi("User");
2526export const UpdateUserSchema = z
27.object({
28name: z.string().optional().openapi({
29example: "Marcus Scoutius",
30}),
31age: z.number().int().optional().openapi({
32example: 53,
33}),
34})
35.openapi("UpdateUser");
3637// Error schema
1import { createRoute } from "https://esm.sh/@hono/zod-openapi@0.18.4";
2import { ErrorSchema, UpdateUserSchema, UserIdPathParamSchema, UserSchema } from "../schema.ts";
3