Look up eBay category IDs by name and list top-level departments for a marketplace domain.

View all eBay Product Listings & Seller Data endpoints →

Returns the eBay category tree for one marketplace domain as structured JSON. Send an optional query to filter categories by a case-insensitive name or slug substring, so a plain-language name such as cell phones resolves to the numeric category_id that the search operation's category parameter expects; leave query empty to receive the full top-level tree. domain selects one of 13 verified eBay sites (com, co.uk, de, com.au, ca, fr, it, es, nl, at, ch, ie, pl) and max_results limits how many categories come back, up to 240. The response uses an ok/meta/data envelope: data.categories[] holds category_id, name and slug, and data.groups[] holds the top-level department names. Observed in a live probe (query cell phones, domain com, max_results 5): one category was returned (category_id 15032, name Cell Phones & Accessories, slug Cell-Phones-Smart-Watches-Accessories) together with 18 department names such as Electronics, Collectibles & Art and Home & Garden, and meta reported domain com, query cell phones and record_count 1.

API Features

Category name to numeric ID Pass a query such as cell phones and read category_id from categories[]; that ID can be fed straight into the search operation's category parameter without memorizing values like 9355.
Top-level department groups data.groups[] returns the top-level department names alongside the matches; the probe returned 18, including Electronics, Collectibles & Art, Home & Garden and Sporting Goods.
Case-insensitive name and slug filter query matches a substring of the category name or slug regardless of case, and an empty query returns the full top-level tree instead of a filtered list.
Marketplace-specific taxonomies domain picks one of 13 verified eBay sites, and meta echoes the domain that served the response so a stored ID can be tied to the marketplace it came from.
Readable slug next to every ID Each category carries a URL-style slug (observed Cell-Phones-Smart-Watches-Accessories) in addition to category_id and name, which helps when labeling or deduplicating categories in your own tables.
Adjustable result size up to 240 max_results accepts 1 to 240 entries and larger values are capped at 240, so one call can return a broad slice of the tree when query is empty.

Live API Demo

POST /api/project/ebay/categories

Request cost is temporarily unavailable. No price is assumed.

View pricing

API Response (JSON)

{}
curl -X POST 'https://api.opendata-api.com/api/project/ebay/categories?key=<API_KEY>'
📢
Need Help?
If you encounter API issues or need other API requirements, please contact us.
Contact Us

Use Cases

Frequently asked questions

How do I find the category ID for a category name?

Send a POST with query set to the name (for example cell phones) and the domain you care about, then read data.categories[].category_id. In the observed probe this returned category_id 15032 for Cell Phones & Accessories, which is the kind of value the search operation's category parameter accepts.

Do I have to send a query?

No. domain, max_results and query are all optional. With an empty query the call returns the full top-level tree, and data.groups[] lists the top-level department names (18 were observed for the com domain).

How does the query filter match?

It is a case-insensitive substring match on the category name or slug, so short, plain terms work best. The probe query cell phones matched a single category, and meta.record_count reported 1.

Which marketplaces can I query?

The domain dropdown lists 13 verified sites: com, co.uk, de, com.au, ca, fr, it, es, nl, at, ch, ie and pl. Other eBay country sites such as com.sg or com.hk are reported as accepted but are not in the verified list, so test them before relying on them.

How many categories can one call return?

max_results accepts 1 to 240, and larger values are capped at 240. The observed probe asked for 5 and received the one category that matched the query.

Should I cache the result?

Yes, category IDs change rarely, and the probe calls took roughly 1.5 seconds each. Resolve names once per marketplace, store the category_id, and only refresh on a schedule.

Related operations

Guides

View Subscription Plans →