You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Burl%7D?q=api&page=58&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 19726 results for "api"(1478ms)
1Example Hono app with the Fiberplane API Playground and Tracing enabled.
23Note, for this we need to configure some environment variables:
1import { instrument } from "https://esm.sh/@fiberplane/hono-otel@0.8.0";
2import { createFiberplane, createOpenAPISpec } from "https://esm.sh/@fiberplane/hono@0.4.4";
3import { Hono } from "npm:hono@4.7.0"; // Hono's type inference works better as an npm import for some reason
4import { HTTPException } from "npm:hono@4.7.0/http-exception";
78/**
9* `GET /api/users`
10*
11* A mock api route that returns a list of users
12*/
13app.get("/api/users", async (c) => {
14return c.json({
15data: [
2728/**
29* `GET /openapi.json`
30*
31* Returns a simplified OpenAPI spec to power the Fiberplane UI.
32*/
33app.get("/openapi.json", async (c) => {
34const spec = createOpenAPISpec(app, {
35info: { title: "My Hono API", version: "1.0.0" },
36});
37return c.json(spec);
3940/**
41* Mount the Fiberplane API explorer at the root.
42* This exposes a UI to test the API.
43*/
44app.use(
45"/*",
46createFiberplane({
47openapi: { url: "/openapi.json" },
48}),
49);