Discover/Baidu API
live

Baidu APIpan.baidu.com

Access Baidu Pan (Baidu Netdisk) share link metadata and file listings via 2 endpoints. Retrieve share status, owner info, and file arrays without authentication.

This API takes change requests — .
Endpoint health
verified 12h ago
get_share_info
list_share_files
2/2 passing latest checkself-healing
Endpoints
2
Updated
12h ago

What is the Baidu API?

The Baidu Pan API exposes 2 endpoints for querying publicly visible share links on pan.baidu.com without any authentication. The get_share_info endpoint returns share status, owner identifiers, and VIP metadata for any share code regardless of whether the link is active, cancelled, or expired. The list_share_files endpoint retrieves the full file array embedded in an active share, including per-file metadata and share-level details across 10 response fields.

Try it
The short URL code from a pan.baidu.com/s/<code> share link (e.g. '1eQlSMtk').
api.parse.bot/scraper/befc851f-d7d4-4065-ac00-2ddae655e491/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/befc851f-d7d4-4065-ac00-2ddae655e491/get_share_info?surl=1eQlSMtk' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace pan-baidu-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Baidu Pan SDK — bounded, re-runnable; every call capped."""
from parse_apis.pan_baidu_com_api import BaiduPan, ParseError

client = BaiduPan()

# Look up a share link by its short URL code
share = client.shares.get(surl="1eQlSMtk")
print(share.status, share.share_username, share.shareid)

# Navigate to the file listing for this share
try:
    detail = share.files()
    print(detail.status, detail.ctime, detail.description)
    for f in detail.files[:3]:
        print(f.filename, f.size)
except ParseError as e:
    print("error:", e.code)

print("exercised: shares.get, share.files")
All endpoints · 2 totalmissing one? ·

Retrieve metadata about a Baidu Pan share link using its short URL code. Returns share status (active, cancelled, expired, not_found), owner info, and identifiers. Works for any share link state without requiring authentication.

Input
ParamTypeDescription
surlrequiredstringThe short URL code from a pan.baidu.com/s/<code> share link (e.g. '1eQlSMtk').
Response
{
  "type": "object",
  "fields": {
    "uk": "numeric user key of the share owner",
    "surl": "the queried short URL code",
    "errno": "upstream API error code (0=active, -21=cancelled, 105=not_found, etc.)",
    "status": "human-readable share status string",
    "longurl": "long-form share URL parameters",
    "shareid": "numeric share identifier",
    "show_msg": "status message from Baidu (in Chinese)",
    "vip_type": "VIP type of the share owner",
    "prod_type": "product type",
    "vip_level": "VIP level of the share owner",
    "share_type": "share type code",
    "share_photo": "avatar URL of the share owner",
    "share_username": "masked username of the share owner"
  },
  "sample": {
    "data": {
      "uk": 372520831,
      "surl": "1eQlSMtk",
      "errno": -21,
      "status": "cancelled",
      "longurl": "shareid=3145052969&uk=372520831",
      "shareid": 3145052969,
      "show_msg": "来晚啦,该分享已被取消",
      "vip_type": 0,
      "prod_type": "share",
      "vip_level": 1,
      "share_type": 0,
      "share_photo": "https://himg.bdimg.com/sys/portrait/item/public.1.edb9e8d4.IBCBEEflArqH8UqVjmZ9ag.jpg",
      "share_username": "寒雨***ng"
    },
    "status": "success"
  }
}

About the Baidu API

Share Link Metadata

The get_share_info endpoint accepts a single surl parameter — the short code appearing after /s/ in any pan.baidu.com share URL (e.g. 1eQlSMtk). It returns the numeric uk (user key) and shareid that uniquely identify the share owner and the share itself, along with an errno code that distinguishes active shares (0), cancelled shares (-21), and not-found links (105). The status field provides a human-readable label, and vip_type plus vip_level describe the owner's Baidu account tier.

File Listing

Once you have the uk and shareid from get_share_info, pass both to list_share_files to retrieve the files array for the share. Each share record also includes ctime (Unix timestamp of share creation), description, share_photo (owner avatar URL), public flag, and expired_type. For cancelled or expired shares, errno will be non-zero and the files array will be empty. The public field (1 or 0) indicates whether the share requires a password to access.

Error Handling and Share States

Both endpoints surface the upstream errno value directly so your application can handle all share states programmatically. The show_msg field returned by get_share_info carries Baidu's own status message in Chinese, useful for display or logging. There is no authentication requirement from your side for either endpoint — the API covers only shares that are already publicly visible.

Reliability & maintenanceVerified

The Baidu API is a managed, monitored endpoint for pan.baidu.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when pan.baidu.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official pan.baidu.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
12h ago
Latest check
2/2 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Check whether a pan.baidu.com share link is still active before presenting it to users, using the errno and status fields from get_share_info.
  • Build a share-link validator that classifies links as active, cancelled, or expired in bulk by iterating surl codes.
  • Enumerate all files in a public Baidu Pan share using list_share_files to index or catalog shared content.
  • Identify VIP account holders among share owners by reading vip_type and vip_level from get_share_info.
  • Track share creation timestamps via the ctime field to monitor when content was originally shared.
  • Detect password-protected shares by checking the public field in list_share_files responses.
  • Aggregate share metadata — shareid, uk, description — for research into public file distribution patterns on Baidu Netdisk.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Baidu Pan have an official developer API?+
Baidu provides an official PCS (Personal Cloud Storage) API for registered developers at https://pan.baidu.com/union/doc, but it requires OAuth authentication and approved application credentials. That API is gated behind an approval process and does not expose unauthenticated share-link queries in the way this Parse API does.
What does `list_share_files` return when a share has been cancelled?+
When a share is cancelled, list_share_files returns an errno of -21 and an empty files array. The status field will reflect the cancelled state. Share-level fields like shareid and uk are still present in the response, but no file objects are included.
Does the API return individual file sizes, download URLs, or folder structures within a share?+
Not currently. The list_share_files endpoint returns the files array embedded in the share page, but detailed per-file fields such as size, direct download URL, or nested folder hierarchy are not guaranteed response fields in the current spec. You can fork this API on Parse and revise it to add an endpoint that retrieves deeper per-file metadata.
Can I look up a share owner's profile or other shares they have published?+
Not currently. The API returns uk, vip_type, vip_level, and share_photo for a share owner, but does not expose an endpoint for querying all shares by a given user or fetching their public profile. You can fork this API on Parse and revise it to add a user-shares listing endpoint.
Is there a limitation on which share links this API can query?+
The API covers publicly visible shares — those accessible via a pan.baidu.com/s/<code> URL without a password. Password-protected shares (where public returns 0) will show share metadata in get_share_info, but list_share_files will return an empty files array since the file listing is not accessible without the share password.
Page content last updated . Spec covers 2 endpoints from pan.baidu.com.
Related APIs in Developer ToolsSee all →