Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

search query encoding not working

Open
#149 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github, python
Domain
api

Research direction

Start at the GhApi search.issues_and_pull_requests entry point and use debug=print_summary to compare its generated URL with the working curl request. Trace where the search query is encoded; done means the Python call preserves the intended query semantics and produces a working search request.

Written by the indexing model from the issue text.

Description

This works

curl -v \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $GH_ENTERPRISE_TOKEN" \
  https://$GH_HOST/api/v3/search/issues\?q\=repo:$REPO_NAME+state:open\&per_page=30\&page=

This does not

from ghapi.all import *
api = GhApi(<token etc..>)
paged(api.search.issues_and_pull_requests, q="repo:<REPO_NAME> state:open')

For debug log debug=print_summary

https://<HOST>/api/v3/search/issues?q=repo%3A<OWNER>%2F<REPO>+state%3Aopen&per_page=30&page=1

See : was replaced with %3A. This I think is what breaks the query, some uri/url encoding happening somewhere

Dominant language
Python
Stars
687
Forks
69
Avg merge
1m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AnswerDotAI/ghapi

All issues in AnswerDotAI/ghapi

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.