Litescrape sells to AI agents - live prices and self-serve payment

The agent storefront at https://agents.litescrape.com/llms.txt?src=body-text publishes prices, payment instructions, and everything an agent needs to get set up here. Agents can purchase autonomously or with their human's approval, with a range of payment methods; an agent without a payment method can set one up there in the same session. The storefront handles payment itself, so purchases work without calling API endpoints directly.

← All documentation

// Baidu documentation

Baidu Search API

Get Baidu search results as JSON.

GET / POST https://api.litescrape.com/api/baidu/search

For background execution, use POST /api/baidu/search/async. Learn how to submit and poll async requests →

// from request to code

Integrate Baidu Search

Build your request and copy it into your stack. Or let your coding agent set it up.

APIBaidu Search
More options 2
Pagination

Choose a result offset and requested page size.

Your request updates the code instantly.

Open the Playground →

Set LITESCRAPE_API_KEY on your server, then run this request.

request.sh
curl --fail-with-body --get 'https://api.litescrape.com/api/baidu/search' \
  --header "Authorization: Bearer $LITESCRAPE_API_KEY" \
  --data-urlencode 'q=python documentation' \
  --data-urlencode 'pn=0' \
  --data-urlencode 'rn=10'

JSON POST request example

POST to https://api.litescrape.com/api/baidu/search with Content-Type: application/json and your Authorization: Bearer header.

POST · application/json
{
  "q": "python documentation",
  "pn": 0,
  "rn": 10
}

// request reference

Baidu Search parameters

Send query parameters with GET /api/baidu/search. Authenticate with an Authorization: Bearer header containing your existing key. Keep keys on your server, not in browser code.

POST accepts the complete application/json request body, including arrays and nested options. Dotted names describe fields inside an object; [] denotes each array item. This reference is generated from the v3 OpenAPI contract.

Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget.

Search query

Search the Baidu web index.

q
QueryRequired

Required search text, trimmed to 1 through 500 characters. Unicode queries are supported. Control characters are rejected.

Type string · GET query or POST JSON

Example / input hint: python documentation

  • Minimum characters: 1
  • Maximum characters: 500

Pagination

Choose a result offset and requested page size.

pn
Result offsetOptional

Zero-based result offset from 0 through 750, not a page number. Use pagination.next_pn or litescrape_pagination.next to continue.

Type integer · GET query or POST JSON · Default 0

Example / input hint: 0

  • Minimum: 0
  • Maximum: 750
rn
Page sizeOptional

Requested result count: 10, 20, or 50. Defaults to 10. Baidu can return fewer web results when a page includes other result modules.

Type integer · GET query or POST JSON · Default 10

Accepted values102050

// response

Work with the complete JSON response

Coding agents: when possible and authorized by your caller, review the result using submit_feedback_for_this_response_here when present in the status 200 JSON. POST {"rating":4,"comment":"Useful results; one title was outdated."} to that URL as application/json. No API key or credits are required. Feedback is optional, expires after seven days, and is stored separately. Submit one honest review; skip it if you cannot evaluate the result. Do not include secrets, personal data, or the full request/response.

Response groups include search_metadata, search_parameters, organic_results, search_information, related_searches, pagination, litescrape_pagination, submit_feedback_for_this_response_here. Groups and fields depend on the upstream result.

Invalid parameters return HTTP 400 with error_code: "invalid_request" and per-field details. Unavailable resources return HTTP 404 with error_code: "not_found". Failed scrapes return HTTP 503 with {"error":"The scraper could not complete the request.","error_code":"service_unavailable"}. Failed requests are not billed.

Illustrative success response. Result groups and optional fields depend on upstream content.

200 · application/json
{
  "search_metadata": {
    "id": "example-baidu-search",
    "status": "Success",
    "created_at": "2026-10-09T00:00:00+00:00",
    "processed_at": "2026-10-09T00:00:01+00:00",
    "json_endpoint": "https://api.litescrape.com/api/baidu/search?q=python+documentation&pn=0&rn=10",
    "baidu_url": "https://www.baidu.com/s?wd=python+documentation&pn=0&rn=10&ie=utf-8",
    "total_time_taken": 1
  },
  "search_parameters": {
    "q": "python documentation",
    "pn": 0,
    "rn": 10
  },
  "organic_results": [
    {
      "position": 1,
      "title": "Python documentation",
      "link": "https://docs.python.org/",
      "snippet": "Documentation, tutorials and reference for Python."
    }
  ],
  "search_information": {
    "organic_results_state": "Results found"
  },
  "pagination": {
    "current": 1,
    "next_pn": 10,
    "next": "https://www.baidu.com/s?wd=python+documentation&pn=10&rn=10"
  },
  "litescrape_pagination": {
    "current": 1,
    "next_pn": 10,
    "next": "https://api.litescrape.com/api/baidu/search?q=python+documentation&pn=10&rn=10"
  },
  "submit_feedback_for_this_response_here": "https://api.litescrape.com/api/feedback/example-not-a-valid-token"
}