You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$2?q=fetch&page=13&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=fetch
Returns an array of strings in format "username" or "username/projectName"
Found 11107 results for "fetch"(1613ms)
4546// Create a quick thread for parsing
47const threadResponse = await fetch("https://api.openai.com/v1/threads", {
48method: "POST",
49headers: {
5859// Add the query
60await fetch(`https://api.openai.com/v1/threads/${thread.id}/messages`, {
61method: "POST",
62headers: {
7273// Run the parser assistant
74const runResponse = await fetch(`https://api.openai.com/v1/threads/${thread.id}/runs`, {
75method: "POST",
76headers: {
99await new Promise(resolve => setTimeout(resolve, 500));
100101const statusResponse = await fetch(
102`https://api.openai.com/v1/threads/${thread.id}/runs/${run.id}`,
103{
113114// Get the response
115const messagesResponse = await fetch(
116`https://api.openai.com/v1/threads/${thread.id}/messages?order=desc&limit=1`,
117{
463}
464465// Create or retrieve thread using raw fetch with v2 headers
466let thread;
467if (threadId) {
468const threadResponse = await fetch(`https://api.openai.com/v1/threads/${threadId}`, {
469headers: baseHeaders,
470});
474thread = await threadResponse.json();
475} else {
476const threadResponse = await fetch("https://api.openai.com/v1/threads", {
477method: "POST",
478headers: baseHeaders,
499500// Add message to thread with v2 headers
501const messageResponse = await fetch(`https://api.openai.com/v1/threads/${thread.id}/messages`, {
502method: "POST",
503headers: baseHeaders,
513514// Run the assistant with v2 headers
515const runResponse = await fetch(`https://api.openai.com/v1/threads/${thread.id}/runs`, {
516method: "POST",
517headers: baseHeaders,
734};
735736// Poll for completion using raw fetch with v2 headers
737let runStatus = run;
738let allMediaDisplays = [];
747await new Promise(resolve => setTimeout(resolve, 2000));
748749const statusResponse = await fetch(
750`https://api.openai.com/v1/threads/${thread.id}/runs/${run.id}`,
751{ headers: baseHeaders },
776777// Submit tool outputs with v2 headers
778const toolOutputResponse = await fetch(
779`https://api.openai.com/v1/threads/${thread.id}/runs/${run.id}/submit_tool_outputs`,
780{
800801// Get the assistant's response with v2 headers
802const messagesResponse = await fetch(
803`https://api.openai.com/v1/threads/${thread.id}/messages?order=desc&limit=20`,
804{ headers: baseHeaders },
33}
3435// Fetch data from API
36const [featuredResponse, recentResponse] = await Promise.all([
37fetch('/api/listings/featured?limit=6'),
38fetch('/api/listings?limit=8')
39]);
40