Back to list

search/{API key}/

The workhorse of the site. Search for lessons and companion resources in the Curriculum Matrix.

Extra Parameters:

Parameter API key
Type (20 character) string
Description This key is given to you by a national administrator.
GETParameter findlesson
Description A flag indicating searching for lessons
Example https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findresource&findlesson&search=apples
GETParameter findresource
Description A flag indicating searching for companion resources
Example https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?search=apples&findresource
GETParameter search
Type url-encoded string
Description A keyword or phrase to search lessons and/or companion resources. Use quotes to match an exact phrase (e.g., "food waste").
Example https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&search=apples
GETParameter search_term
Description Same as search. Provided as an alternate parameter name.
GETParameter commoncore
Type number -or- string
Description A comma separated list of Common Core standard group (identifiers or constants) to search lessons with.
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&commoncore=2,4
https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&commoncore=READ,WRITE
GETParameter grade
Type number -or- string
Description A comma separated list of grade abbreviations or grade band abbreviations to search lessons with.
Example https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&grade=K,1,2
https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&grade=MS,EE
GETParameter contentarea
Type number -or- string
Description A comma separated list of Content Area (identifiers or constants) to search lessons with.
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&contentarea=2,4
https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&contentarea=GEOGRAPHY,HISTORY
GETParameter nationalcontentarea
Type number -or- string
Description A comma-separated list of National Content Area identifiers or constants. Filters lessons by national standards only.
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&nationalcontentarea=2,4
https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&nationalcontentarea=GEOGRAPHY,HISTORY
GETParameter statecontentarea
Type number -or- string
Description A comma-separated list of State Content Area identifiers or constants. Filters lessons by state standards only (if the location supports them — i.e., search exception ID 2 or 3).
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&statecontentarea=2,4
https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&statecontentarea=GEOGRAPHY,HISTORY
GETParameter theme
Type number -or- string
Description A comma separated list of theme (identifiers or constants) to search lessons with.
Example https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&theme=5
https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&theme=ANIMALS,CULTURE
GETParameter mediatype
Type number(s) -or- string
Description A comma separated list of media type (identifiers or constants) to search companion resources with.
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findresource&mediatype=2,4
https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findresource&mediatype=POSTER
GETParameter tag
Type comma-separated list of tag IDs
Description A comma separated list of tags to search lessons and/or companion resources with.
Example ?findlesson&tag=9,10
GETParameter currentlessonpage
Type number
Description Used in pagination, the current lesson page – used in conjunction with lessonlimit
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&search=apples&currentlessonpage=2
GETParameter lessonlimit
Type number
Description Used in pagination, the maximum number of lesson results that should be returned from the search – used in conjunction with currentlessonpage
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&search=apples&lessonlimit=12
GETParameter currentresourcepage
Type number
Description Used in pagination, the current companion resource page – used in conjunction with resourcelimit
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findresource&search=apples&currentresourcepage=2
GETParameter resourcelimit
Type number
Description Used in pagination, the maximum number of companion resource results that should be returned from the search – used in conjunction with currentresourcepage
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findresource&search=apples&resourcelimit=12
GETParameter locationonly
Description A flag to only return lessons that have been saved as APPROVE-LOCATION. The API will look at the API key of the call first, but the key can be overridden by adding the locationoverride parameter with a location id. Using this flag will cause the search call to not be tracked.
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&search=agriculture&locationonly
GETParameter locationoverride
Type number
Description (Developer or admin only) Used with the locationonly override, this overrides the API key and tells the API which location to use. This number is given in the /location call. There can only be ONE identifier.
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&search=apples&locationonly&locationoverride=10
GETParameter featured
Description Only return lessons and companion resources marked as "Featured" on the backend and scheduled to be shown on the frontend.
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?featured
GETParameter lessonorder
Type string
Description Controls sort order of lesson results. Defaults to title.
Options title (A to Z)
newest (most recently revised, based on major revision date)
featuredfirst (featured lessons prioritized)
Example https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&search=apples&lessonorder=newest
GETParameter resourceorder
Type string
Description Controls sort order of companion resource results (only applies if using newmatrix output). Defaults to type.
Options type (alphabetically by media type)
title (A to Z)
newest (by resource ID, descending)
featuredfirst (featured prioritized)
Example https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findresource&search=apples&resourceorder=featuredfirst
GETParameter notrack
Description (Developer or admins only) Tells the search API not to track this call
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findresource&search=agriculture&notrack
GETParameter showsaved
Description (Developer or admins only) An override to get all of the lessons marked SAVED.
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&showsaved
GETParameter showreview
Description (Developer or admins only) An override to get all of the lessons marked UNDER-REVIEW.
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&showreview
GETParameter showprivate
Description (Developer or admins only) An override to get all of the lessons marked APPROVE-PRIVATE.
Examples https://api.agclassroom.org/api/search/ade32765c9f5487efa15/?findlesson&showprivate

HTTP Method

GET

Requires authentication:

Yes

Return Format:

JSON

Return Example:

{

success:true

message:Found.

lessoncount:8

resourcecount:23

paginated:false

lessons: [...]

0 {...}

id:374

title:A is for Apples

purpose:Students will use the five senses to investigate apples, identify and model the parts of an apple, make applesauce, and learn how apples are grown.

grades:7-9

band:Middle School

cover_image:https://cdn.agclassroom.org/media/uploads/test.jpg

cover_author:Yasuko Grow / Lynn Wallin

cover_alt:A test image for the API

cover_source:National Ag in the Classroom

1 {...}

id:673

title:An Apple a Day Keeps the Doctor Away

purpose:Students will explore organic and conventional farming practices by analyzing multimedia texts to investigate the differences between conventionally and organically grown apples.

grades:K-2

band:Early Elementary School

cover_image:https://cdn.agclassroom.org/media/uploads/test.jpg

cover_alt:A test image for the API

2 {...}

. . .

resources: {...}

ACTIVITY {...}

media:2

shorttitle:ACTIVITY

title:Activity

count:2

resources: [...]

0 {...}

id:132

mediatype:Activity

title:Farm Pop-Ups

description:Students use this template to create a pop-up game to reinforce agricultural concepts....

thumbnail:https://cdn.agclassroom.org/media/uploads/test.jpg

cover_image:https://cdn.agclassroom.org/media/uploads/test.jpg

cover_alt:A test image for the API

1 {...}

id:847

mediatype:Activity

title:The Very Hungry Western Caterpillar

description:Based off of Erik Carle's "Very Hungry Caterpillar", this caterpillar takes a journey....

thumbnail:https://cdn.agclassroom.org/media/uploads/CR1010/test.jpg

cover_image:https://cdn.agclassroom.org/media/uploads/CR1010/test.jpg

cover_author:Debra Speilmaker

cover_alt:A test image for the API

cover_source:National Ag in the Classroom

BOOK {...}

. . .

}