> ## Documentation Index
> Fetch the complete documentation index at: https://docs.checkthatfield.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scores

> Open fields around a postcode, place, address or point, with their scores.



## OpenAPI

````yaml /api-reference/openapi.json get /scores
openapi: 3.1.0
info:
  title: Check That Field API
  description: >-
    How likely England's fields are to be built on for housing, and the housing
    planning applications around them. Send your key as `Authorization: Bearer
    ctf_sk_live_…`. Errors are `{"error": {"code", "message"}}`.
  version: 1.0.0
servers:
  - url: https://api.checkthatfield.com/v1
    description: Production
security:
  - HTTPBearer: []
paths:
  /scores:
    get:
      summary: Scores
      description: >-
        Open fields around a postcode, place, address or point, with their
        scores.
      operationId: scores_scores_get
      parameters:
        - name: postcode
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 20
                pattern: ^[^\x00-\x1f]*$
              - type: 'null'
            description: A postcode, e.g. SG8 9NT.
            title: Postcode
          description: A postcode, e.g. SG8 9NT.
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 200
                pattern: ^[^\x00-\x1f]*$
              - type: 'null'
            description: A town or village, or an address (its postcode is used).
            title: Q
          description: A town or village, or an address (its postcode is used).
        - name: lat
          in: query
          required: false
          schema:
            anyOf:
              - type: number
                maximum: 61
                minimum: 49
              - type: 'null'
            title: Lat
        - name: lng
          in: query
          required: false
          schema:
            anyOf:
              - type: number
                maximum: 3
                minimum: -10
              - type: 'null'
            title: Lng
        - name: radius_m
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 50
            default: 500
            title: Radius M
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 60
            minimum: 1
            default: 20
            title: Limit
        - name: geometry
          in: query
          required: false
          schema:
            type: boolean
            description: Include each field's outline.
            default: false
            title: Geometry
          description: Include each field's outline.
        - name: applications
          in: query
          required: false
          schema:
            type: boolean
            description: Include housing applications.
            default: true
            title: Applications
          description: Include housing applications.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScoresOut'
        '401':
          description: No key, or one we don't know.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '403':
          description: The key has been revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '404':
          description: No such field, postcode or place.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '409':
          description: A place name matches several places; `error.choices` lists them.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '422':
          description: >-
            The question can't be answered as asked, or the place is outside
            England.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '429':
          description: The month's calls are used up, or too many calls a minute.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '503':
          description: The search took too long. Try a smaller radius or a postcode.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
      security:
        - HTTPBearer: []
components:
  schemas:
    ScoresOut:
      properties:
        centre:
          $ref: '#/components/schemas/Centre'
          description: Where the fields were looked for around.
        radius_m:
          type: integer
          title: Radius M
          description: How far from it, in metres.
        model_version:
          type: string
          title: Model Version
          description: The scoring model the scores come from.
        fields:
          items:
            $ref: '#/components/schemas/FieldScore'
          type: array
          title: Fields
          description: Open fields nearest first.
        applications:
          anyOf:
            - items:
                $ref: '#/components/schemas/Application'
              type: array
            - type: 'null'
          title: Applications
          description: Housing applications within the radius, newest first.
        attribution:
          items:
            type: string
          type: array
          title: Attribution
          description: Must be shown wherever the data is shown.
      type: object
      required:
        - centre
        - radius_m
        - model_version
        - fields
        - attribution
      title: ScoresOut
    ErrorOut:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorOut
    Centre:
      properties:
        point:
          items:
            type: number
          type: array
          title: Point
          description: '[longitude, latitude] of the place asked about.'
        from:
          type: string
          enum:
            - location
            - postcode
            - place
          title: From
          description: 'What was asked about: a point, a postcode or a place.'
        place:
          anyOf:
            - type: string
            - type: 'null'
          title: Place
          description: The town or village, when a place was asked about.
      type: object
      required:
        - point
        - from
      title: Centre
    FieldScore:
      properties:
        field_id:
          type: integer
          title: Field Id
          description: Our id for the field; use it with /v1/fields/{field_id}.
        inspire_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Inspire Id
          description: HM Land Registry INSPIRE id of the land parcel.
        distance_m:
          type: integer
          title: Distance M
          description: Metres from the place asked about to the field's edge.
        area_ha:
          type: number
          title: Area Ha
          description: The field's area in hectares.
        council:
          $ref: '#/components/schemas/Council'
        point:
          items:
            type: number
          type: array
          title: Point
          description: A point inside the field, [longitude, latitude].
        status:
          type: string
          enum:
            - scored
            - pending
            - not_open_land
          title: Status
          description: >-
            `pending`: not scored yet; it has been queued, so ask again in a few
            minutes. `not_open_land`: built on, or too small to be a field;
            never scored.
        score:
          anyOf:
            - type: integer
            - type: 'null'
          title: Score
          description: Likelihood of housing, 0–100. Null until scored.
        band:
          anyOf:
            - type: string
              enum:
                - Low
                - Moderate
                - High
                - Very High
            - type: 'null'
          title: Band
          description: >-
            The score's band: Low 0–19, Moderate 20–44, High 45–69, Very High
            70–100.
        horizons:
          anyOf:
            - $ref: '#/components/schemas/Horizons'
            - type: 'null'
        reasons:
          items:
            $ref: '#/components/schemas/Reason'
          type: array
          title: Reasons
          description: The strongest reasons behind the score, at most 3.
        scored_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Scored At
          description: When the field was last scored.
        report_url:
          type: string
          title: Report Url
          description: The field on our map, with its report where it has one.
        geometry:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Geometry
          description: The field's outline as GeoJSON (WGS84), when asked for.
      type: object
      required:
        - field_id
        - inspire_id
        - distance_m
        - area_ha
        - council
        - point
        - status
        - score
        - band
        - horizons
        - reasons
        - scored_at
        - report_url
      title: FieldScore
    Application:
      properties:
        council:
          anyOf:
            - type: string
            - type: 'null'
          title: Council
          description: The council whose register it is on.
        reference:
          type: string
          title: Reference
          description: The council's reference.
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
          description: The site address as the council gives it.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The proposal, as the council describes it.
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: outline, full, reserved_matters, eia_scoping, …
        homes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Homes
          description: Homes proposed, where the description says.
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: pending, decided, withdrawn or appealed.
        decision:
          anyOf:
            - type: string
            - type: 'null'
          title: Decision
          description: approved, refused or withdrawn, once decided.
        received_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Received Date
          description: When the council received it.
        decision_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Decision Date
          description: When it was decided, if it has been.
        distance_m:
          type: integer
          title: Distance M
          description: Metres from the place asked about.
        located_by:
          type: string
          enum:
            - published
            - postcode
            - address
          title: Located By
          description: >-
            How we placed it: the council's own location, the postcode in its
            address, or the words of its address (e.g. 'Land north of Mill
            Lane').
        url:
          type: string
          title: Url
          description: The application on the council's register, the official record.
      type: object
      required:
        - council
        - reference
        - address
        - description
        - type
        - homes
        - status
        - decision
        - received_date
        - decision_date
        - distance_m
        - located_by
        - url
      title: Application
    ErrorBody:
      properties:
        code:
          type: string
          title: Code
          description: >-
            invalid_key, key_revoked, not_found, ambiguous, outside_england,
            bad_request, quota_exceeded, rate_limited, too_slow, …
        message:
          type: string
          title: Message
          description: What went wrong, in plain words.
      type: object
      required:
        - code
        - message
      title: ErrorBody
    Council:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: ONS code of the local planning authority.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: The council's name.
      type: object
      required:
        - code
        - name
      title: Council
    Horizons:
      properties:
        five_year:
          type: integer
          title: Five Year
          description: Likelihood of housing within about 5 years, 0–100.
        fifteen_year:
          type: integer
          title: Fifteen Year
          description: Likelihood of housing within about 15 years, 0–100.
      type: object
      required:
        - five_year
        - fifteen_year
      title: Horizons
    Reason:
      properties:
        label:
          type: string
          title: Label
          description: What counts towards the score, in plain words.
        direction:
          type: string
          enum:
            - up
            - down
          title: Direction
          description: Whether it raises or lowers the score.
        strength:
          type: string
          enum:
            - strong
            - moderate
            - slight
            - cap
          title: Strength
          description: >-
            How much it moves the score. `cap` limits the score whatever else
            applies.
      type: object
      required:
        - label
        - direction
        - strength
      title: Reason
  securitySchemes:
    HTTPBearer:
      type: http
      description: Your secret key, ctf_sk_live_…
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.