`--fields` silently disables `--all-pages`: only page 1 is returned
@adarshdigievo đang làm issue này rồi.
Từ ngày 27/7/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
--fields and --all-pages are mutually incompatible in practice. Combining them returns page 1 only, exits 0, and prints nothing to stderr. The pagination flag is inert.
Reproduction
# 2 pages, 18 results
serpapi search engine=google q=coffee --all-pages --max-pages 3 | jq '.organic_results | length'
# => 18
# same flags + --fields: 1 page, 8 results
serpapi search --fields "organic_results[].{title,link}" \
engine=google q=coffee --all-pages --max-pages 3 | jq '.organic_results | length'
# => 8
# --fields alone, no pagination at all
serpapi search --fields "organic_results[].{title,link}" \
engine=google q=coffee | jq '.organic_results | length'
# => 8
Runs 2 and 3 are byte-identical after jq -S '.organic_results'. adding --all-pages --max-pages 3 changes nothing.
Suspect
Passing --fields sets json_restrictor, which prunes the response server-side. That prune removes serpapi_pagination, the only thing the pagination loop reads to find the next page.
Environment
- main @ 853dbae
- go1.25.5, darwin/arm64
- Verified with live API calls against engine=google
- Ngôn ngữ chính
- Go
- Star
- 13
- Fork
- 4
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của serpapi/serpapi-cli
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
serpapi/serpapi-cli#13 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
serpapi/serpapi-cli#12 ·
-
Markdown output support Đang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
serpapi/serpapi-cli#10 ·
Tất cả issue của serpapi/serpapi-cli
Issue tương tự
-
nix: vendorHash is outdated Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Bob Shell support Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
santhosh-tekuri/jsonschema#276 ·