Skip to content
looot docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

SearchAPI.io - GitHub Search API

SearchAPI.io tool searchapi-io-github-search on looot: input fields, $0.004 per call, output shape, and code to run it with curl, JavaScript or Python.

The GitHub Search API scrapes search results from github.com/search. A single engine covers every GitHub search vertical, selected with the type parameter: repositories (default), users, issues, pull_requests, commits, topics, discussions, packages, wikis, and marketplace. Each type returns its own organic_results shape. The query (q) accepts GitHub’s full search qualifier syntax (e.g. language:ruby stars:>1000 topic:cli for repositories, or is:pr is:merged for issues). GitHub only exposes the first 1,000 results for any query (10 per page, up to page 100); search_information.total_results reports the true total match count. The available sort values depend on type: - repositories: stars, forks, help_wanted_issues, updated - users: followers, repositories, joined - issues / pull_requests: created, updated, comments, reactions, interactions - commits: author_date, committer_date - discussions: updated, comments, reactions, interactions - packages: updated, created, downloads - wikis: updated - marketplace: updated, created, popularity - topics: not sortable

  • Tool id: searchapi-io-github-search
  • Provider: SearchAPI.io
  • Job: Github search search (search.github-search)
  • Price: $0.004 per call. A call that fails at the provider costs $0.

Inputs

Name Type Required Description
engine string no Fixed to “github_search” for this endpoint. Example: “github_search”
order string no
page integer no
q string yes
sort string no
type string no

Output

Shape of the run’s result, checked against 2 real answers:

{ pagination: { next, current, total_pages }, organic_results: { id, link, name, owner: { id, type, login, avatar_url }, stars, topics: string[], language, position, full_name, has_issues, updated_at, visibility, description, is_archived, is_sponsorable, language_color, has_funding_file, help_wanted_issues_count, good_first_issue_issues_count }[], search_metadata: { id, status, html_url, json_url, created_at, request_url, total_time_taken, parsing_time_taken, request_time_taken }, language_filters: { name, color, query }[], search_parameters: { q, type, engine }, search_information: { page, qu... ...

The shape is cut here. Signed in, looot inspect searchapi-io-github-search prints all of it.

Run it

Every call needs your API token in LOOOT_TOKEN; Sign in shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With wait: 30 the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll GET /v1/runs/<runId>.

Example input with placeholder values:

curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"searchapi-io-github-search","input":{"q":"<q>","engine":"github_search"},"wait":30}'
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "searchapi-io-github-search",
    input: {
      q: "<q>",
      engine: "github_search",
    },
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "searchapi-io-github-search",
        "input": {
            "q": "<q>",
            "engine": "github_search",
        },
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))

To let looot pick among every provider of this job instead, send job:search.github-search as endpointId; see the job page.

Was this page helpful?