Make Your First Request
Make your first request
Before you begin
Generate a Demandbase API token using Authenticate with Demandbase APIs. Replace your_jwt_token in the example with that token. This request searches B2B company data and requires access to the B2B API.
This API supports both JSON and XML. To request or post JSON, include the following in your headers:
Content-Type: application/json
Accept: application/json
For XML, change those to application/xml.
For this example, we will use JSON and will search for companies with the word "Microsoft" in the name.
- Set the request URL
POST https://uapi.demandbase.com/data/b2b/v1/companies - Set your headers
Content-Type: application/json Accept: application/json Authorization: Bearer your_jwt_token - Define your body
{ "page":1, "perPage": 50, "name": "Microsoft" } - Resulting cURL
curl --location 'https://uapi.demandbase.com/data/b2b/v1/companies' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer your_jwt_token' \ --data '{ "page":1, "perPage": 50, "name": "Microsoft" }' - Response: HTTP status 200
{ "companies": [ { "name": "Microsoft Corp", "city": "Redmond", "state": "WA", "country": "US", "companyId": 726263 }, {...} //Truncated for this example ], "totalCount": 1257, "pageNo": 1, "pageSize": 50 }
A 200 OK response confirms the request succeeded. companies contains matching records; totalCount is the total number of matches, and pageNo / pageSize describe this page of results. For parameter details, see Company Search.
Updated 24 days ago
Did this page help you?