# Get companies by tag
You can return all companies including a specific tag.
GET
/tags/:id/companies/
Attributes | Type | Required | Description |
---|---|---|---|
id | integer | yes | A unique identifier for the tag which is given by User.com automatically. |
# Request
- CURL
- JavaScript
- PHP
- Python
curl -X GET -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2"
"https://<your_app_subdomain>.user.com/api/public/tags/:id/companies/"
# Response
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 1665,
"name": "Company from API 1",
"description": "Company created by API request",
"email": "company@email.com",
"country": "United States",
"region": null,
"city": "Beverly Hills",
"address": null,
"postal_code": "90210",
"approx_employees": null,
"created_at": "2017-07-06T15:32:10.090817Z",
"updated_at": "2017-07-06T15:32:10.090843Z",
"attributes": [
{
"id": 248896,
"name": "company attribute",
"name_std": "company_attribute",
"value": "my value 1"
},
{
"id": 248895,
"name": "company attribute 2",
"name_std": "company_attribute_2",
"value": "my value 1"
}
],
"tags": [
{
"id": 31,
"name": "My tag",
}
],
"phone_numbers": [
"13102990912",
"123456789"
],
"company_id": null
},
{
"id": 1662,
"name": "Company from API 2",
"description": "",
"email": "company@email.pl",
"country": "Poland",
"region": null,
"city": "Warsaw",
"address": null,
"postal_code": null,
"approx_employees": null,
"created_at": "2017-07-06T14:51:23.445206Z",
"updated_at": "2017-07-06T14:51:23.445228Z",
"attributes": [
{
"id": 123,
"name": "company attribute",
"name_std": "company_attribute",
"value": "my value 2"
},
{
"id": 1546,
"name": "company attribute 2",
"name_std": "company_attribute_2",
"value": "my value 2"
}
],
"phone_numbers": null,
"company_id": null
},
]
}