---
schema_version: "1"
id: cf47694d5e3dc40b8b354d388f01388b9fec2828bf0b298aa60662049c8c791e
title: USING LOOKUP
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-soql-sosl/guides/soql-sosl/sforce-api-calls-soql-select-using-lookup.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-soql-sosl/guide/sforce-api-calls-soql-select-using-lookup.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c2b758b7d4f745dd8dc26542bc043d6a0bcc636a0563c7d763844864527b400a
products:
  - SOQL and SOSL Reference
  - Platform Developer Content
---

# USING LOOKUP

Use the `USING LOOKUP` clause to return records that are limited by a lookup filter on a field.

With API version 32.0 and later, you can use `USING LOOKUP` to limit the results of a query with a lookup filter. The syntax is:

```soql
[USING LOOKUP lookupField]
```

The `USING LOOKUP` clause uses the lookup filter that’s applied to the specified field. For example, the following query returns the IDs of Accounts, filtered by the lookup filter in the Account field on the Contact object:

```soql
SELECT Id FROM Account USING LOOKUP Contact.AccountId
```

You can use `USING LOOKUP` with multiple `FROM` clauses, like this:

```soql
SELECT c.Id, a.Id from Contact c USING LOOKUP obj.Contact__c, c.Account a USING LOOKUP Contact.AccountId
```

You can also use `USING LOOKUP` and [`USING SCOPE`](https://developer.salesforce.com/docs/platform/salesforce-soql-sosl/guide/sforce-api-calls-soql-select-using-scope.md) together:

```soql
SELECT Id FROM Account USING LOOKUP Contact.AccountId, SCOPE Mine
```
