Details

- RandomEntity returns Entity objects.
- The type specification in RandomEntity can be an EntityClass object, an Entity object, or an explicit entity type such as "Country", "Movie", "Person", etc.
- RandomEntity will fetch sample entities from the online Wolfram Knowledgebase.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (2)Survey of the scope of standard use cases
Samples can be given from EntityClass expressions:

https://wolfram.com/xid/09b1hfn9q-bplmse


https://wolfram.com/xid/09b1hfn9q-4n77wt

Implicit EntityClass expressions, based on conditional EntityProperty values, can also be sampled:

https://wolfram.com/xid/09b1hfn9q-63ggy2

Possible Issues (3)Common pitfalls and unexpected behavior
If the sample size is larger than the number of available entities, an error message is issued:

https://wolfram.com/xid/09b1hfn9q-ktjj4m


The specified type should be an Entity, EntityClass, or known entity type:

https://wolfram.com/xid/09b1hfn9q-ukl0eh


https://wolfram.com/xid/09b1hfn9q-gmg9vr


Sample selection is done using the online Wolfram Knowledgebase, and does not follow client SeedRandom state:

https://wolfram.com/xid/09b1hfn9q-p4ga1n


https://wolfram.com/xid/09b1hfn9q-ztiulb

Wolfram Research (2015), RandomEntity, Wolfram Language function, https://reference.wolfram.com/language/ref/RandomEntity.html.
Text
Wolfram Research (2015), RandomEntity, Wolfram Language function, https://reference.wolfram.com/language/ref/RandomEntity.html.
Wolfram Research (2015), RandomEntity, Wolfram Language function, https://reference.wolfram.com/language/ref/RandomEntity.html.
CMS
Wolfram Language. 2015. "RandomEntity." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RandomEntity.html.
Wolfram Language. 2015. "RandomEntity." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RandomEntity.html.
APA
Wolfram Language. (2015). RandomEntity. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RandomEntity.html
Wolfram Language. (2015). RandomEntity. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RandomEntity.html
BibTeX
@misc{reference.wolfram_2025_randomentity, author="Wolfram Research", title="{RandomEntity}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/RandomEntity.html}", note=[Accessed: 08-July-2025
]}
BibLaTeX
@online{reference.wolfram_2025_randomentity, organization={Wolfram Research}, title={RandomEntity}, year={2015}, url={https://reference.wolfram.com/language/ref/RandomEntity.html}, note=[Accessed: 08-July-2025
]}