# Search Output

> [!WARNING]
> **Warning:** The Freebase API is no longer available. This documentation is left online as supporting information for the [data dumps](https://developers.google.com/freebase).

1. [Overview](https://developers.google.com/freebase/v1/search-output#overview)
2. [Schema output](https://developers.google.com/freebase/v1/search-output#schema)
3. [Advanced output](https://developers.google.com/freebase/v1/search-output#advanced-output)

## Overview

In addition to obtaining entity mids, relevance scores and display data helping humans make sense of a query's matches, it is also possible to request that specific entity structured data be returned with results via the output parameter. Like the filter parameter, this parameter is an s-expression containing a possibly nested list of metaschema predicates or paths to extract data for. The format of the result is a two-level nested list of results where the first level is keyed on the original predicate(s) or path(s) requested and the second level is keyed on the actual path(s) returned.

**For example:**   

*Find entities named "Blade Runner" and return their contributors:*

```
filter=(all name{phrase}:"Blade Runner")
&output=(contributor)
```

<button type="submit" class="button-blue button expand-control">Try it</button>

## Schema output

The output parameter may be nested to request data about entities for which data is returned at the level above. In a nested output list, the first element is what connects it to the previous level (or to the originating matched entity) and the other elements are about the entities returned at that level.

**For example:**   

*Find US Presidents and return their date of birth as well as their spouses' date_of_birth:*

```
filter=(all type:/government/us_president)
&output=(/people/person/date_of_birth (/people/marriage/spouse /people/person/date_of_birth))
```

<button type="submit" class="button-blue button expand-control">Try it</button>

When more than one display language is requested via the lang parameter, strings in all languages for which there is data are returned, respecting the order of languages in the request. To request data be returned in all languages indexed, the special d/all language code may be used.

**For example:**   

*Find US Presidents and return their spouses' categories and profession, in italian, russian, japanese and english:*

```
filter=(all type:/government/us_president)
&output=((/people/marriage/spouse category /people/person/profession))
&lang=it,ru,ja,en
```

<button type="submit" class="button-blue button expand-control">Try it</button>

## Advanced output

The output parameter supports all the metaschema predicates or path mappings indexed and a number of extra keywords listed below.

### description, description:provenance

Returns the text found in /common/topic/description triples, possibly filtered by a provenance keyword found it their provenance.process field.

**For example:**   

*Find US presidents and return their descriptions in the knowledge graph, by source*

```
filter=(all type:/government/us_president)
&output=(description)
```

<button type="submit" class="button-blue button expand-control">Try it</button>

*Find US presidents and return their wikipedia descriptions in the knowledge graph in english and japanese*

```
filter=(all type:/government/us_president)
&output=(description:wikipedia)
&lang=d/en,d/ja
```

<button type="submit" class="button-blue button expand-control">Try it</button>

### disambiguator, disambiguator:type, disambiguator:domain

Returns the values or entities in paths with disambiguating properties (annotated with /freebase/property_hints/disambiguator), possibly filtered by a type or a domain holding these properties.

**For example:**   

*Find "blade runner" and return disambiguating data from matches*

```
filter=(all name:"Blade Runner")
&output=(disambiguator)
```

<button type="submit" class="button-blue button expand-control">Try it</button>

*Find "blade runner" and return disambiguating data from matches in /film/film*

```
filter=(all name:"Blade Runner")
&output=(disambiguator:/film/film)
```

<button type="submit" class="button-blue button expand-control">Try it</button>

### geocode

Returns the geocode data from location entities.

**For example:**   

*Find restaurants within 1000ft of the SF Ferry Building and return their geocode and their type of cuisine*

```
filter=(all type:restaurant (within radius:1000ft lon:-122.39 lat:37.7955))
&output=(geocode practitioner_of)
```

<button type="submit" class="button-blue button expand-control">Try it</button>

### key, key:namespace

Returns the keys/ or ids for entities, possibily filtered by a namespace.

**For example:**   

*Find restaurants within 1000ft of the SF Ferry Building and return their Google+ ID*

```
filter=(all type:restaurant (within radius:1000ft lon:-122.39 lat:37.7955))
&output=(key:/authority/google/google_plus)
```

<button type="submit" class="button-blue button expand-control">Try it</button>

### type

Returns the type for an entity, ranked by notability when that data is available.

**For example:**   

*Find "blade runner" and return type data from matches*

```
filter=(all name:"Blade Runner")
&output=(type)
```

<button type="submit" class="button-blue button expand-control">Try it</button>

### incompatible, incompatible:type

When used by itself, returns the types on an entity known to be incompatible with each other.  

When used with a type, returns whether this type is known to be incompatible with any of the types of this entity.  

When used with a type in a filter parameter, returns entities that have types incompatible with the one used.

**For example:**   

*Find instances of /people/person that have types that are incompatible with it and return them*

```
filter=(all type:/people/person incompatible:/people/person)
&output=(incompatible)
```

<button type="submit" class="button-blue button expand-control">Try it</button>

### all, all:type, all:domain

Returns all the data indexed for an entity that can be returned via the output parameter, possibly filtered by a type or a domain.

**For example:**   

*Find "san francisco" and return all data about it that is accessible via the output parameter*

```
filter=(all name{full}:"San Francisco" type:/location/citytown)
&output=(all)
&limit=1
```

<button type="submit" class="button-blue button expand-control">Try it</button>

**For example:**   

*Find "san francisco" and return all data in the location domain about it that is accessible via the output parameter*

```
filter=(all name{full}:"San Francisco" type:/location/citytown)
&output=(all:/location)
&limit=1
```

<button type="submit" class="button-blue button expand-control">Try it</button>