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 498 lessons. Found 1066 companion resources.

errors: []

lessoncount: 498

resourcecount: 1066

lessons: [... ]

0 {...}

id: 293

title: A "Sour" Subject

purpose: Students investigate the growth and production of citrus fruits ...

grades: 3 - 5

national_grades: 3 - 5

national_band: Upper Elementary

state_grades: 4 - 5

state_grades_description: [ "Fourth grade", "Fifth grade" ]

cover_image: https://cdn.agclassroom.org/media/uploads/covers/lesson-a-sour-subject_800.jpg

cover_alt: sliced lemons and grapefruits

1 {...}

id: 366

title: Working Worms

purpose: Students observe how earthworms speed the decomposition of organic matter ...

grades: 3 - 5

national_grades: 3 - 5

national_band: Upper Elementary

state_grades: 3 - 5

state_grades_description: [ "Third grade", "Fourth grade", "Fifth grade" ]

cover_image:

cover_alt:

resources: [... ]

0 {...}

id: 267

mediatype: Activity

title: A Seedy Fruit Challenge

description: This activity teaches students to identify different types of fruits ...

cover_image: https://cdn.agclassroom.org/media/uploads/covers/cr-seedy-fruit-challenge.jpg

cover_alt: halved apricots

1 {...}

id: 579

mediatype: Website

title: Web Soil Survey

description: The Web Soil Survey provides soil data and information for your specific area ...

cover_image: https://cdn.agclassroom.org/media/uploads/2016/05/19/WSS.png

cover_alt:

paginated: false

}